Show global actions instead of assistant for LPP in setup wizard
Assistant can't be opened during device setup, and new users may not
know how to get to the power menu if LPP is assigned to the assistant,
so this ensures they can find a way to turn off or reboot the device.
Bug: 190432896
Test: Ensure LPP is configured to start the assistant. Then,
adb shell settings put global device_provisioned 0
and LPP should open global actions, then
adb shell settings put global device_provisioned 1
and it should be the assistant again.
Test: Also test using the actual setup wizard flow.
Change-Id: Ida693297a03d0eda08b557078868de77f3902e2d
This commit is contained in:
@@ -1181,6 +1181,13 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
if (FactoryTest.isLongPressOnPowerOffEnabled()) {
|
||||
return LONG_PRESS_POWER_SHUT_OFF_NO_CONFIRM;
|
||||
}
|
||||
|
||||
// If the config indicates the assistant behavior but the device isn't yet provisioned, show
|
||||
// global actions instead.
|
||||
if (mLongPressOnPowerBehavior == LONG_PRESS_POWER_ASSISTANT && !isDeviceProvisioned()) {
|
||||
return LONG_PRESS_POWER_GLOBAL_ACTIONS;
|
||||
}
|
||||
|
||||
return mLongPressOnPowerBehavior;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user