Revert "Revert "Moving DeviceProfile properties into DevicePrope..."
Revert submission 33716851-revert-33672643-DataDeviceProfile1-XHYRAPLEBK Reason for revert: Error is fixed Reverted changes: /q/submissionid:33716851-revert-33672643-DataDeviceProfile1-XHYRAPLEBK Change-Id: Ib86824134955903c11e51e52dbfd6368aba1cd50
This commit is contained in:
1 parent
1bec329180
commit
e1d31e5406
128 files changed
+727
-597
No files matched your search
@@ -1048,9 +1048,9 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
|
||||
// If SUW is on a large screen device that is landscape (or has a square aspect
|
||||
// ratio) the back button has to be placed accordingly
|
||||
if ((deviceProfile.isTablet && deviceProfile.isLandscape)
|
||||
|| (deviceProfile.aspectRatio > SQUARE_ASPECT_RATIO_BOTTOM_BOUND
|
||||
&& deviceProfile.aspectRatio < SQUARE_ASPECT_RATIO_UPPER_BOUND)) {
|
||||
if ((deviceProfile.getDeviceProperties().isTablet() && deviceProfile.getDeviceProperties().isLandscape())
|
||||
|| (deviceProfile.getDeviceProperties().getAspectRatio() > SQUARE_ASPECT_RATIO_BOTTOM_BOUND
|
||||
&& deviceProfile.getDeviceProperties().getAspectRatio() < SQUARE_ASPECT_RATIO_UPPER_BOUND)) {
|
||||
navButtonsLayoutParams.setMarginStart(
|
||||
resources.getDimensionPixelSize(R.dimen.taskbar_back_button_suw_start_margin));
|
||||
navButtonsViewLayoutParams.bottomMargin = resources.getDimensionPixelSize(
|
||||
@@ -1061,7 +1061,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
int phoneOrPortraitSetupMargin = resources.getDimensionPixelSize(
|
||||
R.dimen.taskbar_contextual_button_suw_margin);
|
||||
navButtonsLayoutParams.setMarginStart(phoneOrPortraitSetupMargin);
|
||||
navButtonsLayoutParams.bottomMargin = !deviceProfile.isLandscape
|
||||
navButtonsLayoutParams.bottomMargin = !deviceProfile.getDeviceProperties().isLandscape()
|
||||
? 0
|
||||
: phoneOrPortraitSetupMargin - (resources.getDimensionPixelSize(
|
||||
R.dimen.taskbar_nav_buttons_size) / 2);
|
||||
@@ -1427,7 +1427,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
// If the taskbar is start aligned the navigation bar is aligned to the start or end of
|
||||
// the container, depending on the bubble bar location
|
||||
if (isNavbarOnRight) {
|
||||
navBarTargetStartX = dp.widthPx - navBarSpacing - mNavButtonContainer.getWidth();
|
||||
navBarTargetStartX = dp.getDeviceProperties().getWidthPx() - navBarSpacing - mNavButtonContainer.getWidth();
|
||||
} else {
|
||||
navBarTargetStartX = navBarSpacing;
|
||||
}
|
||||
@@ -1440,7 +1440,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
if (isNavbarOnRight) {
|
||||
if (mNavButtonsView.isLayoutRtl()) {
|
||||
float taskBarEnd = taskbarBounds.right;
|
||||
navBarTargetStartX = (dp.widthPx + taskBarEnd - navbarWidth) / 2;
|
||||
navBarTargetStartX = (dp.getDeviceProperties().getWidthPx() + taskBarEnd - navbarWidth) / 2;
|
||||
} else {
|
||||
navBarTargetStartX = mNavButtonContainer.getLeft();
|
||||
}
|
||||
@@ -1458,7 +1458,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
// screen.
|
||||
Rect transientTaskbarIconLayoutBoundsInParent = mControllers.taskbarViewController
|
||||
.getTransientTaskbarIconLayoutBoundsInParent();
|
||||
if (mContext.getDeviceProfile().isPhone
|
||||
if (mContext.getDeviceProfile().getDeviceProperties().isPhone()
|
||||
|| transientTaskbarIconLayoutBoundsInParent.isEmpty()
|
||||
|| mNavButtonsView.getWidth() == 0) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user