From 0ce3c477dde87a68c12b25767e97320c56e02021 Mon Sep 17 00:00:00 2001 From: Heemin Seog Date: Sat, 18 Apr 2020 10:13:29 -0700 Subject: [PATCH] Register callback outside of constructor This object is still constructed for CarSystemUI, because it is injected by dagger at some point in the complicated dependency chain. This causes some crashes when we try to remove some of the phone specific layouts from our codebase. Bug: 154391045 Test: manual (flash + try keyguard in sdk_gphone_x86 and hawk), atest SystemUITests Change-Id: Ie272606c54ed632539feab46ddfb85236ac7944a --- .../systemui/statusbar/NotificationViewHierarchyManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java index 37fc13e2df5be..afb50027f03de 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java @@ -123,7 +123,6 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle res.getBoolean(R.bool.config_alwaysExpandNonGroupedNotifications); mBubbleController = bubbleController; mDynamicPrivacyController = privacyController; - privacyController.addListener(this); mDynamicChildBindController = dynamicChildBindController; } @@ -131,6 +130,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle NotificationListContainer listContainer) { mPresenter = presenter; mListContainer = listContainer; + mDynamicPrivacyController.addListener(this); } /**