From 4e225355d79ad4f798e90a853b10dddaca868b11 Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Thu, 13 Jul 2023 18:07:05 +0000 Subject: [PATCH] Remove unused qs_peek_height, redundant height method Seems to be always 0. Removing as I am aiming to refactor calls from NPVC Bug: 287644451 Test: atest SystemUITests Change-Id: I295a7421cfdbee5e9fa55cf3f7c231f624f38c07 --- packages/SystemUI/res/values/dimens.xml | 3 --- .../shade/NotificationPanelViewController.java | 4 ++-- .../systemui/shade/QuickSettingsController.java | 11 +---------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 47cd1e7075579..3366f4f6d443c 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -663,9 +663,6 @@ 4dp - - 0dp - 20dp diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java index ea15035a6c6f3..cfecf7de37801 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java @@ -1473,7 +1473,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump // so we should not add a padding for them stackScrollerPadding = 0; } else { - stackScrollerPadding = mQsController.getUnlockedStackScrollerPadding(); + stackScrollerPadding = mQsController.getHeaderHeight(); } } else { stackScrollerPadding = mClockPositionResult.stackScrollerPaddingExpanded; @@ -1520,7 +1520,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump userSwitcherPreferredY, darkAmount, mOverStretchAmount, bypassEnabled, - mQsController.getUnlockedStackScrollerPadding(), + mQsController.getHeaderHeight(), mQsController.computeExpansionFraction(), mDisplayTopInset, mSplitShadeEnabled, diff --git a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java index 025c461110ef0..baac57ca44bad 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java @@ -233,7 +233,6 @@ public class QuickSettingsController implements Dumpable { private int mMaxExpansionHeight; /** Expansion fraction of the notification shade */ private float mShadeExpandedFraction; - private int mPeekHeight; private float mLastOverscroll; private boolean mExpansionFromOverscroll; private boolean mExpansionEnabledPolicy = true; @@ -429,7 +428,6 @@ public class QuickSettingsController implements Dumpable { final ViewConfiguration configuration = ViewConfiguration.get(this.mPanelView.getContext()); mTouchSlop = configuration.getScaledTouchSlop(); mSlopMultiplier = configuration.getScaledAmbiguousGestureMultiplier(); - mPeekHeight = mResources.getDimensionPixelSize(R.dimen.qs_peek_height); mStatusBarMinHeight = SystemBarUtils.getStatusBarHeight(mPanelView.getContext()); mScrimCornerRadius = mResources.getDimensionPixelSize( R.dimen.notification_scrim_corner_radius); @@ -500,12 +498,7 @@ public class QuickSettingsController implements Dumpable { } int getHeaderHeight() { - return mQs.getHeader().getHeight(); - } - - /** Returns the padding of the stackscroller when unlocked */ - int getUnlockedStackScrollerPadding() { - return (mQs != null ? mQs.getHeader().getHeight() : 0) + mPeekHeight; + return isQsFragmentCreated() ? mQs.getHeader().getHeight() : 0; } private boolean isRemoteInputActiveWithKeyboardUp() { @@ -2090,8 +2083,6 @@ public class QuickSettingsController implements Dumpable { ipw.println(mMaxExpansionHeight); ipw.print("mShadeExpandedFraction="); ipw.println(mShadeExpandedFraction); - ipw.print("mPeekHeight="); - ipw.println(mPeekHeight); ipw.print("mLastOverscroll="); ipw.println(mLastOverscroll); ipw.print("mExpansionFromOverscroll=");