Ensure back button shows up in Simple View for SUW
This change adds support for the dynamic changing of navigation modes in SUW such that the back button will be visible in both states. Previously there was no way to switch navigation modes during Setup Wizard, before the introduction of Simple View. The buttons were not being drawn correctly (or at all). Fix: 381016997 Fix: 381363853 Test: Rerun SUW, enable simple view and ensure that the back buttons works in both orientations and that the SUW buttons are unaffected Flag: EXEMPT bugfix Change-Id: Ifbdf0c9cd06f1347e6c2c9a943711cefbf6bff2c
This commit is contained in:
1 parent
4b40d05ebb
commit
850ee61de6
5 files changed
+56
-72
No files matched your search
@@ -66,7 +66,7 @@ class NavButtonLayoutFactory {
|
||||
isInSetup: Boolean,
|
||||
isThreeButtonNav: Boolean,
|
||||
phoneMode: Boolean,
|
||||
@Rotation surfaceRotation: Int
|
||||
@Rotation surfaceRotation: Int,
|
||||
): NavButtonLayoutter {
|
||||
val navButtonContainer =
|
||||
navButtonsView.requireViewById<LinearLayout>(ID_END_NAV_BUTTONS)
|
||||
@@ -77,6 +77,18 @@ class NavButtonLayoutFactory {
|
||||
val isPhoneNavMode = phoneMode && isThreeButtonNav
|
||||
val isPhoneGestureMode = phoneMode && !isThreeButtonNav
|
||||
return when {
|
||||
isInSetup -> {
|
||||
SetupNavLayoutter(
|
||||
resources,
|
||||
navButtonsView,
|
||||
navButtonContainer,
|
||||
endContextualContainer,
|
||||
startContextualContainer,
|
||||
imeSwitcher,
|
||||
a11yButton,
|
||||
space,
|
||||
)
|
||||
}
|
||||
isPhoneNavMode -> {
|
||||
if (!deviceProfile.isLandscape) {
|
||||
navButtonsView.setIsVertical(false)
|
||||
@@ -87,7 +99,7 @@ class NavButtonLayoutFactory {
|
||||
startContextualContainer,
|
||||
imeSwitcher,
|
||||
a11yButton,
|
||||
space
|
||||
space,
|
||||
)
|
||||
} else if (surfaceRotation == ROTATION_90) {
|
||||
navButtonsView.setIsVertical(true)
|
||||
@@ -98,7 +110,7 @@ class NavButtonLayoutFactory {
|
||||
startContextualContainer,
|
||||
imeSwitcher,
|
||||
a11yButton,
|
||||
space
|
||||
space,
|
||||
)
|
||||
} else {
|
||||
navButtonsView.setIsVertical(true)
|
||||
@@ -109,36 +121,23 @@ class NavButtonLayoutFactory {
|
||||
startContextualContainer,
|
||||
imeSwitcher,
|
||||
a11yButton,
|
||||
space
|
||||
space,
|
||||
)
|
||||
}
|
||||
}
|
||||
isPhoneGestureMode -> {
|
||||
PhoneGestureLayoutter(
|
||||
resources,
|
||||
navButtonsView,
|
||||
navButtonContainer,
|
||||
endContextualContainer,
|
||||
startContextualContainer,
|
||||
imeSwitcher,
|
||||
a11yButton,
|
||||
space
|
||||
space,
|
||||
)
|
||||
}
|
||||
deviceProfile.isTaskbarPresent -> {
|
||||
return when {
|
||||
isInSetup -> {
|
||||
SetupNavLayoutter(
|
||||
resources,
|
||||
navButtonsView,
|
||||
navButtonContainer,
|
||||
endContextualContainer,
|
||||
startContextualContainer,
|
||||
imeSwitcher,
|
||||
a11yButton,
|
||||
space
|
||||
)
|
||||
}
|
||||
isKidsMode -> {
|
||||
KidsNavLayoutter(
|
||||
resources,
|
||||
@@ -147,7 +146,7 @@ class NavButtonLayoutFactory {
|
||||
startContextualContainer,
|
||||
imeSwitcher,
|
||||
a11yButton,
|
||||
space
|
||||
space,
|
||||
)
|
||||
}
|
||||
else ->
|
||||
@@ -158,7 +157,7 @@ class NavButtonLayoutFactory {
|
||||
startContextualContainer,
|
||||
imeSwitcher,
|
||||
a11yButton,
|
||||
space
|
||||
space,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user