From 5fbc899581c6b912fdd4288a8109a7f53fc3c3d7 Mon Sep 17 00:00:00 2001 From: Brad Hinegardner Date: Thu, 11 May 2023 20:59:45 +0000 Subject: [PATCH] Default lockscreen customization on AOSP to disabled This also defaults the long-press on keyguard to false Bug: b/280968035 Test: atest KeyguardBottomAreaViewModelTest Change-Id: I13f5f498971cbc0a179892881580107e6780419b --- .../SystemUI/docs/device-entry/keyguard.md | 4 ++++ .../docs/device-entry/quickaffordance.md | 4 +++- packages/SystemUI/res/values/config.xml | 6 +++++ .../interactor/KeyguardLongPressInteractor.kt | 6 ++++- .../KeyguardQuickAffordanceInteractor.kt | 7 +++++- .../keyguard/CustomizationProviderTest.kt | 11 ++++++++++ .../KeyguardLongPressInteractorTest.kt | 22 +++++++++++++++++++ ...ckAffordanceInteractorParameterizedTest.kt | 1 + .../KeyguardQuickAffordanceInteractorTest.kt | 1 + .../KeyguardBottomAreaViewModelTest.kt | 2 ++ 10 files changed, 61 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/docs/device-entry/keyguard.md b/packages/SystemUI/docs/device-entry/keyguard.md index 8634c950f96cb..1898b97ee1caa 100644 --- a/packages/SystemUI/docs/device-entry/keyguard.md +++ b/packages/SystemUI/docs/device-entry/keyguard.md @@ -20,6 +20,10 @@ Begins with the device in low power mode, with the display active for [AOD][3] o An indication to power off the device most likely comes from one of two signals: the user presses the power button or the screen timeout has passed. This may [lock the device](#How-the-device-locks) +#### Long-pressing on keyguard + +OEMs may choose to enable a long-press action that displays a button at the bottom of lockscreen. This button links to lockscreen customization. This can be achieved by overriding the `long_press_keyguard_customize_lockscreen_enabled` resource in `packages/SystemUI/res/values/config.xml`. + #### On Lockscreen #### On Lockscreen, occluded by an activity diff --git a/packages/SystemUI/docs/device-entry/quickaffordance.md b/packages/SystemUI/docs/device-entry/quickaffordance.md index d662649ac419a..afcf846ba2e5b 100644 --- a/packages/SystemUI/docs/device-entry/quickaffordance.md +++ b/packages/SystemUI/docs/device-entry/quickaffordance.md @@ -17,7 +17,9 @@ Tests belong in the `packages/SystemUI/tests/src/com/android/systemui/keyguard/d By default, AOSP ships with a "bottom right" and a "bottom left" slot, each with a slot capacity of `1`, allowing only one Quick Affordance on each side of the lock screen. ### Customizing Slots -OEMs may choose to override the IDs and number of slots and/or override the default capacities. This can be achieved by overridding the `config_keyguardQuickAffordanceSlots` resource in `packages/SystemUI/res/values/config.xml`. +OEMs may choose to enable customization of slots. An entry point in settings will appear when overriding the `custom_lockscreen_shortcuts_enabled` resource in `packages/SystemUI/res/values/config.xml`. + +OEMs may also choose to override the IDs and number of slots and/or override the default capacities. This can be achieved by overridding the `config_keyguardQuickAffordanceSlots` resource in `packages/SystemUI/res/values/config.xml`. ### Default Quick Affordances OEMs may also choose to predefine default Quick Affordances for each slot. To achieve this, a developer may override the `config_keyguardQuickAffordanceDefaults` resource in `packages/SystemUI/res/values/config.xml`. Note that defaults only work until the user of the device selects a different quick affordance for that slot, even if they select the "None" option. diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 26d687588263c..958e287246591 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -44,6 +44,12 @@ 0 + + false + + + false + false