Loading core/java/android/provider/Settings.java +9 −0 Original line number Diff line number Diff line Loading @@ -17058,6 +17058,15 @@ public final class Settings { */ public static final String CLOCKWORK_SYSUI_MAIN_ACTIVITY = "clockwork_sysui_main_activity"; /** * Setting to disable power button long press launching Assistant. It's boolean, i.e. * enabled = 1, disabled = 0. By default, this setting is enabled. * * @hide */ public static final String CLOCKWORK_LONG_PRESS_TO_ASSISTANT_ENABLED = "clockwork_long_press_to_assistant_enabled"; } } core/java/com/android/internal/policy/IKeyguardService.aidl +15 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package com.android.internal.policy; import android.content.Intent; import com.android.internal.policy.IKeyguardDrawnCallback; import com.android.internal.policy.IKeyguardDismissCallback; import com.android.internal.policy.IKeyguardStateCallback; Loading Loading @@ -113,7 +114,20 @@ oneway interface IKeyguardService { /** * Notifies the Keyguard that the power key was pressed while locked and launched Home rather * than putting the device to sleep or waking up. * than putting the device to sleep or waking up. Note that it's called only if the device is * interactive. */ void onShortPowerPressedGoHome(); /** * Notifies the Keyguard that it needs to bring up a bouncer and then launch the intent as soon * as user unlocks the watch. */ void dismissKeyguardToLaunch(in Intent intentToLaunch); /** * Notifies the Keyguard that a key was pressed while locked so the Keyguard can handle it. * Note that it's called only if the device is interactive. */ void onSystemKeyPressed(int keycode); } packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -657,6 +657,7 @@ public class SettingsBackupTest { Settings.Global.Wearable.WRIST_ORIENTATION_MODE, Settings.Global.Wearable.CLOCKWORK_SYSUI_PACKAGE, Settings.Global.Wearable.CLOCKWORK_SYSUI_MAIN_ACTIVITY, Settings.Global.Wearable.CLOCKWORK_LONG_PRESS_TO_ASSISTANT_ENABLED, Settings.Global.Wearable.WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_SET_BY_USER); private static final Set<String> BACKUP_DENY_LIST_SECURE_SETTINGS = Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +12 −0 Original line number Diff line number Diff line Loading @@ -583,6 +583,18 @@ public class KeyguardService extends Service { checkPermission(); mKeyguardViewMediator.onShortPowerPressedGoHome(); } @Override public void dismissKeyguardToLaunch(Intent intentToLaunch) { checkPermission(); mKeyguardViewMediator.dismissKeyguardToLaunch(intentToLaunch); } @Override public void onSystemKeyPressed(int keycode) { checkPermission(); mKeyguardViewMediator.onSystemKeyPressed(keycode); } }; } packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +8 −0 Original line number Diff line number Diff line Loading @@ -2750,6 +2750,14 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, // do nothing } public void dismissKeyguardToLaunch(Intent intentToLaunch) { // do nothing } public void onSystemKeyPressed(int keycode) { // do nothing } public ViewMediatorCallback getViewMediatorCallback() { return mViewMediatorCallback; } Loading Loading
core/java/android/provider/Settings.java +9 −0 Original line number Diff line number Diff line Loading @@ -17058,6 +17058,15 @@ public final class Settings { */ public static final String CLOCKWORK_SYSUI_MAIN_ACTIVITY = "clockwork_sysui_main_activity"; /** * Setting to disable power button long press launching Assistant. It's boolean, i.e. * enabled = 1, disabled = 0. By default, this setting is enabled. * * @hide */ public static final String CLOCKWORK_LONG_PRESS_TO_ASSISTANT_ENABLED = "clockwork_long_press_to_assistant_enabled"; } }
core/java/com/android/internal/policy/IKeyguardService.aidl +15 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package com.android.internal.policy; import android.content.Intent; import com.android.internal.policy.IKeyguardDrawnCallback; import com.android.internal.policy.IKeyguardDismissCallback; import com.android.internal.policy.IKeyguardStateCallback; Loading Loading @@ -113,7 +114,20 @@ oneway interface IKeyguardService { /** * Notifies the Keyguard that the power key was pressed while locked and launched Home rather * than putting the device to sleep or waking up. * than putting the device to sleep or waking up. Note that it's called only if the device is * interactive. */ void onShortPowerPressedGoHome(); /** * Notifies the Keyguard that it needs to bring up a bouncer and then launch the intent as soon * as user unlocks the watch. */ void dismissKeyguardToLaunch(in Intent intentToLaunch); /** * Notifies the Keyguard that a key was pressed while locked so the Keyguard can handle it. * Note that it's called only if the device is interactive. */ void onSystemKeyPressed(int keycode); }
packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -657,6 +657,7 @@ public class SettingsBackupTest { Settings.Global.Wearable.WRIST_ORIENTATION_MODE, Settings.Global.Wearable.CLOCKWORK_SYSUI_PACKAGE, Settings.Global.Wearable.CLOCKWORK_SYSUI_MAIN_ACTIVITY, Settings.Global.Wearable.CLOCKWORK_LONG_PRESS_TO_ASSISTANT_ENABLED, Settings.Global.Wearable.WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_SET_BY_USER); private static final Set<String> BACKUP_DENY_LIST_SECURE_SETTINGS = Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +12 −0 Original line number Diff line number Diff line Loading @@ -583,6 +583,18 @@ public class KeyguardService extends Service { checkPermission(); mKeyguardViewMediator.onShortPowerPressedGoHome(); } @Override public void dismissKeyguardToLaunch(Intent intentToLaunch) { checkPermission(); mKeyguardViewMediator.dismissKeyguardToLaunch(intentToLaunch); } @Override public void onSystemKeyPressed(int keycode) { checkPermission(); mKeyguardViewMediator.onSystemKeyPressed(keycode); } }; }
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +8 −0 Original line number Diff line number Diff line Loading @@ -2750,6 +2750,14 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, // do nothing } public void dismissKeyguardToLaunch(Intent intentToLaunch) { // do nothing } public void onSystemKeyPressed(int keycode) { // do nothing } public ViewMediatorCallback getViewMediatorCallback() { return mViewMediatorCallback; } Loading