Snap for 7894766 from 87b3974dfd to sc-v2-release
Change-Id: Ib4483d0b03a271ed73f6eaf003891decd1892f0d
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.settings.applications.autofill;
|
||||
|
||||
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
|
||||
import static android.service.autofill.AutofillService.EXTRA_RESULT;
|
||||
|
||||
import static androidx.lifecycle.Lifecycle.Event.ON_CREATE;
|
||||
@@ -133,7 +134,8 @@ public class PasswordsPreferenceController extends BasePreferenceController
|
||||
new Intent(Intent.ACTION_MAIN)
|
||||
.setClassName(
|
||||
serviceInfo.packageName,
|
||||
service.getPasswordsActivity());
|
||||
service.getPasswordsActivity())
|
||||
.setFlags(FLAG_ACTIVITY_NEW_TASK);
|
||||
prefContext.startActivityAsUser(intent, UserHandle.of(user));
|
||||
return true;
|
||||
});
|
||||
|
||||
@@ -188,7 +188,8 @@ public final class BluetoothPairingService extends Service {
|
||||
}
|
||||
|
||||
PendingIntent pairIntent = PendingIntent.getService(this, 0, pairingDialogIntent,
|
||||
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);
|
||||
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_UPDATE_CURRENT
|
||||
| PendingIntent.FLAG_IMMUTABLE);
|
||||
|
||||
Intent serviceIntent = new Intent(ACTION_DISMISS_PAIRING);
|
||||
serviceIntent.setClass(this, BluetoothPairingService.class);
|
||||
|
||||
@@ -178,7 +178,8 @@ public class RedactNotificationPreferenceController extends TogglePreferenceCont
|
||||
|
||||
private boolean getAllowPrivateNotifications(int userId) {
|
||||
return Settings.Secure.getIntForUser(mContext.getContentResolver(),
|
||||
LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, 1, userId) != 0;
|
||||
LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, 1, userId) != 0
|
||||
&& getEnforcedAdmin(userId) == null;
|
||||
}
|
||||
|
||||
private boolean getLockscreenNotificationsEnabled(int userId) {
|
||||
|
||||
@@ -292,6 +292,18 @@ public class RedactNotificationPreferenceControllerTest {
|
||||
assertThat(mWorkController.isChecked()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isChecked_admin() {
|
||||
Settings.Secure.putIntForUser(mContext.getContentResolver(),
|
||||
LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS,
|
||||
1, 0);
|
||||
|
||||
ShadowRestrictedLockUtilsInternal.setKeyguardDisabledFeatures(
|
||||
KEYGUARD_DISABLE_SECURE_NOTIFICATIONS);
|
||||
|
||||
assertThat(mController.isChecked()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setChecked_false() throws Exception {
|
||||
Settings.Secure.putIntForUser(mContext.getContentResolver(),
|
||||
|
||||
Reference in New Issue
Block a user