Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1c4f56a authored by Justin Weir's avatar Justin Weir
Browse files

Delete dead code

Several recent flag cleanups resulted in small portions of NPVC being
dead code. This CL removes the dead code in NPVC and QSCI. Changes
include removal of method parameters where only 1 value was ever passed
and any dead code resulting from those removals.

Test: building and running automated tests is sufficient
Bug: EXEMPT cleanup
Flag: EXEMPT cleanup CL
Change-Id: I4b9db7fec7a534f1c9b21b6d8389c3115bc46d23
parent 62b7a14d
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -531,9 +531,6 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {

        mNotificationPanelViewController = new NotificationPanelViewController(
                mView,
                mMainHandler,
                mLayoutInflater,
                mFeatureFlags,
                coordinator, expansionHandler, mDynamicPrivacyController, mKeyguardBypassController,
                mFalsingManager, new FalsingCollectorFake(),
                mKeyguardStateController,
@@ -553,7 +550,6 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
                mKeyguardStatusBarViewComponentFactory,
                mLockscreenShadeTransitionController,
                mScrimController,
                mUserManager,
                mMediaDataManager,
                mNotificationShadeDepthController,
                mAmbientState,
@@ -564,7 +560,6 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
                mQsController,
                mFragmentService,
                mStatusBarService,
                mContentResolver,
                mShadeHeaderController,
                mScreenOffAnimationController,
                mLockscreenGestureLogger,
@@ -575,7 +570,6 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
                mKeyguardUnlockAnimationController,
                mKeyguardIndicationController,
                mNotificationListContainer,
                mNotificationStackSizeCalculator,
                mUnlockedScreenOffAnimationController,
                systemClock,
                mKeyguardClockInteractor,
@@ -594,7 +588,6 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
                new ResourcesSplitShadeStateController(),
                mPowerInteractor,
                mKeyguardClockPositionAlgorithm,
                mNaturalScrollingSettingObserver,
                mMSDLPlayer,
                mBrightnessMirrorShowingInteractor);
        mNotificationPanelViewController.initDependencies(
+49 −170

File changed.

Preview size limit exceeded, changes collapsed.

+4 −19
Original line number Diff line number Diff line
@@ -114,9 +114,7 @@ import java.io.PrintWriter;
import javax.inject.Inject;
import javax.inject.Provider;

/** Handles QuickSettings touch handling, expansion and animation state
 * TODO (b/264460656) make this dumpable
 */
/** Handles QuickSettings touch handling, expansion and animation state. */
@SysUISingleton
public class QuickSettingsControllerImpl implements QuickSettingsController, Dumpable {
    public static final String TAG = "QuickSettingsController";
@@ -294,7 +292,6 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum
    private ValueAnimator mSizeChangeAnimator;

    private ExpansionHeightListener mExpansionHeightListener;
    private QsStateUpdateListener mQsStateUpdateListener;
    private ApplyClippingImmediatelyListener mApplyClippingImmediatelyListener;
    private FlingQsWithoutClickListener mFlingQsWithoutClickListener;
    private ExpansionHeightSetToMaxListener mExpansionHeightSetToMaxListener;
@@ -401,10 +398,6 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum
        mExpansionHeightListener = listener;
    }

    void setQsStateUpdateListener(QsStateUpdateListener listener) {
        mQsStateUpdateListener = listener;
    }

    void setApplyClippingImmediatelyListener(ApplyClippingImmediatelyListener listener) {
        mApplyClippingImmediatelyListener = listener;
    }
@@ -562,7 +555,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum
        }
        // TODO (b/265193930): remove dependency on NPVC
        // Let's reject anything at the very bottom around the home handle in gesture nav
        if (mPanelViewControllerLazy.get().isInGestureNavHomeHandleArea(x, y)) {
        if (mPanelViewControllerLazy.get().isInGestureNavHomeHandleArea(y)) {
            return false;
        }
        return y <= mNotificationStackScrollLayoutController.getBottomMostNotificationBottom()
@@ -804,7 +797,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum
        if (changed) {
            mShadeRepository.setLegacyIsQsExpanded(expanded);
            updateQsState();
            mPanelViewControllerLazy.get().onQsExpansionChanged(expanded);
            mPanelViewControllerLazy.get().onQsExpansionChanged();
            mShadeLog.logQsExpansionChanged("QS Expansion Changed.", expanded,
                    getMinExpansionHeight(), getMaxExpansionHeight(),
                    mStackScrollerOverscrolling, mAnimatorExpand, mAnimating);
@@ -1021,10 +1014,6 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum
    }

    void updateQsState() {
        if (mQsStateUpdateListener != null) {
            mQsStateUpdateListener.onQsStateUpdated(getExpanded(), mStackScrollerOverscrolling);
        }

        if (mQs == null) return;
        mQs.setExpanded(getExpanded());
    }
@@ -1203,7 +1192,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum
    /**
     * Applies clipping to quick settings, notifications layout and
     * updates bounds of the notifications background (notifications scrim).
     *
     * <p>
     * The parameters are bounds of the notifications area rectangle, this function
     * calculates bounds for the QS clipping based on the notifications bounds.
     */
@@ -2395,10 +2384,6 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum
        void onQsSetExpansionHeightCalled(boolean qsFullyExpanded);
    }

    interface QsStateUpdateListener {
        void onQsStateUpdated(boolean qsExpanded, boolean isStackScrollerOverscrolling);
    }

    interface ApplyClippingImmediatelyListener {
        void onQsClippingImmediatelyApplied(boolean clipStatusView, Rect lastQsClipBounds,
                int top, boolean qsFragmentCreated, boolean qsVisible);