| Chunk |
|---|
| Conflicting content |
|---|
ResourceValue resource = renderResources.findItemInTheme(attr, true);
// Form @color/bar to the #AARRGGBB
resource = renderResources.resolveResValue(resource);
<<<<<<< HEAD
if (resource != null) {
ResourceType type = resource.getResourceType();
if (type == null || type == ResourceType.COLOR) {
// if no type is specified, the value may have been specified directly in the style
// file, rather than referencing a color resource value.
try {
return ResourceHelper.getColor(resource.getValue());
} catch (NumberFormatException e) {
// Conversion failed.
Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_FORMAT,
"Theme attribute @android:" + attr +
" does not reference a color, instead is '" +
resource.getValue() + "'.", resource);
}
}
=======
if (resource != null && ResourceType.COLOR.equals(resource.getResourceType())) {
return ResourceHelper.getColor(resource.getValue());
>>>>>>> c5bd6146f73a24008414d5bb8c07550e2c7f66ed
}
return 0;
} |
| Solution content |
|---|
ResourceValue resource = renderResources.findItemInTheme(attr, true);
// Form @color/bar to the #AARRGGBB
resource = renderResources.resolveResValue(resource);
if (resource != null) {
ResourceType type = resource.getResourceType();
if (type == null || type == ResourceType.COLOR) {
// if no type is specified, the value may have been specified directly in the style
// file, rather than referencing a color resource value.
try {
return ResourceHelper.getColor(resource.getValue());
} catch (NumberFormatException e) {
// Conversion failed.
Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_FORMAT,
"Theme attribute @android:" + attr +
" does not reference a color, instead is '" +
resource.getValue() + "'.", resource);
}
}
}
return 0;
} |
| File |
|---|
| CustomBar.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
FrameLayout contentRoot = new FrameLayout(getContext());
LayoutParams params = createLayoutParams(MATCH_PARENT, MATCH_PARENT);
int rule = mBuilder.isNavBarVertical() ? START_OF : ABOVE;
<<<<<<< HEAD
if (mBuilder.hasNavBar() && mBuilder.solidBars()) {
=======
if (mBuilder.solidBars()) {
>>>>>>> c5bd6146f73a24008414d5bb8c07550e2c7f66ed
params.addRule(rule, getId(ID_NAV_BAR));
}
int below = -1; |
| Solution content |
|---|
FrameLayout contentRoot = new FrameLayout(getContext());
LayoutParams params = createLayoutParams(MATCH_PARENT, MATCH_PARENT);
int rule = mBuilder.isNavBarVertical() ? START_OF : ABOVE;
if (mBuilder.hasNavBar() && mBuilder.solidBars()) {
params.addRule(rule, getId(ID_NAV_BAR));
}
int below = -1; |
| File |
|---|
| Layout.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
int below = -1;
if (mBuilder.mActionBarSize <= 0 && mBuilder.mTitleBarSize > 0) {
below = getId(ID_TITLE_BAR);
<<<<<<< HEAD
} else if (mBuilder.hasStatusBar() && mBuilder.solidBars()) {
=======
} else if (mBuilder.solidBars()) {
>>>>>>> c5bd6146f73a24008414d5bb8c07550e2c7f66ed
below = getId(ID_STATUS_BAR);
}
if (below != -1) { |
| Solution content |
|---|
int below = -1;
if (mBuilder.mActionBarSize <= 0 && mBuilder.mTitleBarSize > 0) {
below = getId(ID_TITLE_BAR);
} else if (mBuilder.hasStatusBar() && mBuilder.solidBars()) {
below = getId(ID_STATUS_BAR);
}
if (below != -1) { |
| File |
|---|
| Layout.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
LayoutParams layoutParams = createLayoutParams(MATCH_PARENT, MATCH_PARENT);
int rule = mBuilder.isNavBarVertical() ? START_OF : ABOVE;
<<<<<<< HEAD
if (mBuilder.hasNavBar() && mBuilder.solidBars()) {
layoutParams.addRule(rule, getId(ID_NAV_BAR));
}
if (mBuilder.hasStatusBar() && mBuilder.solidBars()) {
=======
if (mBuilder.solidBars()) {
layoutParams.addRule(rule, getId(ID_NAV_BAR));
}
if (mBuilder.solidBars()) {
>>>>>>> c5bd6146f73a24008414d5bb8c07550e2c7f66ed
layoutParams.addRule(BELOW, getId(ID_STATUS_BAR));
}
actionBar.getRootView().setLayoutParams(layoutParams); |
| Solution content |
|---|
}
LayoutParams layoutParams = createLayoutParams(MATCH_PARENT, MATCH_PARENT);
int rule = mBuilder.isNavBarVertical() ? START_OF : ABOVE;
if (mBuilder.hasNavBar() && mBuilder.solidBars()) {
layoutParams.addRule(rule, getId(ID_NAV_BAR));
}
if (mBuilder.hasStatusBar() && mBuilder.solidBars()) {
layoutParams.addRule(BELOW, getId(ID_STATUS_BAR));
}
actionBar.getRootView().setLayoutParams(layoutParams); |
| File |
|---|
| Layout.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
int simulatedPlatformVersion) {
TitleBar titleBar = new TitleBar(context, title, simulatedPlatformVersion);
LayoutParams params = createLayoutParams(MATCH_PARENT, mBuilder.mTitleBarSize);
<<<<<<< HEAD
if (mBuilder.hasStatusBar() && mBuilder.solidBars()) {
=======
if (mBuilder.solidBars()) {
>>>>>>> c5bd6146f73a24008414d5bb8c07550e2c7f66ed
params.addRule(BELOW, getId(ID_STATUS_BAR));
}
if (mBuilder.isNavBarVertical() && mBuilder.solidBars()) { |
| Solution content |
|---|
int simulatedPlatformVersion) {
TitleBar titleBar = new TitleBar(context, title, simulatedPlatformVersion);
LayoutParams params = createLayoutParams(MATCH_PARENT, mBuilder.mTitleBarSize);
if (mBuilder.hasStatusBar() && mBuilder.solidBars()) {
params.addRule(BELOW, getId(ID_STATUS_BAR));
}
if (mBuilder.isNavBarVertical() && mBuilder.solidBars()) { |
| File |
|---|
| Layout.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
if (!windowFullScreen && !mWindowIsFloating) {
mStatusBarSize =
getDimension(ATTR_STATUS_BAR_HEIGHT, true, DEFAULT_STATUS_BAR_HEIGHT);
<<<<<<< HEAD
mTranslucentStatus = getBooleanThemeValue(mResources,
=======
mTranslucentStatus = ResourceHelper.getBooleanThemeValue(mResources,
>>>>>>> c5bd6146f73a24008414d5bb8c07550e2c7f66ed
ATTR_WINDOW_TRANSLUCENT_STATUS, true, false);
}
} |
| Solution content |
|---|
if (!windowFullScreen && !mWindowIsFloating) {
mStatusBarSize =
getDimension(ATTR_STATUS_BAR_HEIGHT, true, DEFAULT_STATUS_BAR_HEIGHT);
mTranslucentStatus = getBooleanThemeValue(mResources,
ATTR_WINDOW_TRANSLUCENT_STATUS, true, false);
}
} |
| File |
|---|
| Layout.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
return;
}
// Check if an actionbar is needed
<<<<<<< HEAD
boolean windowActionBar = getBooleanThemeValue(mResources, ATTR_WINDOW_ACTION_BAR,
=======
boolean windowActionBar = ResourceHelper.getBooleanThemeValue(mResources, ATTR_WINDOW_ACTION_BAR,
>>>>>>> c5bd6146f73a24008414d5bb8c07550e2c7f66ed
!isThemeAppCompat(), true);
if (windowActionBar) {
mActionBarSize = getDimension(ATTR_ACTION_BAR_SIZE, true, DEFAULT_TITLE_BAR_HEIGHT); |
| Solution content |
|---|
return;
}
// Check if an actionbar is needed
boolean windowActionBar = getBooleanThemeValue(mResources, ATTR_WINDOW_ACTION_BAR,
!isThemeAppCompat(), true);
if (windowActionBar) {
mActionBarSize = getDimension(ATTR_ACTION_BAR_SIZE, true, DEFAULT_TITLE_BAR_HEIGHT); |
| File |
|---|
| Layout.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
mNavBarOrientation = barOnBottom ? LinearLayout.HORIZONTAL : VERTICAL;
mNavBarSize = getDimension(barOnBottom ? ATTR_NAV_BAR_HEIGHT : ATTR_NAV_BAR_WIDTH,
true, DEFAULT_NAV_BAR_SIZE);
<<<<<<< HEAD
mTranslucentNav = getBooleanThemeValue(mResources,
=======
mTranslucentNav = ResourceHelper.getBooleanThemeValue(mResources,
>>>>>>> c5bd6146f73a24008414d5bb8c07550e2c7f66ed
ATTR_WINDOW_TRANSLUCENT_NAV, true, false);
}
} |
| Solution content |
|---|
mNavBarOrientation = barOnBottom ? LinearLayout.HORIZONTAL : VERTICAL;
mNavBarSize = getDimension(barOnBottom ? ATTR_NAV_BAR_HEIGHT : ATTR_NAV_BAR_WIDTH,
true, DEFAULT_NAV_BAR_SIZE);
mTranslucentNav = getBooleanThemeValue(mResources,
ATTR_WINDOW_TRANSLUCENT_NAV, true, false);
}
} |
| File |
|---|
| Layout.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
/**
<<<<<<< HEAD
* Return true if the status bar or nav bar are present, they are not translucent (i.e
* content doesn't overlap with them).
*/
private boolean solidBars() {
return !(hasNavBar() && mTranslucentNav) && !(hasStatusBar() && mTranslucentStatus);
=======
* Return if both status bar and nav bar are solid (content doesn't overlap with these
* bars).
*/
private boolean solidBars() {
return hasNavBar() && !mTranslucentNav && !mTranslucentStatus && mStatusBarSize > 0;
>>>>>>> c5bd6146f73a24008414d5bb8c07550e2c7f66ed
}
private boolean hasNavBar() { |
| Solution content |
|---|
}
/**
* Return true if the status bar or nav bar are present, they are not translucent (i.e
* content doesn't overlap with them).
*/
private boolean solidBars() {
return !(hasNavBar() && mTranslucentNav) && !(hasStatusBar() && mTranslucentStatus);
}
private boolean hasNavBar() { |
| File |
|---|
| Layout.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method invocation |
| Method signature |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
return Config.showOnScreenNavBar(mParams.getSimulatedPlatformVersion()) &&
hasSoftwareButtons() && mNavBarSize > 0;
}
<<<<<<< HEAD
private boolean hasStatusBar() {
return mStatusBarSize > 0;
}
/**
* Return true if the nav bar is present and is vertical.
*/
private boolean isNavBarVertical() {
return hasNavBar() && mNavBarOrientation == VERTICAL;
}
=======
>>>>>>> c5bd6146f73a24008414d5bb8c07550e2c7f66ed
}
} |
| Solution content |
|---|
return Config.showOnScreenNavBar(mParams.getSimulatedPlatformVersion()) &&
hasSoftwareButtons() && mNavBarSize > 0;
}
private boolean hasStatusBar() {
return mStatusBarSize > 0;
}
/**
* Return true if the nav bar is present and is vertical.
*/
private boolean isNavBarVertical() {
return hasNavBar() && mNavBarOrientation == VERTICAL;
}
}
} |
| File |
|---|
| Layout.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |