diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index 659a9069774ff..ea2cc51f28da6 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -126,6 +126,11 @@
+
+
+
+
> mAdapters = new ArrayList<>();
@@ -94,10 +98,13 @@ public class UserSwitcherController {
filter.addAction(Intent.ACTION_USER_INFO_CHANGED);
filter.addAction(Intent.ACTION_USER_SWITCHED);
filter.addAction(Intent.ACTION_USER_STOPPING);
- filter.addAction(ACTION_REMOVE_GUEST);
mContext.registerReceiverAsUser(mReceiver, UserHandle.OWNER, filter,
null /* permission */, null /* scheduler */);
+ filter = new IntentFilter();
+ filter.addAction(ACTION_REMOVE_GUEST);
+ mContext.registerReceiverAsUser(mReceiver, UserHandle.OWNER, filter,
+ PERMISSION_SELF, null /* scheduler */);
mContext.getContentResolver().registerContentObserver(
Settings.Global.getUriFor(SIMPLE_USER_SWITCHER_GLOBAL_SETTING), true,
@@ -366,8 +373,8 @@ public class UserSwitcherController {
mContext.getString(R.string.guest_notification_remove_action),
removeGuestPI)
.build();
- NotificationManager.from(mContext).notifyAsUser(null, 0, notification,
- new UserHandle(guestUserId));
+ NotificationManager.from(mContext).notifyAsUser(TAG_REMOVE_GUEST, ID_REMOVE_GUEST,
+ notification, new UserHandle(guestUserId));
}
};