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

Commit 33493216 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Remove config_drawNotificationBackground and resulting dead code

Test: manual testing that nothing surprising happened
Flag: NA
Change-Id: I287c1787281f6c38649db66f4abbec0cb03ae3c1
parent b6bab730
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -345,9 +345,6 @@
         the notification is not swiped enough to dismiss it. -->
    <bool name="config_showNotificationGear">true</bool>

    <!-- Whether or not a background should be drawn behind a notification. -->
    <bool name="config_drawNotificationBackground">false</bool>

    <!-- Whether or the notifications can be shown and dismissed with a drag. -->
    <bool name="config_enableNotificationShadeDrag">true</bool>

+0 −16
Original line number Diff line number Diff line
@@ -64,8 +64,6 @@ public class ScrimView extends View {
    private String mScrimName;
    private int mTintColor;
    private boolean mBlendWithMainColor = true;
    private Runnable mChangeRunnable;
    private Executor mChangeRunnableExecutor;
    private Executor mExecutor;
    private Looper mExecutorLooper;
    @Nullable
@@ -270,9 +268,6 @@ public class ScrimView extends View {
            mDrawable.invalidateSelf();
        }

        if (mChangeRunnable != null) {
            mChangeRunnableExecutor.execute(mChangeRunnable);
        }
    }

    public int getTint() {
@@ -300,9 +295,6 @@ public class ScrimView extends View {
                mViewAlpha = alpha;

                mDrawable.setAlpha((int) (255 * alpha));
                if (mChangeRunnable != null) {
                    mChangeRunnableExecutor.execute(mChangeRunnable);
                }
            }
        });
    }
@@ -311,14 +303,6 @@ public class ScrimView extends View {
        return mViewAlpha;
    }

    /**
     * Sets a callback that is invoked whenever the alpha, color, or tint change.
     */
    public void setChangeRunnable(Runnable changeRunnable, Executor changeRunnableExecutor) {
        mChangeRunnable = changeRunnable;
        mChangeRunnableExecutor = changeRunnableExecutor;
    }

    @Override
    protected boolean canReceivePointerEvents() {
        return false;
+1 −10
Original line number Diff line number Diff line
@@ -352,10 +352,6 @@ constructor(
    /** Called by the touch helper when the drag down was aborted and should be reset. */
    internal fun onDragDownReset() {
        logger.logDragDownAborted()
        nsslController.setDimmed(
            /* dimmed= */ true,
            /* animate= */ true,
        )
        nsslController.resetScrollPosition()
        nsslController.resetCheckSnoozeLeavebehind()
        setDragDownAmountAnimated(0f)
@@ -366,12 +362,7 @@ constructor(
     *
     * @param above whether they dragged above it
     */
    internal fun onCrossedThreshold(above: Boolean) {
        nsslController.setDimmed(
            /* dimmed= */ !above,
            /* animate= */ true,
        )
    }
    internal fun onCrossedThreshold(above: Boolean) {}

    /** Called by the touch helper when the drag down was started */
    internal fun onDragDownStarted(startingChild: ExpandableView?) {
+0 −9
Original line number Diff line number Diff line
@@ -275,15 +275,6 @@ public abstract class ExpandableView extends FrameLayout implements Dumpable, Ro
        return getHeight();
    }

    /**
     * Sets the notification as dimmed. The default implementation does nothing.
     *
     * @param dimmed Whether the notification should be dimmed.
     * @param fade Whether an animation should be played to change the state.
     */
    public void setDimmed(boolean dimmed, boolean fade) {
    }

    public boolean isRemoved() {
        return false;
    }
+0 −16
Original line number Diff line number Diff line
@@ -61,7 +61,6 @@ public class AmbientState implements Dumpable {
     */
    private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
    private int mScrollY;
    private boolean mDimmed;
    private float mOverScrollTopAmount;
    private float mOverScrollBottomAmount;
    private boolean mDozing;
@@ -344,14 +343,6 @@ public class AmbientState implements Dumpable {
        this.mScrollY = Math.max(scrollY, 0);
    }

    /**
     * @param dimmed Whether we are in a dimmed state (on the lockscreen), where the backgrounds are
     *               translucent and everything is scaled back a bit.
     */
    public void setDimmed(boolean dimmed) {
        mDimmed = dimmed;
    }

    /** While dozing, we draw as little as possible, assuming a black background */
    public void setDozing(boolean dozing) {
        mDozing = dozing;
@@ -375,12 +366,6 @@ public class AmbientState implements Dumpable {
        mHideSensitive = hideSensitive;
    }

    public boolean isDimmed() {
        // While we are expanding from pulse, we want the notifications not to be dimmed, otherwise
        // you'd see the difference to the pulsing notification
        return mDimmed && !(isPulseExpanding() && mDozeAmount == 1.0f);
    }

    public boolean isDozing() {
        return mDozing;
    }
@@ -768,7 +753,6 @@ public class AmbientState implements Dumpable {
        pw.println("mHideSensitive=" + mHideSensitive);
        pw.println("mShadeExpanded=" + mShadeExpanded);
        pw.println("mClearAllInProgress=" + mClearAllInProgress);
        pw.println("mDimmed=" + mDimmed);
        pw.println("mStatusBarState=" + mStatusBarState);
        pw.println("mExpansionChanging=" + mExpansionChanging);
        pw.println("mPanelFullWidth=" + mIsSmallScreen);
Loading