Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +11 −14 Original line number Diff line number Diff line Loading @@ -506,23 +506,11 @@ public class NotificationPanelViewController extends PanelViewController { mPanelAlphaAnimator.getProperty(), Interpolators.ALPHA_IN); private final NotificationEntryManager mEntryManager; private final CommunalSourceMonitor.Callback mCommunalSourceMonitorCallback = new CommunalSourceMonitor.Callback() { @Override public void onSourceAvailable(WeakReference<CommunalSource> source) { setCommunalSource(source); } }; private final CommunalSourceMonitor.Callback mCommunalSourceMonitorCallback; private WeakReference<CommunalSource> mCommunalSource; private final CommunalSource.Callback mCommunalSourceCallback = new CommunalSource.Callback() { @Override public void onDisconnected() { setCommunalSource(null /*source*/); } }; private final CommunalSource.Callback mCommunalSourceCallback; private final CommandQueue mCommandQueue; private final NotificationLockscreenUserManager mLockscreenUserManager; Loading Loading @@ -904,6 +892,15 @@ public class NotificationPanelViewController extends PanelViewController { mMaxKeyguardNotifications = resources.getInteger(R.integer.keyguard_max_notification_count); mKeyguardUnfoldTransition = unfoldComponent.map(c -> c.getKeyguardUnfoldTransition()); mCommunalSourceCallback = () -> { mUiExecutor.execute(() -> setCommunalSource(null /*source*/)); }; mCommunalSourceMonitorCallback = (source) -> { mUiExecutor.execute(() -> setCommunalSource(source)); }; updateUserSwitcherFlags(); onFinishInflate(); } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java +3 −1 Original line number Diff line number Diff line Loading @@ -358,6 +358,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { private NotificationsQuickSettingsContainer mNotificationContainerParent; private List<View.OnAttachStateChangeListener> mOnAttachStateChangeListeners; private FalsingManagerFake mFalsingManager = new FalsingManagerFake(); private FakeExecutor mExecutor = new FakeExecutor(new FakeSystemClock()); @Before public void setup() { Loading Loading @@ -511,7 +512,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { mQuickAccessWalletController, mQrCodeScannerController, mRecordingController, new FakeExecutor(new FakeSystemClock()), mExecutor, mSecureSettings, mSplitShadeHeaderController, mUnlockedScreenOffAnimationController, Loading Loading @@ -936,6 +937,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { ArgumentCaptor.forClass(WeakReference.class); monitorCallback.getValue().onSourceAvailable(new WeakReference<>(mCommunalSource)); mExecutor.runAllReady(); verify(mCommunalHostViewController).show(sourceCapture.capture()); assertThat(sourceCapture.getValue().get()).isEqualTo(mCommunalSource); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +11 −14 Original line number Diff line number Diff line Loading @@ -506,23 +506,11 @@ public class NotificationPanelViewController extends PanelViewController { mPanelAlphaAnimator.getProperty(), Interpolators.ALPHA_IN); private final NotificationEntryManager mEntryManager; private final CommunalSourceMonitor.Callback mCommunalSourceMonitorCallback = new CommunalSourceMonitor.Callback() { @Override public void onSourceAvailable(WeakReference<CommunalSource> source) { setCommunalSource(source); } }; private final CommunalSourceMonitor.Callback mCommunalSourceMonitorCallback; private WeakReference<CommunalSource> mCommunalSource; private final CommunalSource.Callback mCommunalSourceCallback = new CommunalSource.Callback() { @Override public void onDisconnected() { setCommunalSource(null /*source*/); } }; private final CommunalSource.Callback mCommunalSourceCallback; private final CommandQueue mCommandQueue; private final NotificationLockscreenUserManager mLockscreenUserManager; Loading Loading @@ -904,6 +892,15 @@ public class NotificationPanelViewController extends PanelViewController { mMaxKeyguardNotifications = resources.getInteger(R.integer.keyguard_max_notification_count); mKeyguardUnfoldTransition = unfoldComponent.map(c -> c.getKeyguardUnfoldTransition()); mCommunalSourceCallback = () -> { mUiExecutor.execute(() -> setCommunalSource(null /*source*/)); }; mCommunalSourceMonitorCallback = (source) -> { mUiExecutor.execute(() -> setCommunalSource(source)); }; updateUserSwitcherFlags(); onFinishInflate(); } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java +3 −1 Original line number Diff line number Diff line Loading @@ -358,6 +358,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { private NotificationsQuickSettingsContainer mNotificationContainerParent; private List<View.OnAttachStateChangeListener> mOnAttachStateChangeListeners; private FalsingManagerFake mFalsingManager = new FalsingManagerFake(); private FakeExecutor mExecutor = new FakeExecutor(new FakeSystemClock()); @Before public void setup() { Loading Loading @@ -511,7 +512,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { mQuickAccessWalletController, mQrCodeScannerController, mRecordingController, new FakeExecutor(new FakeSystemClock()), mExecutor, mSecureSettings, mSplitShadeHeaderController, mUnlockedScreenOffAnimationController, Loading Loading @@ -936,6 +937,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { ArgumentCaptor.forClass(WeakReference.class); monitorCallback.getValue().onSourceAvailable(new WeakReference<>(mCommunalSource)); mExecutor.runAllReady(); verify(mCommunalHostViewController).show(sourceCapture.capture()); assertThat(sourceCapture.getValue().get()).isEqualTo(mCommunalSource); Loading