diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index f3b8c7e3e209f..a2421355e8685 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -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; }