Resolved minor warnings in a few notification and accessibility am: 53c2c0a843

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19945424

Change-Id: I23204d8a48298f09724a95f8672810413deafb8c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Shawn Lee
2022-10-04 18:35:59 +00:00
committed by Automerger Merge Worker
4 changed files with 55 additions and 88 deletions

View File

@@ -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) {
@@ -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) {
@@ -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,

View File

@@ -94,7 +94,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
@@ -174,16 +174,16 @@ 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;
@Nullable @Nullable
private MirrorWindowControl mMirrorWindowControl; private final MirrorWindowControl mMirrorWindowControl;
WindowMagnificationController(@UiContext Context context, @NonNull Handler handler, WindowMagnificationController(@UiContext Context context, @NonNull Handler handler,
@NonNull WindowMagnificationAnimationController animationController, @NonNull WindowMagnificationAnimationController animationController,
@@ -489,9 +489,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() {

View File

@@ -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;
@@ -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);

View File

@@ -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;
@@ -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();
@@ -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;
@@ -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;
@@ -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;
@@ -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() {
@@ -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() {
@@ -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
@@ -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
@@ -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;
/** /**
@@ -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.
*/ */
@@ -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
@@ -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.
@@ -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
@@ -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);
@@ -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 the scroll boundary updates the position of the stack,
if (scrollRange < getScrollAmountToScrollBoundary() boolean animateStackY = scrollRange < getScrollAmountToScrollBoundary()
&& mAnimateStackYForContentHeightChange) { && mAnimateStackYForContentHeightChange;
// if the scroll boundary updates the position of the stack,
animateStackY = true;
}
setOwnScrollY(scrollRange, animateStackY); setOwnScrollY(scrollRange, animateStackY);
} }
} }
@@ -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);
@@ -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();
@@ -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 {"
@@ -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
@@ -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)
@@ -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)
@@ -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);