Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +99 −159 Original line number Diff line number Diff line Loading @@ -40,8 +40,6 @@ import static com.android.systemui.statusbar.phone.panelstate.PanelExpansionStat import static com.android.systemui.statusbar.phone.panelstate.PanelExpansionStateManagerKt.STATE_OPENING; import static com.android.systemui.util.DumpUtilsKt.asIndenting; import static java.lang.Float.isNaN; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; Loading @@ -50,13 +48,13 @@ import android.app.ActivityManager; import android.app.Fragment; import android.app.StatusBarManager; import android.content.ContentResolver; import android.content.res.Resources; import android.database.ContentObserver; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.ColorFilter; import android.graphics.Insets; import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.PointF; import android.graphics.Rect; import android.graphics.Region; Loading @@ -79,6 +77,7 @@ import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.View; import android.view.View.AccessibilityDelegate; import android.view.ViewGroup; import android.view.ViewPropertyAnimator; import android.view.ViewStub; Loading Loading @@ -195,7 +194,6 @@ import com.android.systemui.util.Compile; import com.android.systemui.util.LargeScreenUtils; import com.android.systemui.util.ListenerSet; import com.android.systemui.util.Utils; import com.android.systemui.util.settings.SecureSettings; import com.android.systemui.util.time.SystemClock; import com.android.systemui.wallet.controller.QuickAccessWalletController; import com.android.wm.shell.animation.FlingAnimationUtils; Loading @@ -207,14 +205,13 @@ import java.util.HashSet; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.concurrent.Executor; import java.util.function.Consumer; import javax.inject.Inject; import javax.inject.Provider; @CentralSurfacesComponent.CentralSurfacesScope public class NotificationPanelViewController extends PanelViewController { public final class NotificationPanelViewController extends PanelViewController { private static final boolean DEBUG_LOGCAT = Compile.IS_DEBUG && Log.isLoggable(TAG, Log.DEBUG); private static final boolean SPEW_LOGCAT = Compile.IS_DEBUG && Log.isLoggable(TAG, Log.VERBOSE); Loading Loading @@ -260,7 +257,8 @@ public class NotificationPanelViewController extends PanelViewController { private final ConfigurationListener mConfigurationListener = new ConfigurationListener(); private final SettingsChangeObserver mSettingsChangeObserver; @VisibleForTesting final StatusBarStateListener mStatusBarStateListener = @VisibleForTesting final StatusBarStateListener mStatusBarStateListener = new StatusBarStateListener(); private final NotificationPanelView mView; private final VibratorHelper mVibratorHelper; Loading Loading @@ -332,19 +330,20 @@ public class NotificationPanelViewController extends PanelViewController { private KeyguardUserSwitcherController mKeyguardUserSwitcherController; private KeyguardStatusBarView mKeyguardStatusBar; private KeyguardStatusBarViewController mKeyguardStatusBarViewController; @VisibleForTesting QS mQs; @VisibleForTesting QS mQs; private FrameLayout mQsFrame; private QsFrameTranslateController mQsFrameTranslateController; private final QsFrameTranslateController mQsFrameTranslateController; private KeyguardStatusViewController mKeyguardStatusViewController; private LockIconViewController mLockIconViewController; private final LockIconViewController mLockIconViewController; private NotificationsQuickSettingsContainer mNotificationContainerParent; private NotificationsQSContainerController mNotificationsQSContainerController; private final NotificationsQSContainerController mNotificationsQSContainerController; private final Provider<KeyguardBottomAreaViewController> mKeyguardBottomAreaViewControllerProvider; private boolean mAnimateNextPositionUpdate; private float mQuickQsHeaderHeight; private ScreenOffAnimationController mScreenOffAnimationController; private UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController; private final ScreenOffAnimationController mScreenOffAnimationController; private final UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController; private int mTrackingPointer; private VelocityTracker mQsVelocityTracker; Loading Loading @@ -397,12 +396,6 @@ public class NotificationPanelViewController extends PanelViewController { private int mLargeScreenShadeHeaderHeight; private int mSplitShadeNotificationsScrimMarginBottom; /** * Vertical overlap allowed between the bottom of the notification shelf and * the top of the lock icon or the under-display fingerprint sensor background. */ private int mShelfAndLockIconOverlap; private final KeyguardClockPositionAlgorithm mClockPositionAlgorithm = new KeyguardClockPositionAlgorithm(); Loading @@ -417,7 +410,8 @@ public class NotificationPanelViewController extends PanelViewController { * Determines if QS should be already expanded when expanding shade. * Used for split shade, two finger gesture as well as accessibility shortcut to QS. */ @VisibleForTesting boolean mQsExpandImmediate; @VisibleForTesting boolean mQsExpandImmediate; private boolean mTwoFingerQsExpandPossible; private String mHeaderDebugInfo; Loading @@ -439,14 +433,13 @@ public class NotificationPanelViewController extends PanelViewController { private int mNavigationBarBottomHeight; private boolean mExpandingFromHeadsUp; private boolean mCollapsedOnDown; private int mPositionMinSideMargin; private boolean mClosingWithAlphaFadeOut; private boolean mHeadsUpAnimatingAway; private boolean mLaunchingAffordance; private final FalsingManager mFalsingManager; private final FalsingCollector mFalsingCollector; private Runnable mHeadsUpExistenceChangedRunnable = () -> { private final Runnable mHeadsUpExistenceChangedRunnable = () -> { setHeadsUpAnimatingAway(false); updatePanelExpansionAndVisibility(); }; Loading @@ -456,9 +449,6 @@ public class NotificationPanelViewController extends PanelViewController { private boolean mIsFullWidth; private boolean mBlockingExpansionForCurrentTouch; // TODO (b/204204226): no longer needed once refactor is complete private final boolean mUseCombinedQSHeaders; /** * Following variables maintain state of events when input focus transfer may occur. */ Loading Loading @@ -514,19 +504,10 @@ public class NotificationPanelViewController extends PanelViewController { private final MediaDataManager mMediaDataManager; private final SysUiState mSysUiState; private NotificationShadeDepthController mDepthController; private int mDisplayId; private final NotificationShadeDepthController mDepthController; private final int mDisplayId; /** * Cache the resource id of the theme to avoid unnecessary work in onThemeChanged. * * onThemeChanged is forced when the theme might not have changed. So, to avoid unncessary * work, check the current id with the cached id. */ private int mThemeResId; private KeyguardIndicationController mKeyguardIndicationController; private int mShelfHeight; private int mDarkIconSize; private int mHeadsUpInset; private boolean mHeadsUpPinnedMode; private boolean mAllowExpandForSmallExpansion; Loading Loading @@ -640,15 +621,12 @@ public class NotificationPanelViewController extends PanelViewController { private final ContentResolver mContentResolver; private float mMinFraction; private final Executor mUiExecutor; private final SecureSettings mSecureSettings; private KeyguardMediaController mKeyguardMediaController; private final KeyguardMediaController mKeyguardMediaController; private boolean mStatusViewCentered = true; private Optional<KeyguardUnfoldTransition> mKeyguardUnfoldTransition; private Optional<NotificationPanelUnfoldAnimationController> private final Optional<KeyguardUnfoldTransition> mKeyguardUnfoldTransition; private final Optional<NotificationPanelUnfoldAnimationController> mNotificationPanelUnfoldAnimationController; /** The drag distance required to fully expand the split shade. */ Loading @@ -659,9 +637,13 @@ public class NotificationPanelViewController extends PanelViewController { private final NPVCDownEventState.Buffer mLastDownEvents; private View.AccessibilityDelegate mAccessibilityDelegate = new View.AccessibilityDelegate() { private final Runnable mAnimateKeyguardBottomAreaInvisibleEndRunnable = () -> mKeyguardBottomArea.setVisibility(View.GONE); private final AccessibilityDelegate mAccessibilityDelegate = new AccessibilityDelegate() { @Override public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) { public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(host, info); info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_FORWARD); info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_UP); Loading @@ -669,7 +651,8 @@ public class NotificationPanelViewController extends PanelViewController { @Override public boolean performAccessibilityAction(View host, int action, Bundle args) { if (action == AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_FORWARD.getId() if (action == AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_FORWARD.getId() || action == AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_UP.getId()) { mStatusBarKeyguardViewManager.showBouncer(true); Loading @@ -696,7 +679,6 @@ public class NotificationPanelViewController extends PanelViewController { @Inject public NotificationPanelViewController(NotificationPanelView view, @Main Resources resources, @Main Handler handler, LayoutInflater layoutInflater, FeatureFlags featureFlags, Loading Loading @@ -746,8 +728,6 @@ public class NotificationPanelViewController extends PanelViewController { QuickAccessWalletController quickAccessWalletController, QRCodeScannerController qrCodeScannerController, RecordingController recordingController, @Main Executor uiExecutor, SecureSettings secureSettings, LargeScreenShadeHeaderController largeScreenShadeHeaderController, ScreenOffAnimationController screenOffAnimationController, LockscreenGestureLogger lockscreenGestureLogger, Loading Loading @@ -834,8 +814,6 @@ public class NotificationPanelViewController extends PanelViewController { mUserManager = userManager; mMediaDataManager = mediaDataManager; mTapAgainViewController = tapAgainViewController; mUiExecutor = uiExecutor; mSecureSettings = secureSettings; mInteractionJankMonitor = interactionJankMonitor; mSysUiState = sysUiState; mPanelEventsEmitter = panelEventsEmitter; Loading @@ -845,7 +823,6 @@ public class NotificationPanelViewController extends PanelViewController { } }); statusBarWindowStateController.addListener(this::onStatusBarWindowStateChanged); mThemeResId = mView.getContext().getThemeResId(); mKeyguardBypassController = bypassController; mUpdateMonitor = keyguardUpdateMonitor; mLockscreenShadeTransitionController = lockscreenShadeTransitionController; Loading Loading @@ -892,14 +869,14 @@ public class NotificationPanelViewController extends PanelViewController { mView.getOverlay().add(new DebugDrawable()); } mKeyguardUnfoldTransition = unfoldComponent.map(c -> c.getKeyguardUnfoldTransition()); mKeyguardUnfoldTransition = unfoldComponent.map( SysUIUnfoldComponent::getKeyguardUnfoldTransition); mNotificationPanelUnfoldAnimationController = unfoldComponent.map( SysUIUnfoldComponent::getNotificationPanelUnfoldAnimationController); mQsFrameTranslateController = qsFrameTranslateController; updateUserSwitcherFlags(); onFinishInflate(); mUseCombinedQSHeaders = featureFlags.isEnabled(Flags.COMBINED_QS_HEADERS); keyguardUnlockAnimationController.addKeyguardUnlockAnimationListener( new KeyguardUnlockAnimationController.KeyguardUnlockAnimationListener() { @Override Loading Loading @@ -1047,12 +1024,8 @@ public class NotificationPanelViewController extends PanelViewController { mQsPeekHeight = mResources.getDimensionPixelSize(R.dimen.qs_peek_height); mClockPositionAlgorithm.loadDimens(mResources); mQsFalsingThreshold = mResources.getDimensionPixelSize(R.dimen.qs_falsing_threshold); mPositionMinSideMargin = mResources.getDimensionPixelSize( R.dimen.notification_panel_min_side_margin); mIndicationBottomPadding = mResources.getDimensionPixelSize( R.dimen.keyguard_indication_bottom_padding); mShelfHeight = mResources.getDimensionPixelSize(R.dimen.notification_shelf_height); mDarkIconSize = mResources.getDimensionPixelSize(R.dimen.status_bar_icon_drawing_size_dark); int statusbarHeight = SystemBarUtils.getStatusBarHeight(mView.getContext()); mHeadsUpInset = statusbarHeight + mResources.getDimensionPixelSize( R.dimen.heads_up_status_bar_padding); Loading Loading @@ -1116,9 +1089,6 @@ public class NotificationPanelViewController extends PanelViewController { mSplitShadeNotificationsScrimMarginBottom = mResources.getDimensionPixelSize( R.dimen.split_shade_notifications_scrim_margin_bottom); mShelfAndLockIconOverlap = mResources.getDimensionPixelSize(R.dimen.shelf_and_lock_icon_overlap); final boolean newSplitShadeEnabled = LargeScreenUtils.shouldUseSplitNotificationShade(mResources); final boolean splitShadeChanged = mSplitShadeEnabled != newSplitShadeEnabled; Loading Loading @@ -1296,7 +1266,7 @@ public class NotificationPanelViewController extends PanelViewController { private void updateMaxDisplayedNotifications(boolean recompute) { if (recompute) { mMaxAllowedKeyguardNotifications = Math.max(computeMaxKeyguardNotifications(), 1); setMaxDisplayedNotifications(Math.max(computeMaxKeyguardNotifications(), 1)); } else { if (SPEW_LOGCAT) Log.d(TAG, "Skipping computeMaxKeyguardNotifications() by request"); } Loading Loading @@ -1324,7 +1294,7 @@ public class NotificationPanelViewController extends PanelViewController { private void updateGestureExclusionRect() { Rect exclusionRect = calculateGestureExclusionRect(); mView.setSystemGestureExclusionRects(exclusionRect.isEmpty() ? Collections.EMPTY_LIST mView.setSystemGestureExclusionRects(exclusionRect.isEmpty() ? Collections.emptyList() : Collections.singletonList(exclusionRect)); } Loading Loading @@ -1352,14 +1322,11 @@ public class NotificationPanelViewController extends PanelViewController { mQsSizeChangeAnimator = ValueAnimator.ofInt(oldHeight, newHeight); mQsSizeChangeAnimator.setDuration(300); mQsSizeChangeAnimator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN); mQsSizeChangeAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { mQsSizeChangeAnimator.addUpdateListener(animation -> { requestScrollerTopPaddingUpdate(false /* animate */); requestPanelHeightUpdate(); int height = (int) mQsSizeChangeAnimator.getAnimatedValue(); mQs.setHeightOverride(height); } }); mQsSizeChangeAnimator.addListener(new AnimatorListenerAdapter() { @Override Loading Loading @@ -1904,12 +1871,8 @@ public class NotificationPanelViewController extends PanelViewController { mListenForHeadsUp = mCollapsedOnDown && mHeadsUpManager.hasPinnedHeadsUp(); mAllowExpandForSmallExpansion = mExpectingSynthesizedDown; mTouchSlopExceededBeforeDown = mExpectingSynthesizedDown; if (mExpectingSynthesizedDown) { mLastEventSynthesizedDown = true; } else { // down but not synthesized motion event. mLastEventSynthesizedDown = false; } // When false, down but not synthesized motion event. mLastEventSynthesizedDown = mExpectingSynthesizedDown; mLastDownEvents.insert( mSystemClock.currentTimeMillis(), mDownX, Loading @@ -1934,7 +1897,6 @@ public class NotificationPanelViewController extends PanelViewController { * * @param downX the x location where the touch started * @param downY the y location where the touch started * * @return true if the panel could be collapsed because it stared on QQS */ private boolean canPanelCollapseOnQQS(float downX, float downY) { Loading Loading @@ -2267,15 +2229,11 @@ public class NotificationPanelViewController extends PanelViewController { } private void onQsExpansionStarted() { onQsExpansionStarted(0); } protected void onQsExpansionStarted(int overscrollAmount) { cancelQsAnimation(); cancelHeightAnimator(); // Reset scroll position and apply that position to the expanded height. float height = mQsExpansionHeight - overscrollAmount; float height = mQsExpansionHeight; setQsExpansion(height); requestPanelHeightUpdate(); mNotificationStackScrollLayoutController.checkSnoozeLeavebehind(); Loading @@ -2287,7 +2245,8 @@ public class NotificationPanelViewController extends PanelViewController { } } @VisibleForTesting void setQsExpanded(boolean expanded) { @VisibleForTesting void setQsExpanded(boolean expanded) { boolean changed = mQsExpanded != expanded; if (changed) { mQsExpanded = expanded; Loading @@ -2312,13 +2271,6 @@ public class NotificationPanelViewController extends PanelViewController { } } private final Runnable mAnimateKeyguardBottomAreaInvisibleEndRunnable = new Runnable() { @Override public void run() { mKeyguardBottomArea.setVisibility(View.GONE); } }; private void setKeyguardBottomAreaVisibility(int statusBarState, boolean goingToFullShade) { mKeyguardBottomArea.animate().cancel(); if (goingToFullShade) { Loading Loading @@ -2436,7 +2388,7 @@ public class NotificationPanelViewController extends PanelViewController { } setQSClippingBounds(); } }; } private void onNotificationScrolled(int newScrollPosition) { updateQSExpansionEnabledAmbient(); Loading Loading @@ -2620,8 +2572,8 @@ public class NotificationPanelViewController extends PanelViewController { mQs.setFancyClipping( mQsClipTop, mQsClipBottom, radius, qsVisible && !mSplitShadeEnabled); radius, qsVisible && !mSplitShadeEnabled); } mKeyguardStatusViewController.setClipBounds( clipStatusView ? mKeyguardStatusAreaClipBounds : null); Loading Loading @@ -2745,8 +2697,7 @@ public class NotificationPanelViewController extends PanelViewController { } } protected void requestScrollerTopPaddingUpdate(boolean animate) { private void requestScrollerTopPaddingUpdate(boolean animate) { mNotificationStackScrollLayoutController.updateTopPadding( calculateNotificationsTopPadding(), animate); if (mKeyguardShowing && mKeyguardBypassController.getBypassEnabled()) { Loading Loading @@ -2894,7 +2845,7 @@ public class NotificationPanelViewController extends PanelViewController { * @param onFinishRunnable Runnable to be executed at the end of animation. * @param isClick If originated by click (different interpolator and duration.) */ protected void flingSettings(float vel, int type, final Runnable onFinishRunnable, private void flingSettings(float vel, int type, final Runnable onFinishRunnable, boolean isClick) { float target; switch (type) { Loading Loading @@ -2936,11 +2887,11 @@ public class NotificationPanelViewController extends PanelViewController { if (oppositeDirection) { animator.setDuration(350); } animator.addUpdateListener(animation -> { setQsExpansion((Float) animation.getAnimatedValue()); }); animator.addUpdateListener( animation -> setQsExpansion((Float) animation.getAnimatedValue())); animator.addListener(new AnimatorListenerAdapter() { private boolean mIsCanceled; @Override public void onAnimationStart(Animator animation) { notifyExpandingStarted(); Loading Loading @@ -3038,7 +2989,7 @@ public class NotificationPanelViewController extends PanelViewController { maxHeight = calculatePanelHeightShade(); } maxHeight = Math.max(min, maxHeight); if (maxHeight == 0 || isNaN(maxHeight)) { if (maxHeight == 0) { Log.wtf(TAG, "maxPanelHeight is invalid. mOverExpansion: " + mOverExpansion + ", calculatePanelHeightQsExpanded: " + calculatePanelHeightQsExpanded() + ", calculatePanelHeightShade: " Loading Loading @@ -3201,7 +3152,7 @@ public class NotificationPanelViewController extends PanelViewController { updateQsExpansion(); } protected float getHeaderTranslation() { private float getHeaderTranslation() { if (mBarState == KEYGUARD && !mKeyguardBypassController.getBypassEnabled()) { return -mQs.getQsMinExpansionHeight(); } Loading Loading @@ -3271,22 +3222,13 @@ public class NotificationPanelViewController extends PanelViewController { mMediaHierarchyManager.setCollapsingShadeFromQS(false); mMediaHierarchyManager.setQsExpanded(mQsExpanded); if (isFullyCollapsed()) { DejankUtils.postAfterTraversal(new Runnable() { @Override public void run() { setListening(false); } }); DejankUtils.postAfterTraversal(() -> setListening(false)); // Workaround b/22639032: Make sure we invalidate something because else RenderThread // thinks we are actually drawing a frame put in reality we don't, so RT doesn't go // ahead with rendering and we jank. mView.postOnAnimation(new Runnable() { @Override public void run() { mView.getParent().invalidateChild(mView, M_DUMMY_DIRTY_RECT); } }); mView.postOnAnimation( () -> mView.getParent().invalidateChild(mView, M_DUMMY_DIRTY_RECT)); } else { setListening(true); } Loading Loading @@ -3571,7 +3513,7 @@ public class NotificationPanelViewController extends PanelViewController { mNotificationStackScrollLayoutController.forceNoOverlappingRendering(closing); } protected void updateExpandedHeight(float expandedHeight) { private void updateExpandedHeight(float expandedHeight) { if (mTracking) { mNotificationStackScrollLayoutController .setExpandingVelocity(getCurrentExpandVelocity()); Loading @@ -3594,12 +3536,10 @@ public class NotificationPanelViewController extends PanelViewController { } private void updateStatusBarIcons() { boolean showIconsWhenExpanded = boolean showIconsWhenExpanded = (isPanelVisibleBecauseOfHeadsUp() || isFullWidth()) && getExpandedHeight() < getOpeningHeight(); boolean noVisibleNotifications = true; if (showIconsWhenExpanded && noVisibleNotifications && isOnKeyguard()) { if (showIconsWhenExpanded && isOnKeyguard()) { showIconsWhenExpanded = false; } if (showIconsWhenExpanded != mShowIconsWhenExpanded) { Loading Loading @@ -3900,6 +3840,7 @@ public class NotificationPanelViewController extends PanelViewController { public void onAnimationCancel(Animator animation) { endAction.run(); } @Override public void onAnimationEnd(Animator animation) { endAction.run(); Loading @@ -3920,7 +3861,6 @@ public class NotificationPanelViewController extends PanelViewController { resetTranslation(); } /** */ public void setImportantForAccessibility(int mode) { mView.setImportantForAccessibility(mode); } Loading Loading @@ -4255,8 +4195,7 @@ public class NotificationPanelViewController extends PanelViewController { }; @Override protected PanelViewController.OnConfigurationChangedListener createOnConfigurationChangedListener() { protected OnConfigurationChangedListener createOnConfigurationChangedListener() { return new OnConfigurationChangedListener(); } Loading Loading @@ -4489,7 +4428,6 @@ public class NotificationPanelViewController extends PanelViewController { @Override public void onThemeChanged() { if (DEBUG_LOGCAT) Log.d(TAG, "onThemeChanged"); mThemeResId = mView.getContext().getThemeResId(); reInflateViews(); } Loading Loading @@ -4638,6 +4576,7 @@ public class NotificationPanelViewController extends PanelViewController { public interface NotificationPanelViewStateProvider { /** Returns the expanded height of the panel view. */ float getPanelViewExpandedHeight(); /** * Returns true if heads up should be visible. * Loading Loading @@ -4798,7 +4737,7 @@ public class NotificationPanelViewController extends PanelViewController { private final Paint mDebugPaint = new Paint(); @Override public void draw(@NonNull Canvas canvas) { public void draw(@androidx.annotation.NonNull @NonNull Canvas canvas) { mDebugTextUsedYPositions.clear(); mDebugPaint.setColor(Color.RED); Loading Loading @@ -4872,7 +4811,7 @@ public class NotificationPanelViewController extends PanelViewController { @Override public int getOpacity() { return 0; return PixelFormat.UNKNOWN; } } Loading Loading @@ -4942,15 +4881,16 @@ public class NotificationPanelViewController extends PanelViewController { private final ListenerSet<Listener> mListeners = new ListenerSet<>(); @Inject PanelEventsEmitter() {} PanelEventsEmitter() { } @Override public void registerListener(@NonNull Listener listener) { public void registerListener(@androidx.annotation.NonNull @NonNull Listener listener) { mListeners.addIfAbsent(listener); } @Override public void unregisterListener(@NonNull Listener listener) { public void unregisterListener(@androidx.annotation.NonNull @NonNull Listener listener) { mListeners.remove(listener); } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java +0 −3 Original line number Diff line number Diff line Loading @@ -487,7 +487,6 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { mNotificationPanelViewController = new NotificationPanelViewController( mView, mResources, mMainHandler, mLayoutInflater, mFeatureFlags, Loading Loading @@ -528,8 +527,6 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { mQuickAccessWalletController, mQrCodeScannerController, mRecordingController, mExecutor, mSecureSettings, mLargeScreenShadeHeaderController, mScreenOffAnimationController, mLockscreenGestureLogger, Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +99 −159 Original line number Diff line number Diff line Loading @@ -40,8 +40,6 @@ import static com.android.systemui.statusbar.phone.panelstate.PanelExpansionStat import static com.android.systemui.statusbar.phone.panelstate.PanelExpansionStateManagerKt.STATE_OPENING; import static com.android.systemui.util.DumpUtilsKt.asIndenting; import static java.lang.Float.isNaN; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; Loading @@ -50,13 +48,13 @@ import android.app.ActivityManager; import android.app.Fragment; import android.app.StatusBarManager; import android.content.ContentResolver; import android.content.res.Resources; import android.database.ContentObserver; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.ColorFilter; import android.graphics.Insets; import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.PointF; import android.graphics.Rect; import android.graphics.Region; Loading @@ -79,6 +77,7 @@ import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.View; import android.view.View.AccessibilityDelegate; import android.view.ViewGroup; import android.view.ViewPropertyAnimator; import android.view.ViewStub; Loading Loading @@ -195,7 +194,6 @@ import com.android.systemui.util.Compile; import com.android.systemui.util.LargeScreenUtils; import com.android.systemui.util.ListenerSet; import com.android.systemui.util.Utils; import com.android.systemui.util.settings.SecureSettings; import com.android.systemui.util.time.SystemClock; import com.android.systemui.wallet.controller.QuickAccessWalletController; import com.android.wm.shell.animation.FlingAnimationUtils; Loading @@ -207,14 +205,13 @@ import java.util.HashSet; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.concurrent.Executor; import java.util.function.Consumer; import javax.inject.Inject; import javax.inject.Provider; @CentralSurfacesComponent.CentralSurfacesScope public class NotificationPanelViewController extends PanelViewController { public final class NotificationPanelViewController extends PanelViewController { private static final boolean DEBUG_LOGCAT = Compile.IS_DEBUG && Log.isLoggable(TAG, Log.DEBUG); private static final boolean SPEW_LOGCAT = Compile.IS_DEBUG && Log.isLoggable(TAG, Log.VERBOSE); Loading Loading @@ -260,7 +257,8 @@ public class NotificationPanelViewController extends PanelViewController { private final ConfigurationListener mConfigurationListener = new ConfigurationListener(); private final SettingsChangeObserver mSettingsChangeObserver; @VisibleForTesting final StatusBarStateListener mStatusBarStateListener = @VisibleForTesting final StatusBarStateListener mStatusBarStateListener = new StatusBarStateListener(); private final NotificationPanelView mView; private final VibratorHelper mVibratorHelper; Loading Loading @@ -332,19 +330,20 @@ public class NotificationPanelViewController extends PanelViewController { private KeyguardUserSwitcherController mKeyguardUserSwitcherController; private KeyguardStatusBarView mKeyguardStatusBar; private KeyguardStatusBarViewController mKeyguardStatusBarViewController; @VisibleForTesting QS mQs; @VisibleForTesting QS mQs; private FrameLayout mQsFrame; private QsFrameTranslateController mQsFrameTranslateController; private final QsFrameTranslateController mQsFrameTranslateController; private KeyguardStatusViewController mKeyguardStatusViewController; private LockIconViewController mLockIconViewController; private final LockIconViewController mLockIconViewController; private NotificationsQuickSettingsContainer mNotificationContainerParent; private NotificationsQSContainerController mNotificationsQSContainerController; private final NotificationsQSContainerController mNotificationsQSContainerController; private final Provider<KeyguardBottomAreaViewController> mKeyguardBottomAreaViewControllerProvider; private boolean mAnimateNextPositionUpdate; private float mQuickQsHeaderHeight; private ScreenOffAnimationController mScreenOffAnimationController; private UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController; private final ScreenOffAnimationController mScreenOffAnimationController; private final UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController; private int mTrackingPointer; private VelocityTracker mQsVelocityTracker; Loading Loading @@ -397,12 +396,6 @@ public class NotificationPanelViewController extends PanelViewController { private int mLargeScreenShadeHeaderHeight; private int mSplitShadeNotificationsScrimMarginBottom; /** * Vertical overlap allowed between the bottom of the notification shelf and * the top of the lock icon or the under-display fingerprint sensor background. */ private int mShelfAndLockIconOverlap; private final KeyguardClockPositionAlgorithm mClockPositionAlgorithm = new KeyguardClockPositionAlgorithm(); Loading @@ -417,7 +410,8 @@ public class NotificationPanelViewController extends PanelViewController { * Determines if QS should be already expanded when expanding shade. * Used for split shade, two finger gesture as well as accessibility shortcut to QS. */ @VisibleForTesting boolean mQsExpandImmediate; @VisibleForTesting boolean mQsExpandImmediate; private boolean mTwoFingerQsExpandPossible; private String mHeaderDebugInfo; Loading @@ -439,14 +433,13 @@ public class NotificationPanelViewController extends PanelViewController { private int mNavigationBarBottomHeight; private boolean mExpandingFromHeadsUp; private boolean mCollapsedOnDown; private int mPositionMinSideMargin; private boolean mClosingWithAlphaFadeOut; private boolean mHeadsUpAnimatingAway; private boolean mLaunchingAffordance; private final FalsingManager mFalsingManager; private final FalsingCollector mFalsingCollector; private Runnable mHeadsUpExistenceChangedRunnable = () -> { private final Runnable mHeadsUpExistenceChangedRunnable = () -> { setHeadsUpAnimatingAway(false); updatePanelExpansionAndVisibility(); }; Loading @@ -456,9 +449,6 @@ public class NotificationPanelViewController extends PanelViewController { private boolean mIsFullWidth; private boolean mBlockingExpansionForCurrentTouch; // TODO (b/204204226): no longer needed once refactor is complete private final boolean mUseCombinedQSHeaders; /** * Following variables maintain state of events when input focus transfer may occur. */ Loading Loading @@ -514,19 +504,10 @@ public class NotificationPanelViewController extends PanelViewController { private final MediaDataManager mMediaDataManager; private final SysUiState mSysUiState; private NotificationShadeDepthController mDepthController; private int mDisplayId; private final NotificationShadeDepthController mDepthController; private final int mDisplayId; /** * Cache the resource id of the theme to avoid unnecessary work in onThemeChanged. * * onThemeChanged is forced when the theme might not have changed. So, to avoid unncessary * work, check the current id with the cached id. */ private int mThemeResId; private KeyguardIndicationController mKeyguardIndicationController; private int mShelfHeight; private int mDarkIconSize; private int mHeadsUpInset; private boolean mHeadsUpPinnedMode; private boolean mAllowExpandForSmallExpansion; Loading Loading @@ -640,15 +621,12 @@ public class NotificationPanelViewController extends PanelViewController { private final ContentResolver mContentResolver; private float mMinFraction; private final Executor mUiExecutor; private final SecureSettings mSecureSettings; private KeyguardMediaController mKeyguardMediaController; private final KeyguardMediaController mKeyguardMediaController; private boolean mStatusViewCentered = true; private Optional<KeyguardUnfoldTransition> mKeyguardUnfoldTransition; private Optional<NotificationPanelUnfoldAnimationController> private final Optional<KeyguardUnfoldTransition> mKeyguardUnfoldTransition; private final Optional<NotificationPanelUnfoldAnimationController> mNotificationPanelUnfoldAnimationController; /** The drag distance required to fully expand the split shade. */ Loading @@ -659,9 +637,13 @@ public class NotificationPanelViewController extends PanelViewController { private final NPVCDownEventState.Buffer mLastDownEvents; private View.AccessibilityDelegate mAccessibilityDelegate = new View.AccessibilityDelegate() { private final Runnable mAnimateKeyguardBottomAreaInvisibleEndRunnable = () -> mKeyguardBottomArea.setVisibility(View.GONE); private final AccessibilityDelegate mAccessibilityDelegate = new AccessibilityDelegate() { @Override public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) { public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(host, info); info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_FORWARD); info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_UP); Loading @@ -669,7 +651,8 @@ public class NotificationPanelViewController extends PanelViewController { @Override public boolean performAccessibilityAction(View host, int action, Bundle args) { if (action == AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_FORWARD.getId() if (action == AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_FORWARD.getId() || action == AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_UP.getId()) { mStatusBarKeyguardViewManager.showBouncer(true); Loading @@ -696,7 +679,6 @@ public class NotificationPanelViewController extends PanelViewController { @Inject public NotificationPanelViewController(NotificationPanelView view, @Main Resources resources, @Main Handler handler, LayoutInflater layoutInflater, FeatureFlags featureFlags, Loading Loading @@ -746,8 +728,6 @@ public class NotificationPanelViewController extends PanelViewController { QuickAccessWalletController quickAccessWalletController, QRCodeScannerController qrCodeScannerController, RecordingController recordingController, @Main Executor uiExecutor, SecureSettings secureSettings, LargeScreenShadeHeaderController largeScreenShadeHeaderController, ScreenOffAnimationController screenOffAnimationController, LockscreenGestureLogger lockscreenGestureLogger, Loading Loading @@ -834,8 +814,6 @@ public class NotificationPanelViewController extends PanelViewController { mUserManager = userManager; mMediaDataManager = mediaDataManager; mTapAgainViewController = tapAgainViewController; mUiExecutor = uiExecutor; mSecureSettings = secureSettings; mInteractionJankMonitor = interactionJankMonitor; mSysUiState = sysUiState; mPanelEventsEmitter = panelEventsEmitter; Loading @@ -845,7 +823,6 @@ public class NotificationPanelViewController extends PanelViewController { } }); statusBarWindowStateController.addListener(this::onStatusBarWindowStateChanged); mThemeResId = mView.getContext().getThemeResId(); mKeyguardBypassController = bypassController; mUpdateMonitor = keyguardUpdateMonitor; mLockscreenShadeTransitionController = lockscreenShadeTransitionController; Loading Loading @@ -892,14 +869,14 @@ public class NotificationPanelViewController extends PanelViewController { mView.getOverlay().add(new DebugDrawable()); } mKeyguardUnfoldTransition = unfoldComponent.map(c -> c.getKeyguardUnfoldTransition()); mKeyguardUnfoldTransition = unfoldComponent.map( SysUIUnfoldComponent::getKeyguardUnfoldTransition); mNotificationPanelUnfoldAnimationController = unfoldComponent.map( SysUIUnfoldComponent::getNotificationPanelUnfoldAnimationController); mQsFrameTranslateController = qsFrameTranslateController; updateUserSwitcherFlags(); onFinishInflate(); mUseCombinedQSHeaders = featureFlags.isEnabled(Flags.COMBINED_QS_HEADERS); keyguardUnlockAnimationController.addKeyguardUnlockAnimationListener( new KeyguardUnlockAnimationController.KeyguardUnlockAnimationListener() { @Override Loading Loading @@ -1047,12 +1024,8 @@ public class NotificationPanelViewController extends PanelViewController { mQsPeekHeight = mResources.getDimensionPixelSize(R.dimen.qs_peek_height); mClockPositionAlgorithm.loadDimens(mResources); mQsFalsingThreshold = mResources.getDimensionPixelSize(R.dimen.qs_falsing_threshold); mPositionMinSideMargin = mResources.getDimensionPixelSize( R.dimen.notification_panel_min_side_margin); mIndicationBottomPadding = mResources.getDimensionPixelSize( R.dimen.keyguard_indication_bottom_padding); mShelfHeight = mResources.getDimensionPixelSize(R.dimen.notification_shelf_height); mDarkIconSize = mResources.getDimensionPixelSize(R.dimen.status_bar_icon_drawing_size_dark); int statusbarHeight = SystemBarUtils.getStatusBarHeight(mView.getContext()); mHeadsUpInset = statusbarHeight + mResources.getDimensionPixelSize( R.dimen.heads_up_status_bar_padding); Loading Loading @@ -1116,9 +1089,6 @@ public class NotificationPanelViewController extends PanelViewController { mSplitShadeNotificationsScrimMarginBottom = mResources.getDimensionPixelSize( R.dimen.split_shade_notifications_scrim_margin_bottom); mShelfAndLockIconOverlap = mResources.getDimensionPixelSize(R.dimen.shelf_and_lock_icon_overlap); final boolean newSplitShadeEnabled = LargeScreenUtils.shouldUseSplitNotificationShade(mResources); final boolean splitShadeChanged = mSplitShadeEnabled != newSplitShadeEnabled; Loading Loading @@ -1296,7 +1266,7 @@ public class NotificationPanelViewController extends PanelViewController { private void updateMaxDisplayedNotifications(boolean recompute) { if (recompute) { mMaxAllowedKeyguardNotifications = Math.max(computeMaxKeyguardNotifications(), 1); setMaxDisplayedNotifications(Math.max(computeMaxKeyguardNotifications(), 1)); } else { if (SPEW_LOGCAT) Log.d(TAG, "Skipping computeMaxKeyguardNotifications() by request"); } Loading Loading @@ -1324,7 +1294,7 @@ public class NotificationPanelViewController extends PanelViewController { private void updateGestureExclusionRect() { Rect exclusionRect = calculateGestureExclusionRect(); mView.setSystemGestureExclusionRects(exclusionRect.isEmpty() ? Collections.EMPTY_LIST mView.setSystemGestureExclusionRects(exclusionRect.isEmpty() ? Collections.emptyList() : Collections.singletonList(exclusionRect)); } Loading Loading @@ -1352,14 +1322,11 @@ public class NotificationPanelViewController extends PanelViewController { mQsSizeChangeAnimator = ValueAnimator.ofInt(oldHeight, newHeight); mQsSizeChangeAnimator.setDuration(300); mQsSizeChangeAnimator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN); mQsSizeChangeAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { mQsSizeChangeAnimator.addUpdateListener(animation -> { requestScrollerTopPaddingUpdate(false /* animate */); requestPanelHeightUpdate(); int height = (int) mQsSizeChangeAnimator.getAnimatedValue(); mQs.setHeightOverride(height); } }); mQsSizeChangeAnimator.addListener(new AnimatorListenerAdapter() { @Override Loading Loading @@ -1904,12 +1871,8 @@ public class NotificationPanelViewController extends PanelViewController { mListenForHeadsUp = mCollapsedOnDown && mHeadsUpManager.hasPinnedHeadsUp(); mAllowExpandForSmallExpansion = mExpectingSynthesizedDown; mTouchSlopExceededBeforeDown = mExpectingSynthesizedDown; if (mExpectingSynthesizedDown) { mLastEventSynthesizedDown = true; } else { // down but not synthesized motion event. mLastEventSynthesizedDown = false; } // When false, down but not synthesized motion event. mLastEventSynthesizedDown = mExpectingSynthesizedDown; mLastDownEvents.insert( mSystemClock.currentTimeMillis(), mDownX, Loading @@ -1934,7 +1897,6 @@ public class NotificationPanelViewController extends PanelViewController { * * @param downX the x location where the touch started * @param downY the y location where the touch started * * @return true if the panel could be collapsed because it stared on QQS */ private boolean canPanelCollapseOnQQS(float downX, float downY) { Loading Loading @@ -2267,15 +2229,11 @@ public class NotificationPanelViewController extends PanelViewController { } private void onQsExpansionStarted() { onQsExpansionStarted(0); } protected void onQsExpansionStarted(int overscrollAmount) { cancelQsAnimation(); cancelHeightAnimator(); // Reset scroll position and apply that position to the expanded height. float height = mQsExpansionHeight - overscrollAmount; float height = mQsExpansionHeight; setQsExpansion(height); requestPanelHeightUpdate(); mNotificationStackScrollLayoutController.checkSnoozeLeavebehind(); Loading @@ -2287,7 +2245,8 @@ public class NotificationPanelViewController extends PanelViewController { } } @VisibleForTesting void setQsExpanded(boolean expanded) { @VisibleForTesting void setQsExpanded(boolean expanded) { boolean changed = mQsExpanded != expanded; if (changed) { mQsExpanded = expanded; Loading @@ -2312,13 +2271,6 @@ public class NotificationPanelViewController extends PanelViewController { } } private final Runnable mAnimateKeyguardBottomAreaInvisibleEndRunnable = new Runnable() { @Override public void run() { mKeyguardBottomArea.setVisibility(View.GONE); } }; private void setKeyguardBottomAreaVisibility(int statusBarState, boolean goingToFullShade) { mKeyguardBottomArea.animate().cancel(); if (goingToFullShade) { Loading Loading @@ -2436,7 +2388,7 @@ public class NotificationPanelViewController extends PanelViewController { } setQSClippingBounds(); } }; } private void onNotificationScrolled(int newScrollPosition) { updateQSExpansionEnabledAmbient(); Loading Loading @@ -2620,8 +2572,8 @@ public class NotificationPanelViewController extends PanelViewController { mQs.setFancyClipping( mQsClipTop, mQsClipBottom, radius, qsVisible && !mSplitShadeEnabled); radius, qsVisible && !mSplitShadeEnabled); } mKeyguardStatusViewController.setClipBounds( clipStatusView ? mKeyguardStatusAreaClipBounds : null); Loading Loading @@ -2745,8 +2697,7 @@ public class NotificationPanelViewController extends PanelViewController { } } protected void requestScrollerTopPaddingUpdate(boolean animate) { private void requestScrollerTopPaddingUpdate(boolean animate) { mNotificationStackScrollLayoutController.updateTopPadding( calculateNotificationsTopPadding(), animate); if (mKeyguardShowing && mKeyguardBypassController.getBypassEnabled()) { Loading Loading @@ -2894,7 +2845,7 @@ public class NotificationPanelViewController extends PanelViewController { * @param onFinishRunnable Runnable to be executed at the end of animation. * @param isClick If originated by click (different interpolator and duration.) */ protected void flingSettings(float vel, int type, final Runnable onFinishRunnable, private void flingSettings(float vel, int type, final Runnable onFinishRunnable, boolean isClick) { float target; switch (type) { Loading Loading @@ -2936,11 +2887,11 @@ public class NotificationPanelViewController extends PanelViewController { if (oppositeDirection) { animator.setDuration(350); } animator.addUpdateListener(animation -> { setQsExpansion((Float) animation.getAnimatedValue()); }); animator.addUpdateListener( animation -> setQsExpansion((Float) animation.getAnimatedValue())); animator.addListener(new AnimatorListenerAdapter() { private boolean mIsCanceled; @Override public void onAnimationStart(Animator animation) { notifyExpandingStarted(); Loading Loading @@ -3038,7 +2989,7 @@ public class NotificationPanelViewController extends PanelViewController { maxHeight = calculatePanelHeightShade(); } maxHeight = Math.max(min, maxHeight); if (maxHeight == 0 || isNaN(maxHeight)) { if (maxHeight == 0) { Log.wtf(TAG, "maxPanelHeight is invalid. mOverExpansion: " + mOverExpansion + ", calculatePanelHeightQsExpanded: " + calculatePanelHeightQsExpanded() + ", calculatePanelHeightShade: " Loading Loading @@ -3201,7 +3152,7 @@ public class NotificationPanelViewController extends PanelViewController { updateQsExpansion(); } protected float getHeaderTranslation() { private float getHeaderTranslation() { if (mBarState == KEYGUARD && !mKeyguardBypassController.getBypassEnabled()) { return -mQs.getQsMinExpansionHeight(); } Loading Loading @@ -3271,22 +3222,13 @@ public class NotificationPanelViewController extends PanelViewController { mMediaHierarchyManager.setCollapsingShadeFromQS(false); mMediaHierarchyManager.setQsExpanded(mQsExpanded); if (isFullyCollapsed()) { DejankUtils.postAfterTraversal(new Runnable() { @Override public void run() { setListening(false); } }); DejankUtils.postAfterTraversal(() -> setListening(false)); // Workaround b/22639032: Make sure we invalidate something because else RenderThread // thinks we are actually drawing a frame put in reality we don't, so RT doesn't go // ahead with rendering and we jank. mView.postOnAnimation(new Runnable() { @Override public void run() { mView.getParent().invalidateChild(mView, M_DUMMY_DIRTY_RECT); } }); mView.postOnAnimation( () -> mView.getParent().invalidateChild(mView, M_DUMMY_DIRTY_RECT)); } else { setListening(true); } Loading Loading @@ -3571,7 +3513,7 @@ public class NotificationPanelViewController extends PanelViewController { mNotificationStackScrollLayoutController.forceNoOverlappingRendering(closing); } protected void updateExpandedHeight(float expandedHeight) { private void updateExpandedHeight(float expandedHeight) { if (mTracking) { mNotificationStackScrollLayoutController .setExpandingVelocity(getCurrentExpandVelocity()); Loading @@ -3594,12 +3536,10 @@ public class NotificationPanelViewController extends PanelViewController { } private void updateStatusBarIcons() { boolean showIconsWhenExpanded = boolean showIconsWhenExpanded = (isPanelVisibleBecauseOfHeadsUp() || isFullWidth()) && getExpandedHeight() < getOpeningHeight(); boolean noVisibleNotifications = true; if (showIconsWhenExpanded && noVisibleNotifications && isOnKeyguard()) { if (showIconsWhenExpanded && isOnKeyguard()) { showIconsWhenExpanded = false; } if (showIconsWhenExpanded != mShowIconsWhenExpanded) { Loading Loading @@ -3900,6 +3840,7 @@ public class NotificationPanelViewController extends PanelViewController { public void onAnimationCancel(Animator animation) { endAction.run(); } @Override public void onAnimationEnd(Animator animation) { endAction.run(); Loading @@ -3920,7 +3861,6 @@ public class NotificationPanelViewController extends PanelViewController { resetTranslation(); } /** */ public void setImportantForAccessibility(int mode) { mView.setImportantForAccessibility(mode); } Loading Loading @@ -4255,8 +4195,7 @@ public class NotificationPanelViewController extends PanelViewController { }; @Override protected PanelViewController.OnConfigurationChangedListener createOnConfigurationChangedListener() { protected OnConfigurationChangedListener createOnConfigurationChangedListener() { return new OnConfigurationChangedListener(); } Loading Loading @@ -4489,7 +4428,6 @@ public class NotificationPanelViewController extends PanelViewController { @Override public void onThemeChanged() { if (DEBUG_LOGCAT) Log.d(TAG, "onThemeChanged"); mThemeResId = mView.getContext().getThemeResId(); reInflateViews(); } Loading Loading @@ -4638,6 +4576,7 @@ public class NotificationPanelViewController extends PanelViewController { public interface NotificationPanelViewStateProvider { /** Returns the expanded height of the panel view. */ float getPanelViewExpandedHeight(); /** * Returns true if heads up should be visible. * Loading Loading @@ -4798,7 +4737,7 @@ public class NotificationPanelViewController extends PanelViewController { private final Paint mDebugPaint = new Paint(); @Override public void draw(@NonNull Canvas canvas) { public void draw(@androidx.annotation.NonNull @NonNull Canvas canvas) { mDebugTextUsedYPositions.clear(); mDebugPaint.setColor(Color.RED); Loading Loading @@ -4872,7 +4811,7 @@ public class NotificationPanelViewController extends PanelViewController { @Override public int getOpacity() { return 0; return PixelFormat.UNKNOWN; } } Loading Loading @@ -4942,15 +4881,16 @@ public class NotificationPanelViewController extends PanelViewController { private final ListenerSet<Listener> mListeners = new ListenerSet<>(); @Inject PanelEventsEmitter() {} PanelEventsEmitter() { } @Override public void registerListener(@NonNull Listener listener) { public void registerListener(@androidx.annotation.NonNull @NonNull Listener listener) { mListeners.addIfAbsent(listener); } @Override public void unregisterListener(@NonNull Listener listener) { public void unregisterListener(@androidx.annotation.NonNull @NonNull Listener listener) { mListeners.remove(listener); } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java +0 −3 Original line number Diff line number Diff line Loading @@ -487,7 +487,6 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { mNotificationPanelViewController = new NotificationPanelViewController( mView, mResources, mMainHandler, mLayoutInflater, mFeatureFlags, Loading Loading @@ -528,8 +527,6 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { mQuickAccessWalletController, mQrCodeScannerController, mRecordingController, mExecutor, mSecureSettings, mLargeScreenShadeHeaderController, mScreenOffAnimationController, mLockscreenGestureLogger, Loading