From b851138c0b96865924dc9d0a408bfa883d78a14f Mon Sep 17 00:00:00 2001 From: Agatha Man Date: Tue, 13 Apr 2021 16:16:19 +0000 Subject: [PATCH] Ignore public volume state change event when user is null Bug: 180131005 Test: presubmit Change-Id: I0ff80646ab1d426b9011386a2843b2587f9296b5 --- .../src/com/android/systemui/usb/StorageNotification.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java index 570202845e869..755372b4b0f54 100644 --- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java +++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java @@ -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; }