From 83b49e06c2d2ee1b2535c3b208ffb70d1931e13f Mon Sep 17 00:00:00 2001 From: josephpv Date: Tue, 16 Jul 2024 14:20:40 +0000 Subject: [PATCH 1/2] Remove Biometric Option from Private Space Lock Setup in Settings With this change when secondary unlock factor for private space is initiated from settings page only the option to set traditional unlock factors will be shown and biometric option will not be shown. User will return to private space unlock settings screen. User should be able to manually set up biometrics form its dedicatated settings entry point after authentication. Recording: b/332850595#comment7 Flag: android.multiuser.modify_private_space_secondary_unlock_setup_flow Bug: 332850595 Test: Manual Change-Id: I8feb8c23300ddb537c428f3675178c5ff49932d1 --- .../onelock/UseOneLockControllerSwitch.java | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/src/com/android/settings/privatespace/onelock/UseOneLockControllerSwitch.java b/src/com/android/settings/privatespace/onelock/UseOneLockControllerSwitch.java index dfac100a522..1e503ecdebb 100644 --- a/src/com/android/settings/privatespace/onelock/UseOneLockControllerSwitch.java +++ b/src/com/android/settings/privatespace/onelock/UseOneLockControllerSwitch.java @@ -16,6 +16,8 @@ package com.android.settings.privatespace.onelock; +import static com.android.settings.password.ChooseLockGeneric.ChooseLockGenericFragment.HIDE_INSECURE_OPTIONS; +import static com.android.settings.password.ChooseLockSettingsHelper.EXTRA_KEY_CHOOSE_LOCK_SCREEN_TITLE; import static com.android.settings.privatespace.PrivateSpaceSetupActivity.EXTRA_ACTION_TYPE; import static com.android.settings.privatespace.PrivateSpaceSetupActivity.SET_LOCK_ACTION; import static com.android.settings.privatespace.onelock.UseOneLockSettingsFragment.UNIFY_PRIVATE_LOCK_WITH_DEVICE_REQUEST; @@ -197,12 +199,7 @@ public class UseOneLockControllerSwitch extends AbstractPreferenceController .setPositiveButton( R.string.private_space_set_lock_label, (dialog, which) -> { - Intent intent = new Intent(mContext, - PrivateProfileContextHelperActivity.class); - intent.putExtra(EXTRA_ACTION_TYPE, SET_LOCK_ACTION); - ((Activity) mContext).startActivityForResultAsUser(intent, - UNUNIFY_PRIVATE_LOCK_FROM_DEVICE_REQUEST, - /*Options*/ null, mUserHandle); + startSeparateLockSetup(); }) .setNegativeButton(R.string.private_space_cancel_label, (DialogInterface dialog, int which) -> { @@ -216,4 +213,26 @@ public class UseOneLockControllerSwitch extends AbstractPreferenceController }) .show(); } + + private void startSeparateLockSetup() { + if (android.multiuser.Flags.modifyPrivateSpaceSecondaryUnlockSetupFlow()) { + final Bundle extras = new Bundle(); + extras.putInt(Intent.EXTRA_USER_ID, mProfileUserId); + extras.putBoolean(HIDE_INSECURE_OPTIONS, true); + extras.putInt(EXTRA_KEY_CHOOSE_LOCK_SCREEN_TITLE, + R.string.private_space_lock_setup_title); + new SubSettingLauncher(mContext).setDestination(ChooseLockGeneric + .ChooseLockGenericFragment.class.getName()) + .setSourceMetricsCategory(mHost.getMetricsCategory()) + .setArguments(extras) + .setExtras(extras) + .setTransitionType(SettingsTransitionHelper.TransitionType.TRANSITION_SLIDE) + .launch(); + } else { + Intent intent = new Intent(mContext, PrivateProfileContextHelperActivity.class); + intent.putExtra(EXTRA_ACTION_TYPE, SET_LOCK_ACTION); + ((Activity) mContext).startActivityForResultAsUser(intent, + UNUNIFY_PRIVATE_LOCK_FROM_DEVICE_REQUEST, /*Options*/ null, mUserHandle); + } + } } From a20aef38cb32a44bb497473397a1431987e7be35 Mon Sep 17 00:00:00 2001 From: Yining Liu Date: Fri, 19 Jul 2024 23:12:25 +0000 Subject: [PATCH 2/2] Update setting text of notification cooldown Update setting text of notification cooldown (also known as adaptive notification, and notification avalanche). Fix: 354052311 Flag: com.android.server.notification.polite_notifications Test: Manual, Settings - Notifications - Notification cooldown Change-Id: Id513350939f12ef5fa7e58c5cbbb3197b259978f --- res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index ec2ff5558b3..d5259a6a450 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -8873,7 +8873,7 @@ Notification cooldown Use notification cooldown - When you receive many notifications within a short time, your device will lower it\u2019s volume and minimize alerts for up to 2 minutes. Calls, alarms, and priority conversations aren\u2019t affected. + When you receive many notifications within a short time, your device will lower its volume and minimize alerts for up to 2 minutes. Calls, alarms, and priority conversations are not affected. \n\nNotifications received during the cooldown can be found by pulling down from the top of the screen. Apply to work profiles Apply to work profile apps