Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +3 −13 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ import javax.inject.Named; * A layout which handles a dynamic amount of notifications and presents them in a scrollable stack. */ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAdapter, ConfigurationListener, Dumpable, DynamicPrivacyController.Listener { ConfigurationListener, Dumpable { public static final float BACKGROUND_ALPHA_DIMMED = 0.7f; private static final String TAG = "StackScroller"; Loading Loading @@ -667,7 +667,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd }); } dynamicPrivacyController.addListener(this); mDynamicPrivacyController = dynamicPrivacyController; mStatusbarStateController = statusBarStateController; initializeForegroundServiceSection(fgsFeatureController); Loading Loading @@ -5841,17 +5840,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd mDimmedNeedsAnimation = true; } @Override public void onDynamicPrivacyChanged() { if (mIsExpanded) { // The bottom might change because we're using the final actual height of the view mAnimateBottomOnLayout = true; } // Let's update the footer once the notifications have been updated (in the next frame) post(() -> { updateFooter(); updateSectionBoundaries("dynamic privacy changed"); }); void setAnimateBottomOnLayout(boolean animateBottomOnLayout) { mAnimateBottomOnLayout = animateBottomOnLayout; } public void setOnPulseHeightChangedListener(Runnable listener) { Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +19 −2 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.systemui.statusbar.notification.stack; import static com.android.systemui.Dependency.ALLOW_NOTIFICATION_LONG_PRESS_NAME; import static com.android.systemui.statusbar.phone.NotificationIconAreaController.HIGH_PRIORITY; import android.graphics.PointF; import android.provider.Settings; Loading @@ -31,6 +30,7 @@ import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper; import com.android.systemui.statusbar.NotificationShelfController; import com.android.systemui.statusbar.RemoteInputController; import com.android.systemui.statusbar.notification.ActivityLaunchAnimator; import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.NotificationActivityStarter; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.logging.NotificationLogger; Loading Loading @@ -63,22 +63,37 @@ public class NotificationStackScrollLayoutController { private final HeadsUpManagerPhone mHeadsUpManager; private final NotificationRoundnessManager mNotificationRoundnessManager; private final TunerService mTunerService; private final DynamicPrivacyController mDynamicPrivacyController; private final NotificationListContainerImpl mNotificationListContainer = new NotificationListContainerImpl(); private NotificationStackScrollLayout mView; private final DynamicPrivacyController.Listener mDynamicPrivacyControllerListener = () -> { if (mView.isExpanded()) { // The bottom might change because we're using the final actual height of the view mView.setAnimateBottomOnLayout(true); } // Let's update the footer once the notifications have been updated (in the next frame) mView.post(() -> { updateFooter(); updateSectionBoundaries("dynamic privacy changed"); }); }; @Inject public NotificationStackScrollLayoutController( @Named(ALLOW_NOTIFICATION_LONG_PRESS_NAME) boolean allowLongPress, NotificationGutsManager notificationGutsManager, HeadsUpManagerPhone headsUpManager, NotificationRoundnessManager notificationRoundnessManager, TunerService tunerService) { TunerService tunerService, DynamicPrivacyController dynamicPrivacyController) { mAllowLongPress = allowLongPress; mNotificationGutsManager = notificationGutsManager; mHeadsUpManager = headsUpManager; mNotificationRoundnessManager = notificationRoundnessManager; mTunerService = tunerService; mDynamicPrivacyController = dynamicPrivacyController; } public void attach(NotificationStackScrollLayout view) { Loading @@ -91,6 +106,8 @@ public class NotificationStackScrollLayoutController { mHeadsUpManager.addListener(mNotificationRoundnessManager); // TODO: why is this here? mDynamicPrivacyController.addListener(mDynamicPrivacyControllerListener); mNotificationRoundnessManager.setOnRoundingChangedCallback(mView::invalidate); mView.addOnExpandedHeightChangedListener(mNotificationRoundnessManager::setExpanded); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +3 −13 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ import javax.inject.Named; * A layout which handles a dynamic amount of notifications and presents them in a scrollable stack. */ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAdapter, ConfigurationListener, Dumpable, DynamicPrivacyController.Listener { ConfigurationListener, Dumpable { public static final float BACKGROUND_ALPHA_DIMMED = 0.7f; private static final String TAG = "StackScroller"; Loading Loading @@ -667,7 +667,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd }); } dynamicPrivacyController.addListener(this); mDynamicPrivacyController = dynamicPrivacyController; mStatusbarStateController = statusBarStateController; initializeForegroundServiceSection(fgsFeatureController); Loading Loading @@ -5841,17 +5840,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd mDimmedNeedsAnimation = true; } @Override public void onDynamicPrivacyChanged() { if (mIsExpanded) { // The bottom might change because we're using the final actual height of the view mAnimateBottomOnLayout = true; } // Let's update the footer once the notifications have been updated (in the next frame) post(() -> { updateFooter(); updateSectionBoundaries("dynamic privacy changed"); }); void setAnimateBottomOnLayout(boolean animateBottomOnLayout) { mAnimateBottomOnLayout = animateBottomOnLayout; } public void setOnPulseHeightChangedListener(Runnable listener) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +19 −2 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.systemui.statusbar.notification.stack; import static com.android.systemui.Dependency.ALLOW_NOTIFICATION_LONG_PRESS_NAME; import static com.android.systemui.statusbar.phone.NotificationIconAreaController.HIGH_PRIORITY; import android.graphics.PointF; import android.provider.Settings; Loading @@ -31,6 +30,7 @@ import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper; import com.android.systemui.statusbar.NotificationShelfController; import com.android.systemui.statusbar.RemoteInputController; import com.android.systemui.statusbar.notification.ActivityLaunchAnimator; import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.NotificationActivityStarter; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.logging.NotificationLogger; Loading Loading @@ -63,22 +63,37 @@ public class NotificationStackScrollLayoutController { private final HeadsUpManagerPhone mHeadsUpManager; private final NotificationRoundnessManager mNotificationRoundnessManager; private final TunerService mTunerService; private final DynamicPrivacyController mDynamicPrivacyController; private final NotificationListContainerImpl mNotificationListContainer = new NotificationListContainerImpl(); private NotificationStackScrollLayout mView; private final DynamicPrivacyController.Listener mDynamicPrivacyControllerListener = () -> { if (mView.isExpanded()) { // The bottom might change because we're using the final actual height of the view mView.setAnimateBottomOnLayout(true); } // Let's update the footer once the notifications have been updated (in the next frame) mView.post(() -> { updateFooter(); updateSectionBoundaries("dynamic privacy changed"); }); }; @Inject public NotificationStackScrollLayoutController( @Named(ALLOW_NOTIFICATION_LONG_PRESS_NAME) boolean allowLongPress, NotificationGutsManager notificationGutsManager, HeadsUpManagerPhone headsUpManager, NotificationRoundnessManager notificationRoundnessManager, TunerService tunerService) { TunerService tunerService, DynamicPrivacyController dynamicPrivacyController) { mAllowLongPress = allowLongPress; mNotificationGutsManager = notificationGutsManager; mHeadsUpManager = headsUpManager; mNotificationRoundnessManager = notificationRoundnessManager; mTunerService = tunerService; mDynamicPrivacyController = dynamicPrivacyController; } public void attach(NotificationStackScrollLayout view) { Loading @@ -91,6 +106,8 @@ public class NotificationStackScrollLayoutController { mHeadsUpManager.addListener(mNotificationRoundnessManager); // TODO: why is this here? mDynamicPrivacyController.addListener(mDynamicPrivacyControllerListener); mNotificationRoundnessManager.setOnRoundingChangedCallback(mView::invalidate); mView.addOnExpandedHeightChangedListener(mNotificationRoundnessManager::setExpanded); Loading