Snap for 12118079 from 5c466c5ba3 to 24Q4-release
Change-Id: I4a10d1fb9994919fc9e998c89e2e6dc7786e4dac
This commit is contained in:
@@ -8873,7 +8873,7 @@
|
|||||||
<!-- Title for Polite Notifications setting [CHAR LIMIT=45]-->
|
<!-- Title for Polite Notifications setting [CHAR LIMIT=45]-->
|
||||||
<string name="notification_polite_title">Notification cooldown</string>
|
<string name="notification_polite_title">Notification cooldown</string>
|
||||||
<string name="notification_polite_main_control_title">Use notification cooldown</string>
|
<string name="notification_polite_main_control_title">Use notification cooldown</string>
|
||||||
<string name="notification_polite_description">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.
|
<string name="notification_polite_description">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.</string>
|
\n\nNotifications received during the cooldown can be found by pulling down from the top of the screen.</string>
|
||||||
<string name="notification_polite_work">Apply to work profiles</string>
|
<string name="notification_polite_work">Apply to work profiles</string>
|
||||||
<string name="notification_polite_work_summary">Apply to work profile apps</string>
|
<string name="notification_polite_work_summary">Apply to work profile apps</string>
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
package com.android.settings.privatespace.onelock;
|
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.EXTRA_ACTION_TYPE;
|
||||||
import static com.android.settings.privatespace.PrivateSpaceSetupActivity.SET_LOCK_ACTION;
|
import static com.android.settings.privatespace.PrivateSpaceSetupActivity.SET_LOCK_ACTION;
|
||||||
import static com.android.settings.privatespace.onelock.UseOneLockSettingsFragment.UNIFY_PRIVATE_LOCK_WITH_DEVICE_REQUEST;
|
import static com.android.settings.privatespace.onelock.UseOneLockSettingsFragment.UNIFY_PRIVATE_LOCK_WITH_DEVICE_REQUEST;
|
||||||
@@ -197,12 +199,7 @@ public class UseOneLockControllerSwitch extends AbstractPreferenceController
|
|||||||
.setPositiveButton(
|
.setPositiveButton(
|
||||||
R.string.private_space_set_lock_label,
|
R.string.private_space_set_lock_label,
|
||||||
(dialog, which) -> {
|
(dialog, which) -> {
|
||||||
Intent intent = new Intent(mContext,
|
startSeparateLockSetup();
|
||||||
PrivateProfileContextHelperActivity.class);
|
|
||||||
intent.putExtra(EXTRA_ACTION_TYPE, SET_LOCK_ACTION);
|
|
||||||
((Activity) mContext).startActivityForResultAsUser(intent,
|
|
||||||
UNUNIFY_PRIVATE_LOCK_FROM_DEVICE_REQUEST,
|
|
||||||
/*Options*/ null, mUserHandle);
|
|
||||||
})
|
})
|
||||||
.setNegativeButton(R.string.private_space_cancel_label,
|
.setNegativeButton(R.string.private_space_cancel_label,
|
||||||
(DialogInterface dialog, int which) -> {
|
(DialogInterface dialog, int which) -> {
|
||||||
@@ -216,4 +213,26 @@ public class UseOneLockControllerSwitch extends AbstractPreferenceController
|
|||||||
})
|
})
|
||||||
.show();
|
.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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user