Loading packages/SystemUI/src/com/android/systemui/accessibility/SimpleMirrorWindowControl.java +3 −4 Original line number Original line Diff line number Diff line Loading @@ -45,7 +45,7 @@ class SimpleMirrorWindowControl extends MirrorWindowControl implements View.OnCl private boolean mShouldSetTouchStart; private boolean mShouldSetTouchStart; @Nullable private MoveWindowTask mMoveWindowTask; @Nullable private MoveWindowTask mMoveWindowTask; private PointF mLastDrag = new PointF(); private final PointF mLastDrag = new PointF(); private final Handler mHandler; private final Handler mHandler; SimpleMirrorWindowControl(Context context, Handler handler) { SimpleMirrorWindowControl(Context context, Handler handler) { Loading Loading @@ -92,8 +92,7 @@ class SimpleMirrorWindowControl extends MirrorWindowControl implements View.OnCl } } private Point findOffset(View v, int moveFrameAmount) { private Point findOffset(View v, int moveFrameAmount) { final Point offset = mTmpPoint; mTmpPoint.set(0, 0); offset.set(0, 0); if (v.getId() == R.id.left_control) { if (v.getId() == R.id.left_control) { mTmpPoint.x = -moveFrameAmount; mTmpPoint.x = -moveFrameAmount; } else if (v.getId() == R.id.up_control) { } else if (v.getId() == R.id.up_control) { Loading Loading @@ -184,7 +183,7 @@ class SimpleMirrorWindowControl extends MirrorWindowControl implements View.OnCl private final int mYOffset; private final int mYOffset; private final Handler mHandler; private final Handler mHandler; /** Time in milliseconds between successive task executions.*/ /** Time in milliseconds between successive task executions.*/ private long mPeriod; private final long mPeriod; private boolean mCancel; private boolean mCancel; MoveWindowTask(@NonNull MirrorWindowDelegate windowDelegate, Handler handler, int xOffset, MoveWindowTask(@NonNull MirrorWindowDelegate windowDelegate, Handler handler, int xOffset, Loading packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationController.java +5 −7 Original line number Original line Diff line number Diff line Loading @@ -104,7 +104,7 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold private final Context mContext; private final Context mContext; private final Resources mResources; private final Resources mResources; private final Handler mHandler; private final Handler mHandler; private Rect mWindowBounds; private final Rect mWindowBounds; private final int mDisplayId; private final int mDisplayId; @Surface.Rotation @Surface.Rotation @VisibleForTesting @VisibleForTesting Loading Loading @@ -193,11 +193,11 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold private final SfVsyncFrameCallbackProvider mSfVsyncFrameProvider; private final SfVsyncFrameCallbackProvider mSfVsyncFrameProvider; private final MagnificationGestureDetector mGestureDetector; private final MagnificationGestureDetector mGestureDetector; private final int mBounceEffectDuration; private final int mBounceEffectDuration; private Choreographer.FrameCallback mMirrorViewGeometryVsyncCallback; private final Choreographer.FrameCallback mMirrorViewGeometryVsyncCallback; private Locale mLocale; private Locale mLocale; private NumberFormat mPercentFormat; private NumberFormat mPercentFormat; private float mBounceEffectAnimationScale; private float mBounceEffectAnimationScale; private SysUiState mSysUiState; private final SysUiState mSysUiState; // Set it to true when the view is overlapped with the gesture insets at the bottom. // Set it to true when the view is overlapped with the gesture insets at the bottom. private boolean mOverlapWithGestureInsets; private boolean mOverlapWithGestureInsets; private boolean mIsDragging; private boolean mIsDragging; Loading @@ -215,7 +215,7 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold private boolean mEditSizeEnable = false; private boolean mEditSizeEnable = false; @Nullable @Nullable private MirrorWindowControl mMirrorWindowControl; private final MirrorWindowControl mMirrorWindowControl; WindowMagnificationController( WindowMagnificationController( @UiContext Context context, @UiContext Context context, Loading Loading @@ -562,9 +562,7 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold /** Returns the rotation degree change of two {@link Surface.Rotation} */ /** Returns the rotation degree change of two {@link Surface.Rotation} */ private int getDegreeFromRotation(@Surface.Rotation int newRotation, private int getDegreeFromRotation(@Surface.Rotation int newRotation, @Surface.Rotation int oldRotation) { @Surface.Rotation int oldRotation) { final int rotationDiff = oldRotation - newRotation; return (oldRotation - newRotation + 4) % 4 * 90; final int degree = (rotationDiff + 4) % 4 * 90; return degree; } } private void createMirrorWindow() { private void createMirrorWindow() { Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSection.java +6 −7 Original line number Original line Diff line number Diff line Loading @@ -35,12 +35,12 @@ import com.android.systemui.statusbar.notification.row.ExpandableView; * bounds change. * bounds change. */ */ public class NotificationSection { public class NotificationSection { private @PriorityBucket int mBucket; private @PriorityBucket final int mBucket; private View mOwningView; private final View mOwningView; private Rect mBounds = new Rect(); private final Rect mBounds = new Rect(); private Rect mCurrentBounds = new Rect(-1, -1, -1, -1); private final Rect mCurrentBounds = new Rect(-1, -1, -1, -1); private Rect mStartAnimationRect = new Rect(); private final Rect mStartAnimationRect = new Rect(); private Rect mEndAnimationRect = new Rect(); private final Rect mEndAnimationRect = new Rect(); private ObjectAnimator mTopAnimator = null; private ObjectAnimator mTopAnimator = null; private ObjectAnimator mBottomAnimator = null; private ObjectAnimator mBottomAnimator = null; private ExpandableView mFirstVisibleChild; private ExpandableView mFirstVisibleChild; Loading Loading @@ -277,7 +277,6 @@ public class NotificationSection { } } } } } } top = Math.max(minTopPosition, top); ExpandableView lastView = getLastVisibleChild(); ExpandableView lastView = getLastVisibleChild(); if (lastView != null) { if (lastView != null) { float finalTranslationY = ViewState.getFinalTranslationY(lastView); float finalTranslationY = ViewState.getFinalTranslationY(lastView); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +41 −70 Original line number Original line Diff line number Diff line Loading @@ -135,7 +135,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private static final boolean SPEW = Log.isLoggable(TAG, Log.VERBOSE); private static final boolean SPEW = Log.isLoggable(TAG, Log.VERBOSE); // Delay in milli-seconds before shade closes for clear all. // Delay in milli-seconds before shade closes for clear all. private final int DELAY_BEFORE_SHADE_CLOSE = 200; private static final int DELAY_BEFORE_SHADE_CLOSE = 200; private boolean mShadeNeedsToClose = false; private boolean mShadeNeedsToClose = false; private static final float RUBBER_BAND_FACTOR_NORMAL = 0.35f; private static final float RUBBER_BAND_FACTOR_NORMAL = 0.35f; Loading @@ -152,7 +152,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private static final int DISTANCE_BETWEEN_ADJACENT_SECTIONS_PX = 1; private static final int DISTANCE_BETWEEN_ADJACENT_SECTIONS_PX = 1; private boolean mKeyguardBypassEnabled; private boolean mKeyguardBypassEnabled; private ExpandHelper mExpandHelper; private final ExpandHelper mExpandHelper; private NotificationSwipeHelper mSwipeHelper; private NotificationSwipeHelper mSwipeHelper; private int mCurrentStackHeight = Integer.MAX_VALUE; private int mCurrentStackHeight = Integer.MAX_VALUE; private final Paint mBackgroundPaint = new Paint(); private final Paint mBackgroundPaint = new Paint(); Loading @@ -165,12 +165,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private VelocityTracker mVelocityTracker; private VelocityTracker mVelocityTracker; private OverScroller mScroller; private OverScroller mScroller; /** Last Y position reported by {@link #mScroller}, used to calculate scroll delta. */ private int mLastScrollerY; /** * True if the max position was set to a known position on the last call to {@link #mScroller}. */ private boolean mIsScrollerBoundSet; private Runnable mFinishScrollingCallback; private Runnable mFinishScrollingCallback; private int mTouchSlop; private int mTouchSlop; private float mSlopMultiplier; private float mSlopMultiplier; Loading @@ -194,7 +189,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private int mContentHeight; private int mContentHeight; private float mIntrinsicContentHeight; private float mIntrinsicContentHeight; private int mCollapsedSize; private int mPaddingBetweenElements; private int mPaddingBetweenElements; private int mMaxTopPadding; private int mMaxTopPadding; private int mTopPadding; private int mTopPadding; Loading @@ -210,15 +204,15 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private final StackScrollAlgorithm mStackScrollAlgorithm; private final StackScrollAlgorithm mStackScrollAlgorithm; private final AmbientState mAmbientState; private final AmbientState mAmbientState; private GroupMembershipManager mGroupMembershipManager; private final GroupMembershipManager mGroupMembershipManager; private GroupExpansionManager mGroupExpansionManager; private final GroupExpansionManager mGroupExpansionManager; private HashSet<ExpandableView> mChildrenToAddAnimated = new HashSet<>(); private final HashSet<ExpandableView> mChildrenToAddAnimated = new HashSet<>(); private ArrayList<View> mAddedHeadsUpChildren = new ArrayList<>(); private final ArrayList<View> mAddedHeadsUpChildren = new ArrayList<>(); private ArrayList<ExpandableView> mChildrenToRemoveAnimated = new ArrayList<>(); private final ArrayList<ExpandableView> mChildrenToRemoveAnimated = new ArrayList<>(); private ArrayList<ExpandableView> mChildrenChangingPositions = new ArrayList<>(); private final ArrayList<ExpandableView> mChildrenChangingPositions = new ArrayList<>(); private HashSet<View> mFromMoreCardAdditions = new HashSet<>(); private final HashSet<View> mFromMoreCardAdditions = new HashSet<>(); private ArrayList<AnimationEvent> mAnimationEvents = new ArrayList<>(); private final ArrayList<AnimationEvent> mAnimationEvents = new ArrayList<>(); private ArrayList<View> mSwipedOutViews = new ArrayList<>(); private final ArrayList<View> mSwipedOutViews = new ArrayList<>(); private NotificationStackSizeCalculator mNotificationStackSizeCalculator; private NotificationStackSizeCalculator mNotificationStackSizeCalculator; private final StackStateAnimator mStateAnimator = new StackStateAnimator(this); private final StackStateAnimator mStateAnimator = new StackStateAnimator(this); private boolean mAnimationsEnabled; private boolean mAnimationsEnabled; Loading Loading @@ -296,7 +290,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private boolean mDisallowDismissInThisMotion; private boolean mDisallowDismissInThisMotion; private boolean mDisallowScrollingInThisMotion; private boolean mDisallowScrollingInThisMotion; private long mGoToFullShadeDelay; private long mGoToFullShadeDelay; private ViewTreeObserver.OnPreDrawListener mChildrenUpdater private final ViewTreeObserver.OnPreDrawListener mChildrenUpdater = new ViewTreeObserver.OnPreDrawListener() { = new ViewTreeObserver.OnPreDrawListener() { @Override @Override public boolean onPreDraw() { public boolean onPreDraw() { Loading @@ -309,17 +303,16 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable }; }; private NotificationStackScrollLogger mLogger; private NotificationStackScrollLogger mLogger; private CentralSurfaces mCentralSurfaces; private CentralSurfaces mCentralSurfaces; private int[] mTempInt2 = new int[2]; private final int[] mTempInt2 = new int[2]; private boolean mGenerateChildOrderChangedEvent; private boolean mGenerateChildOrderChangedEvent; private HashSet<Runnable> mAnimationFinishedRunnables = new HashSet<>(); private final HashSet<Runnable> mAnimationFinishedRunnables = new HashSet<>(); private HashSet<ExpandableView> mClearTransientViewsWhenFinished = new HashSet<>(); private final HashSet<ExpandableView> mClearTransientViewsWhenFinished = new HashSet<>(); private HashSet<Pair<ExpandableNotificationRow, Boolean>> mHeadsUpChangeAnimations private final HashSet<Pair<ExpandableNotificationRow, Boolean>> mHeadsUpChangeAnimations = new HashSet<>(); = new HashSet<>(); private boolean mTrackingHeadsUp; private boolean mForceNoOverlappingRendering; private boolean mForceNoOverlappingRendering; private final ArrayList<Pair<ExpandableNotificationRow, Boolean>> mTmpList = new ArrayList<>(); private final ArrayList<Pair<ExpandableNotificationRow, Boolean>> mTmpList = new ArrayList<>(); private boolean mAnimationRunning; private boolean mAnimationRunning; private ViewTreeObserver.OnPreDrawListener mRunningAnimationUpdater private final ViewTreeObserver.OnPreDrawListener mRunningAnimationUpdater = new ViewTreeObserver.OnPreDrawListener() { = new ViewTreeObserver.OnPreDrawListener() { @Override @Override public boolean onPreDraw() { public boolean onPreDraw() { Loading @@ -327,21 +320,21 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable return true; return true; } } }; }; private NotificationSection[] mSections; private final NotificationSection[] mSections; private boolean mAnimateNextBackgroundTop; private boolean mAnimateNextBackgroundTop; private boolean mAnimateNextBackgroundBottom; private boolean mAnimateNextBackgroundBottom; private boolean mAnimateNextSectionBoundsChange; private boolean mAnimateNextSectionBoundsChange; private int mBgColor; private int mBgColor; private float mDimAmount; private float mDimAmount; private ValueAnimator mDimAnimator; private ValueAnimator mDimAnimator; private ArrayList<ExpandableView> mTmpSortedChildren = new ArrayList<>(); private final ArrayList<ExpandableView> mTmpSortedChildren = new ArrayList<>(); private final Animator.AnimatorListener mDimEndListener = new AnimatorListenerAdapter() { private final Animator.AnimatorListener mDimEndListener = new AnimatorListenerAdapter() { @Override @Override public void onAnimationEnd(Animator animation) { public void onAnimationEnd(Animator animation) { mDimAnimator = null; mDimAnimator = null; } } }; }; private ValueAnimator.AnimatorUpdateListener mDimUpdateListener private final ValueAnimator.AnimatorUpdateListener mDimUpdateListener = new ValueAnimator.AnimatorUpdateListener() { = new ValueAnimator.AnimatorUpdateListener() { @Override @Override Loading @@ -351,29 +344,23 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable }; }; protected ViewGroup mQsHeader; protected ViewGroup mQsHeader; // Rect of QsHeader. Kept as a field just to avoid creating a new one each time. // Rect of QsHeader. Kept as a field just to avoid creating a new one each time. private Rect mQsHeaderBound = new Rect(); private final Rect mQsHeaderBound = new Rect(); private boolean mContinuousShadowUpdate; private boolean mContinuousShadowUpdate; private boolean mContinuousBackgroundUpdate; private boolean mContinuousBackgroundUpdate; private ViewTreeObserver.OnPreDrawListener mShadowUpdater private final ViewTreeObserver.OnPreDrawListener mShadowUpdater = () -> { = () -> { updateViewShadows(); updateViewShadows(); return true; return true; }; }; private ViewTreeObserver.OnPreDrawListener mBackgroundUpdater = () -> { private final ViewTreeObserver.OnPreDrawListener mBackgroundUpdater = () -> { updateBackground(); updateBackground(); return true; return true; }; }; private Comparator<ExpandableView> mViewPositionComparator = (view, otherView) -> { private final Comparator<ExpandableView> mViewPositionComparator = (view, otherView) -> { float endY = view.getTranslationY() + view.getActualHeight(); float endY = view.getTranslationY() + view.getActualHeight(); float otherEndY = otherView.getTranslationY() + otherView.getActualHeight(); float otherEndY = otherView.getTranslationY() + otherView.getActualHeight(); if (endY < otherEndY) { // Return zero when the two notifications end at the same location return -1; return Float.compare(endY, otherEndY); } else if (endY > otherEndY) { return 1; } else { // The two notifications end at the same location return 0; } }; }; private final ViewOutlineProvider mOutlineProvider = new ViewOutlineProvider() { private final ViewOutlineProvider mOutlineProvider = new ViewOutlineProvider() { @Override @Override Loading Loading @@ -435,16 +422,14 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private int mUpcomingStatusBarState; private int mUpcomingStatusBarState; private int mCachedBackgroundColor; private int mCachedBackgroundColor; private boolean mHeadsUpGoingAwayAnimationsAllowed = true; private boolean mHeadsUpGoingAwayAnimationsAllowed = true; private Runnable mReflingAndAnimateScroll = () -> { private final Runnable mReflingAndAnimateScroll = this::animateScroll; animateScroll(); }; private int mCornerRadius; private int mCornerRadius; private int mMinimumPaddings; private int mMinimumPaddings; private int mQsTilePadding; private int mQsTilePadding; private boolean mSkinnyNotifsInLandscape; private boolean mSkinnyNotifsInLandscape; private int mSidePaddings; private int mSidePaddings; private final Rect mBackgroundAnimationRect = new Rect(); private final Rect mBackgroundAnimationRect = new Rect(); private ArrayList<BiConsumer<Float, Float>> mExpandedHeightListeners = new ArrayList<>(); private final ArrayList<BiConsumer<Float, Float>> mExpandedHeightListeners = new ArrayList<>(); private int mHeadsUpInset; private int mHeadsUpInset; /** /** Loading Loading @@ -479,8 +464,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private int mWaterfallTopInset; private int mWaterfallTopInset; private NotificationStackScrollLayoutController mController; private NotificationStackScrollLayoutController mController; private boolean mKeyguardMediaControllorVisible; /** /** * The clip path used to clip the view in a rounded way. * The clip path used to clip the view in a rounded way. */ */ Loading @@ -501,7 +484,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private int mRoundedRectClippingTop; private int mRoundedRectClippingTop; private int mRoundedRectClippingBottom; private int mRoundedRectClippingBottom; private int mRoundedRectClippingRight; private int mRoundedRectClippingRight; private float[] mBgCornerRadii = new float[8]; private final float[] mBgCornerRadii = new float[8]; /** /** * Whether stackY should be animated in case the view is getting shorter than the scroll * Whether stackY should be animated in case the view is getting shorter than the scroll Loading @@ -527,7 +510,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable /** /** * Corner radii of the launched notification if it's clipped * Corner radii of the launched notification if it's clipped */ */ private float[] mLaunchedNotificationRadii = new float[8]; private final float[] mLaunchedNotificationRadii = new float[8]; /** /** * The notification that is being launched currently. * The notification that is being launched currently. Loading Loading @@ -779,7 +762,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable y = getLayoutHeight(); y = getLayoutHeight(); drawDebugInfo(canvas, y, Color.YELLOW, /* label= */ "getLayoutHeight() = " + y); drawDebugInfo(canvas, y, Color.YELLOW, /* label= */ "getLayoutHeight() = " + y); y = (int) mMaxLayoutHeight; y = mMaxLayoutHeight; drawDebugInfo(canvas, y, Color.MAGENTA, /* label= */ "mMaxLayoutHeight = " + y); drawDebugInfo(canvas, y, Color.MAGENTA, /* label= */ "mMaxLayoutHeight = " + y); // The space between mTopPadding and mKeyguardBottomPadding determines the available space // The space between mTopPadding and mKeyguardBottomPadding determines the available space Loading Loading @@ -997,7 +980,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mOverflingDistance = configuration.getScaledOverflingDistance(); mOverflingDistance = configuration.getScaledOverflingDistance(); Resources res = context.getResources(); Resources res = context.getResources(); mCollapsedSize = res.getDimensionPixelSize(R.dimen.notification_min_height); mGapHeight = res.getDimensionPixelSize(R.dimen.notification_section_divider_height); mGapHeight = res.getDimensionPixelSize(R.dimen.notification_section_divider_height); mStackScrollAlgorithm.initView(context); mStackScrollAlgorithm.initView(context); mAmbientState.reload(context); mAmbientState.reload(context); Loading Loading @@ -1256,12 +1238,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private void clampScrollPosition() { private void clampScrollPosition() { int scrollRange = getScrollRange(); int scrollRange = getScrollRange(); if (scrollRange < mOwnScrollY && !mAmbientState.isClearAllInProgress()) { if (scrollRange < mOwnScrollY && !mAmbientState.isClearAllInProgress()) { boolean animateStackY = false; if (scrollRange < getScrollAmountToScrollBoundary() && mAnimateStackYForContentHeightChange) { // if the scroll boundary updates the position of the stack, // if the scroll boundary updates the position of the stack, animateStackY = true; boolean animateStackY = scrollRange < getScrollAmountToScrollBoundary() } && mAnimateStackYForContentHeightChange; setOwnScrollY(scrollRange, animateStackY); setOwnScrollY(scrollRange, animateStackY); } } } } Loading Loading @@ -1504,7 +1483,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } } if (mAmbientState.isHiddenAtAll()) { if (mAmbientState.isHiddenAtAll()) { clipToOutline = false; invalidateOutline(); invalidateOutline(); if (isFullyHidden()) { if (isFullyHidden()) { setClipBounds(null); setClipBounds(null); Loading Loading @@ -1782,7 +1760,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } } @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER) @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER) private Runnable mReclamp = new Runnable() { private final Runnable mReclamp = new Runnable() { @Override @Override public void run() { public void run() { int range = getScrollRange(); int range = getScrollRange(); Loading Loading @@ -3084,11 +3062,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable int currentIndex = indexOfChild(child); int currentIndex = indexOfChild(child); if (currentIndex == -1) { if (currentIndex == -1) { boolean isTransient = false; boolean isTransient = child instanceof ExpandableNotificationRow if (child instanceof ExpandableNotificationRow && child.getTransientContainer() != null; && child.getTransientContainer() != null) { isTransient = true; } Log.e(TAG, "Attempting to re-position " Log.e(TAG, "Attempting to re-position " + (isTransient ? "transient" : "") + (isTransient ? "transient" : "") + " view {" + " view {" Loading Loading @@ -3149,7 +3124,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private void generateHeadsUpAnimationEvents() { private void generateHeadsUpAnimationEvents() { for (Pair<ExpandableNotificationRow, Boolean> eventPair : mHeadsUpChangeAnimations) { for (Pair<ExpandableNotificationRow, Boolean> eventPair : mHeadsUpChangeAnimations) { ExpandableNotificationRow row = eventPair.first; ExpandableNotificationRow row = eventPair.first; String key = row.getEntry().getKey(); boolean isHeadsUp = eventPair.second; boolean isHeadsUp = eventPair.second; if (isHeadsUp != row.isHeadsUp()) { if (isHeadsUp != row.isHeadsUp()) { // For cases where we have a heads up showing and appearing again we shouldn't // For cases where we have a heads up showing and appearing again we shouldn't Loading Loading @@ -3212,10 +3186,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable @ShadeViewRefactor(RefactorComponent.COORDINATOR) @ShadeViewRefactor(RefactorComponent.COORDINATOR) private boolean shouldHunAppearFromBottom(ExpandableViewState viewState) { private boolean shouldHunAppearFromBottom(ExpandableViewState viewState) { if (viewState.yTranslation + viewState.height < mAmbientState.getMaxHeadsUpTranslation()) { return viewState.yTranslation + viewState.height return false; >= mAmbientState.getMaxHeadsUpTranslation(); } return true; } } @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER) @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER) Loading Loading @@ -4790,7 +4762,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) public void setTrackingHeadsUp(ExpandableNotificationRow row) { public void setTrackingHeadsUp(ExpandableNotificationRow row) { mAmbientState.setTrackedHeadsUpRow(row); mAmbientState.setTrackedHeadsUpRow(row); mTrackingHeadsUp = row != null; } } @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) Loading Loading @@ -6176,7 +6147,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } } @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) private ExpandHelper.Callback mExpandHelperCallback = new ExpandHelper.Callback() { private final ExpandHelper.Callback mExpandHelperCallback = new ExpandHelper.Callback() { @Override @Override public ExpandableView getChildAtPosition(float touchX, float touchY) { public ExpandableView getChildAtPosition(float touchX, float touchY) { return NotificationStackScrollLayout.this.getChildAtPosition(touchX, touchY); return NotificationStackScrollLayout.this.getChildAtPosition(touchX, touchY); Loading Loading
packages/SystemUI/src/com/android/systemui/accessibility/SimpleMirrorWindowControl.java +3 −4 Original line number Original line Diff line number Diff line Loading @@ -45,7 +45,7 @@ class SimpleMirrorWindowControl extends MirrorWindowControl implements View.OnCl private boolean mShouldSetTouchStart; private boolean mShouldSetTouchStart; @Nullable private MoveWindowTask mMoveWindowTask; @Nullable private MoveWindowTask mMoveWindowTask; private PointF mLastDrag = new PointF(); private final PointF mLastDrag = new PointF(); private final Handler mHandler; private final Handler mHandler; SimpleMirrorWindowControl(Context context, Handler handler) { SimpleMirrorWindowControl(Context context, Handler handler) { Loading Loading @@ -92,8 +92,7 @@ class SimpleMirrorWindowControl extends MirrorWindowControl implements View.OnCl } } private Point findOffset(View v, int moveFrameAmount) { private Point findOffset(View v, int moveFrameAmount) { final Point offset = mTmpPoint; mTmpPoint.set(0, 0); offset.set(0, 0); if (v.getId() == R.id.left_control) { if (v.getId() == R.id.left_control) { mTmpPoint.x = -moveFrameAmount; mTmpPoint.x = -moveFrameAmount; } else if (v.getId() == R.id.up_control) { } else if (v.getId() == R.id.up_control) { Loading Loading @@ -184,7 +183,7 @@ class SimpleMirrorWindowControl extends MirrorWindowControl implements View.OnCl private final int mYOffset; private final int mYOffset; private final Handler mHandler; private final Handler mHandler; /** Time in milliseconds between successive task executions.*/ /** Time in milliseconds between successive task executions.*/ private long mPeriod; private final long mPeriod; private boolean mCancel; private boolean mCancel; MoveWindowTask(@NonNull MirrorWindowDelegate windowDelegate, Handler handler, int xOffset, MoveWindowTask(@NonNull MirrorWindowDelegate windowDelegate, Handler handler, int xOffset, Loading
packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationController.java +5 −7 Original line number Original line Diff line number Diff line Loading @@ -104,7 +104,7 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold private final Context mContext; private final Context mContext; private final Resources mResources; private final Resources mResources; private final Handler mHandler; private final Handler mHandler; private Rect mWindowBounds; private final Rect mWindowBounds; private final int mDisplayId; private final int mDisplayId; @Surface.Rotation @Surface.Rotation @VisibleForTesting @VisibleForTesting Loading Loading @@ -193,11 +193,11 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold private final SfVsyncFrameCallbackProvider mSfVsyncFrameProvider; private final SfVsyncFrameCallbackProvider mSfVsyncFrameProvider; private final MagnificationGestureDetector mGestureDetector; private final MagnificationGestureDetector mGestureDetector; private final int mBounceEffectDuration; private final int mBounceEffectDuration; private Choreographer.FrameCallback mMirrorViewGeometryVsyncCallback; private final Choreographer.FrameCallback mMirrorViewGeometryVsyncCallback; private Locale mLocale; private Locale mLocale; private NumberFormat mPercentFormat; private NumberFormat mPercentFormat; private float mBounceEffectAnimationScale; private float mBounceEffectAnimationScale; private SysUiState mSysUiState; private final SysUiState mSysUiState; // Set it to true when the view is overlapped with the gesture insets at the bottom. // Set it to true when the view is overlapped with the gesture insets at the bottom. private boolean mOverlapWithGestureInsets; private boolean mOverlapWithGestureInsets; private boolean mIsDragging; private boolean mIsDragging; Loading @@ -215,7 +215,7 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold private boolean mEditSizeEnable = false; private boolean mEditSizeEnable = false; @Nullable @Nullable private MirrorWindowControl mMirrorWindowControl; private final MirrorWindowControl mMirrorWindowControl; WindowMagnificationController( WindowMagnificationController( @UiContext Context context, @UiContext Context context, Loading Loading @@ -562,9 +562,7 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold /** Returns the rotation degree change of two {@link Surface.Rotation} */ /** Returns the rotation degree change of two {@link Surface.Rotation} */ private int getDegreeFromRotation(@Surface.Rotation int newRotation, private int getDegreeFromRotation(@Surface.Rotation int newRotation, @Surface.Rotation int oldRotation) { @Surface.Rotation int oldRotation) { final int rotationDiff = oldRotation - newRotation; return (oldRotation - newRotation + 4) % 4 * 90; final int degree = (rotationDiff + 4) % 4 * 90; return degree; } } private void createMirrorWindow() { private void createMirrorWindow() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSection.java +6 −7 Original line number Original line Diff line number Diff line Loading @@ -35,12 +35,12 @@ import com.android.systemui.statusbar.notification.row.ExpandableView; * bounds change. * bounds change. */ */ public class NotificationSection { public class NotificationSection { private @PriorityBucket int mBucket; private @PriorityBucket final int mBucket; private View mOwningView; private final View mOwningView; private Rect mBounds = new Rect(); private final Rect mBounds = new Rect(); private Rect mCurrentBounds = new Rect(-1, -1, -1, -1); private final Rect mCurrentBounds = new Rect(-1, -1, -1, -1); private Rect mStartAnimationRect = new Rect(); private final Rect mStartAnimationRect = new Rect(); private Rect mEndAnimationRect = new Rect(); private final Rect mEndAnimationRect = new Rect(); private ObjectAnimator mTopAnimator = null; private ObjectAnimator mTopAnimator = null; private ObjectAnimator mBottomAnimator = null; private ObjectAnimator mBottomAnimator = null; private ExpandableView mFirstVisibleChild; private ExpandableView mFirstVisibleChild; Loading Loading @@ -277,7 +277,6 @@ public class NotificationSection { } } } } } } top = Math.max(minTopPosition, top); ExpandableView lastView = getLastVisibleChild(); ExpandableView lastView = getLastVisibleChild(); if (lastView != null) { if (lastView != null) { float finalTranslationY = ViewState.getFinalTranslationY(lastView); float finalTranslationY = ViewState.getFinalTranslationY(lastView); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +41 −70 Original line number Original line Diff line number Diff line Loading @@ -135,7 +135,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private static final boolean SPEW = Log.isLoggable(TAG, Log.VERBOSE); private static final boolean SPEW = Log.isLoggable(TAG, Log.VERBOSE); // Delay in milli-seconds before shade closes for clear all. // Delay in milli-seconds before shade closes for clear all. private final int DELAY_BEFORE_SHADE_CLOSE = 200; private static final int DELAY_BEFORE_SHADE_CLOSE = 200; private boolean mShadeNeedsToClose = false; private boolean mShadeNeedsToClose = false; private static final float RUBBER_BAND_FACTOR_NORMAL = 0.35f; private static final float RUBBER_BAND_FACTOR_NORMAL = 0.35f; Loading @@ -152,7 +152,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private static final int DISTANCE_BETWEEN_ADJACENT_SECTIONS_PX = 1; private static final int DISTANCE_BETWEEN_ADJACENT_SECTIONS_PX = 1; private boolean mKeyguardBypassEnabled; private boolean mKeyguardBypassEnabled; private ExpandHelper mExpandHelper; private final ExpandHelper mExpandHelper; private NotificationSwipeHelper mSwipeHelper; private NotificationSwipeHelper mSwipeHelper; private int mCurrentStackHeight = Integer.MAX_VALUE; private int mCurrentStackHeight = Integer.MAX_VALUE; private final Paint mBackgroundPaint = new Paint(); private final Paint mBackgroundPaint = new Paint(); Loading @@ -165,12 +165,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private VelocityTracker mVelocityTracker; private VelocityTracker mVelocityTracker; private OverScroller mScroller; private OverScroller mScroller; /** Last Y position reported by {@link #mScroller}, used to calculate scroll delta. */ private int mLastScrollerY; /** * True if the max position was set to a known position on the last call to {@link #mScroller}. */ private boolean mIsScrollerBoundSet; private Runnable mFinishScrollingCallback; private Runnable mFinishScrollingCallback; private int mTouchSlop; private int mTouchSlop; private float mSlopMultiplier; private float mSlopMultiplier; Loading @@ -194,7 +189,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private int mContentHeight; private int mContentHeight; private float mIntrinsicContentHeight; private float mIntrinsicContentHeight; private int mCollapsedSize; private int mPaddingBetweenElements; private int mPaddingBetweenElements; private int mMaxTopPadding; private int mMaxTopPadding; private int mTopPadding; private int mTopPadding; Loading @@ -210,15 +204,15 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private final StackScrollAlgorithm mStackScrollAlgorithm; private final StackScrollAlgorithm mStackScrollAlgorithm; private final AmbientState mAmbientState; private final AmbientState mAmbientState; private GroupMembershipManager mGroupMembershipManager; private final GroupMembershipManager mGroupMembershipManager; private GroupExpansionManager mGroupExpansionManager; private final GroupExpansionManager mGroupExpansionManager; private HashSet<ExpandableView> mChildrenToAddAnimated = new HashSet<>(); private final HashSet<ExpandableView> mChildrenToAddAnimated = new HashSet<>(); private ArrayList<View> mAddedHeadsUpChildren = new ArrayList<>(); private final ArrayList<View> mAddedHeadsUpChildren = new ArrayList<>(); private ArrayList<ExpandableView> mChildrenToRemoveAnimated = new ArrayList<>(); private final ArrayList<ExpandableView> mChildrenToRemoveAnimated = new ArrayList<>(); private ArrayList<ExpandableView> mChildrenChangingPositions = new ArrayList<>(); private final ArrayList<ExpandableView> mChildrenChangingPositions = new ArrayList<>(); private HashSet<View> mFromMoreCardAdditions = new HashSet<>(); private final HashSet<View> mFromMoreCardAdditions = new HashSet<>(); private ArrayList<AnimationEvent> mAnimationEvents = new ArrayList<>(); private final ArrayList<AnimationEvent> mAnimationEvents = new ArrayList<>(); private ArrayList<View> mSwipedOutViews = new ArrayList<>(); private final ArrayList<View> mSwipedOutViews = new ArrayList<>(); private NotificationStackSizeCalculator mNotificationStackSizeCalculator; private NotificationStackSizeCalculator mNotificationStackSizeCalculator; private final StackStateAnimator mStateAnimator = new StackStateAnimator(this); private final StackStateAnimator mStateAnimator = new StackStateAnimator(this); private boolean mAnimationsEnabled; private boolean mAnimationsEnabled; Loading Loading @@ -296,7 +290,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private boolean mDisallowDismissInThisMotion; private boolean mDisallowDismissInThisMotion; private boolean mDisallowScrollingInThisMotion; private boolean mDisallowScrollingInThisMotion; private long mGoToFullShadeDelay; private long mGoToFullShadeDelay; private ViewTreeObserver.OnPreDrawListener mChildrenUpdater private final ViewTreeObserver.OnPreDrawListener mChildrenUpdater = new ViewTreeObserver.OnPreDrawListener() { = new ViewTreeObserver.OnPreDrawListener() { @Override @Override public boolean onPreDraw() { public boolean onPreDraw() { Loading @@ -309,17 +303,16 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable }; }; private NotificationStackScrollLogger mLogger; private NotificationStackScrollLogger mLogger; private CentralSurfaces mCentralSurfaces; private CentralSurfaces mCentralSurfaces; private int[] mTempInt2 = new int[2]; private final int[] mTempInt2 = new int[2]; private boolean mGenerateChildOrderChangedEvent; private boolean mGenerateChildOrderChangedEvent; private HashSet<Runnable> mAnimationFinishedRunnables = new HashSet<>(); private final HashSet<Runnable> mAnimationFinishedRunnables = new HashSet<>(); private HashSet<ExpandableView> mClearTransientViewsWhenFinished = new HashSet<>(); private final HashSet<ExpandableView> mClearTransientViewsWhenFinished = new HashSet<>(); private HashSet<Pair<ExpandableNotificationRow, Boolean>> mHeadsUpChangeAnimations private final HashSet<Pair<ExpandableNotificationRow, Boolean>> mHeadsUpChangeAnimations = new HashSet<>(); = new HashSet<>(); private boolean mTrackingHeadsUp; private boolean mForceNoOverlappingRendering; private boolean mForceNoOverlappingRendering; private final ArrayList<Pair<ExpandableNotificationRow, Boolean>> mTmpList = new ArrayList<>(); private final ArrayList<Pair<ExpandableNotificationRow, Boolean>> mTmpList = new ArrayList<>(); private boolean mAnimationRunning; private boolean mAnimationRunning; private ViewTreeObserver.OnPreDrawListener mRunningAnimationUpdater private final ViewTreeObserver.OnPreDrawListener mRunningAnimationUpdater = new ViewTreeObserver.OnPreDrawListener() { = new ViewTreeObserver.OnPreDrawListener() { @Override @Override public boolean onPreDraw() { public boolean onPreDraw() { Loading @@ -327,21 +320,21 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable return true; return true; } } }; }; private NotificationSection[] mSections; private final NotificationSection[] mSections; private boolean mAnimateNextBackgroundTop; private boolean mAnimateNextBackgroundTop; private boolean mAnimateNextBackgroundBottom; private boolean mAnimateNextBackgroundBottom; private boolean mAnimateNextSectionBoundsChange; private boolean mAnimateNextSectionBoundsChange; private int mBgColor; private int mBgColor; private float mDimAmount; private float mDimAmount; private ValueAnimator mDimAnimator; private ValueAnimator mDimAnimator; private ArrayList<ExpandableView> mTmpSortedChildren = new ArrayList<>(); private final ArrayList<ExpandableView> mTmpSortedChildren = new ArrayList<>(); private final Animator.AnimatorListener mDimEndListener = new AnimatorListenerAdapter() { private final Animator.AnimatorListener mDimEndListener = new AnimatorListenerAdapter() { @Override @Override public void onAnimationEnd(Animator animation) { public void onAnimationEnd(Animator animation) { mDimAnimator = null; mDimAnimator = null; } } }; }; private ValueAnimator.AnimatorUpdateListener mDimUpdateListener private final ValueAnimator.AnimatorUpdateListener mDimUpdateListener = new ValueAnimator.AnimatorUpdateListener() { = new ValueAnimator.AnimatorUpdateListener() { @Override @Override Loading @@ -351,29 +344,23 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable }; }; protected ViewGroup mQsHeader; protected ViewGroup mQsHeader; // Rect of QsHeader. Kept as a field just to avoid creating a new one each time. // Rect of QsHeader. Kept as a field just to avoid creating a new one each time. private Rect mQsHeaderBound = new Rect(); private final Rect mQsHeaderBound = new Rect(); private boolean mContinuousShadowUpdate; private boolean mContinuousShadowUpdate; private boolean mContinuousBackgroundUpdate; private boolean mContinuousBackgroundUpdate; private ViewTreeObserver.OnPreDrawListener mShadowUpdater private final ViewTreeObserver.OnPreDrawListener mShadowUpdater = () -> { = () -> { updateViewShadows(); updateViewShadows(); return true; return true; }; }; private ViewTreeObserver.OnPreDrawListener mBackgroundUpdater = () -> { private final ViewTreeObserver.OnPreDrawListener mBackgroundUpdater = () -> { updateBackground(); updateBackground(); return true; return true; }; }; private Comparator<ExpandableView> mViewPositionComparator = (view, otherView) -> { private final Comparator<ExpandableView> mViewPositionComparator = (view, otherView) -> { float endY = view.getTranslationY() + view.getActualHeight(); float endY = view.getTranslationY() + view.getActualHeight(); float otherEndY = otherView.getTranslationY() + otherView.getActualHeight(); float otherEndY = otherView.getTranslationY() + otherView.getActualHeight(); if (endY < otherEndY) { // Return zero when the two notifications end at the same location return -1; return Float.compare(endY, otherEndY); } else if (endY > otherEndY) { return 1; } else { // The two notifications end at the same location return 0; } }; }; private final ViewOutlineProvider mOutlineProvider = new ViewOutlineProvider() { private final ViewOutlineProvider mOutlineProvider = new ViewOutlineProvider() { @Override @Override Loading Loading @@ -435,16 +422,14 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private int mUpcomingStatusBarState; private int mUpcomingStatusBarState; private int mCachedBackgroundColor; private int mCachedBackgroundColor; private boolean mHeadsUpGoingAwayAnimationsAllowed = true; private boolean mHeadsUpGoingAwayAnimationsAllowed = true; private Runnable mReflingAndAnimateScroll = () -> { private final Runnable mReflingAndAnimateScroll = this::animateScroll; animateScroll(); }; private int mCornerRadius; private int mCornerRadius; private int mMinimumPaddings; private int mMinimumPaddings; private int mQsTilePadding; private int mQsTilePadding; private boolean mSkinnyNotifsInLandscape; private boolean mSkinnyNotifsInLandscape; private int mSidePaddings; private int mSidePaddings; private final Rect mBackgroundAnimationRect = new Rect(); private final Rect mBackgroundAnimationRect = new Rect(); private ArrayList<BiConsumer<Float, Float>> mExpandedHeightListeners = new ArrayList<>(); private final ArrayList<BiConsumer<Float, Float>> mExpandedHeightListeners = new ArrayList<>(); private int mHeadsUpInset; private int mHeadsUpInset; /** /** Loading Loading @@ -479,8 +464,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private int mWaterfallTopInset; private int mWaterfallTopInset; private NotificationStackScrollLayoutController mController; private NotificationStackScrollLayoutController mController; private boolean mKeyguardMediaControllorVisible; /** /** * The clip path used to clip the view in a rounded way. * The clip path used to clip the view in a rounded way. */ */ Loading @@ -501,7 +484,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private int mRoundedRectClippingTop; private int mRoundedRectClippingTop; private int mRoundedRectClippingBottom; private int mRoundedRectClippingBottom; private int mRoundedRectClippingRight; private int mRoundedRectClippingRight; private float[] mBgCornerRadii = new float[8]; private final float[] mBgCornerRadii = new float[8]; /** /** * Whether stackY should be animated in case the view is getting shorter than the scroll * Whether stackY should be animated in case the view is getting shorter than the scroll Loading @@ -527,7 +510,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable /** /** * Corner radii of the launched notification if it's clipped * Corner radii of the launched notification if it's clipped */ */ private float[] mLaunchedNotificationRadii = new float[8]; private final float[] mLaunchedNotificationRadii = new float[8]; /** /** * The notification that is being launched currently. * The notification that is being launched currently. Loading Loading @@ -779,7 +762,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable y = getLayoutHeight(); y = getLayoutHeight(); drawDebugInfo(canvas, y, Color.YELLOW, /* label= */ "getLayoutHeight() = " + y); drawDebugInfo(canvas, y, Color.YELLOW, /* label= */ "getLayoutHeight() = " + y); y = (int) mMaxLayoutHeight; y = mMaxLayoutHeight; drawDebugInfo(canvas, y, Color.MAGENTA, /* label= */ "mMaxLayoutHeight = " + y); drawDebugInfo(canvas, y, Color.MAGENTA, /* label= */ "mMaxLayoutHeight = " + y); // The space between mTopPadding and mKeyguardBottomPadding determines the available space // The space between mTopPadding and mKeyguardBottomPadding determines the available space Loading Loading @@ -997,7 +980,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mOverflingDistance = configuration.getScaledOverflingDistance(); mOverflingDistance = configuration.getScaledOverflingDistance(); Resources res = context.getResources(); Resources res = context.getResources(); mCollapsedSize = res.getDimensionPixelSize(R.dimen.notification_min_height); mGapHeight = res.getDimensionPixelSize(R.dimen.notification_section_divider_height); mGapHeight = res.getDimensionPixelSize(R.dimen.notification_section_divider_height); mStackScrollAlgorithm.initView(context); mStackScrollAlgorithm.initView(context); mAmbientState.reload(context); mAmbientState.reload(context); Loading Loading @@ -1256,12 +1238,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private void clampScrollPosition() { private void clampScrollPosition() { int scrollRange = getScrollRange(); int scrollRange = getScrollRange(); if (scrollRange < mOwnScrollY && !mAmbientState.isClearAllInProgress()) { if (scrollRange < mOwnScrollY && !mAmbientState.isClearAllInProgress()) { boolean animateStackY = false; if (scrollRange < getScrollAmountToScrollBoundary() && mAnimateStackYForContentHeightChange) { // if the scroll boundary updates the position of the stack, // if the scroll boundary updates the position of the stack, animateStackY = true; boolean animateStackY = scrollRange < getScrollAmountToScrollBoundary() } && mAnimateStackYForContentHeightChange; setOwnScrollY(scrollRange, animateStackY); setOwnScrollY(scrollRange, animateStackY); } } } } Loading Loading @@ -1504,7 +1483,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } } if (mAmbientState.isHiddenAtAll()) { if (mAmbientState.isHiddenAtAll()) { clipToOutline = false; invalidateOutline(); invalidateOutline(); if (isFullyHidden()) { if (isFullyHidden()) { setClipBounds(null); setClipBounds(null); Loading Loading @@ -1782,7 +1760,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } } @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER) @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER) private Runnable mReclamp = new Runnable() { private final Runnable mReclamp = new Runnable() { @Override @Override public void run() { public void run() { int range = getScrollRange(); int range = getScrollRange(); Loading Loading @@ -3084,11 +3062,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable int currentIndex = indexOfChild(child); int currentIndex = indexOfChild(child); if (currentIndex == -1) { if (currentIndex == -1) { boolean isTransient = false; boolean isTransient = child instanceof ExpandableNotificationRow if (child instanceof ExpandableNotificationRow && child.getTransientContainer() != null; && child.getTransientContainer() != null) { isTransient = true; } Log.e(TAG, "Attempting to re-position " Log.e(TAG, "Attempting to re-position " + (isTransient ? "transient" : "") + (isTransient ? "transient" : "") + " view {" + " view {" Loading Loading @@ -3149,7 +3124,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private void generateHeadsUpAnimationEvents() { private void generateHeadsUpAnimationEvents() { for (Pair<ExpandableNotificationRow, Boolean> eventPair : mHeadsUpChangeAnimations) { for (Pair<ExpandableNotificationRow, Boolean> eventPair : mHeadsUpChangeAnimations) { ExpandableNotificationRow row = eventPair.first; ExpandableNotificationRow row = eventPair.first; String key = row.getEntry().getKey(); boolean isHeadsUp = eventPair.second; boolean isHeadsUp = eventPair.second; if (isHeadsUp != row.isHeadsUp()) { if (isHeadsUp != row.isHeadsUp()) { // For cases where we have a heads up showing and appearing again we shouldn't // For cases where we have a heads up showing and appearing again we shouldn't Loading Loading @@ -3212,10 +3186,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable @ShadeViewRefactor(RefactorComponent.COORDINATOR) @ShadeViewRefactor(RefactorComponent.COORDINATOR) private boolean shouldHunAppearFromBottom(ExpandableViewState viewState) { private boolean shouldHunAppearFromBottom(ExpandableViewState viewState) { if (viewState.yTranslation + viewState.height < mAmbientState.getMaxHeadsUpTranslation()) { return viewState.yTranslation + viewState.height return false; >= mAmbientState.getMaxHeadsUpTranslation(); } return true; } } @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER) @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER) Loading Loading @@ -4790,7 +4762,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) public void setTrackingHeadsUp(ExpandableNotificationRow row) { public void setTrackingHeadsUp(ExpandableNotificationRow row) { mAmbientState.setTrackedHeadsUpRow(row); mAmbientState.setTrackedHeadsUpRow(row); mTrackingHeadsUp = row != null; } } @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) Loading Loading @@ -6176,7 +6147,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } } @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) private ExpandHelper.Callback mExpandHelperCallback = new ExpandHelper.Callback() { private final ExpandHelper.Callback mExpandHelperCallback = new ExpandHelper.Callback() { @Override @Override public ExpandableView getChildAtPosition(float touchX, float touchY) { public ExpandableView getChildAtPosition(float touchX, float touchY) { return NotificationStackScrollLayout.this.getChildAtPosition(touchX, touchY); return NotificationStackScrollLayout.this.getChildAtPosition(touchX, touchY); Loading