Ignore public volume state change event when user is null

Bug: 180131005
Test: presubmit
Change-Id: I0ff80646ab1d426b9011386a2843b2587f9296b5
This commit is contained in:
Agatha Man
2021-04-13 16:16:19 +00:00
parent c72ac760e1
commit b851138c0b

View File

@@ -299,7 +299,7 @@ public class StorageNotification extends SystemUI {
// but cause crash when call notifyAsUser(). Here we return directly for USER_NULL, and
// leave all notifications belong to removed user to NotificationManagerService, the latter
// will remove all notifications of the removed user when handles user stopped broadcast.
if (isAutomotive() && vol.getMountUserId() == UserHandle.USER_NULL) {
if (vol.getMountUserId() == UserHandle.USER_NULL) {
Log.d(TAG, "Ignore public volume state change event of removed user");
return;
}