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

Commit a1319a35 authored by Steve Elliott's avatar Steve Elliott
Browse files

Remove dead code from NotificationShelf+Controller

Bug: 271161129
Test: make
Change-Id: Ia64a33116cc9c3fe191380bcfaa296f388e25b92
parent 90092140
Loading
Loading
Loading
Loading
+1 −35
Original line number Diff line number Diff line
@@ -64,8 +64,7 @@ import java.io.PrintWriter;
 * A notification shelf view that is placed inside the notification scroller. It manages the
 * overflow icons that don't fit into the regular list anymore.
 */
public class NotificationShelf extends ActivatableNotificationView implements
        View.OnLayoutChangeListener, StateListener {
public class NotificationShelf extends ActivatableNotificationView implements StateListener {

    private static final int TAG_CONTINUOUS_CLIPPING = R.id.continuous_clipping_tag;
    private static final String TAG = "NotificationShelf";
@@ -78,7 +77,6 @@ public class NotificationShelf extends ActivatableNotificationView implements
    private static final SourceType SHELF_SCROLL = SourceType.from("ShelfScroll");

    private NotificationIconContainer mShelfIcons;
    private int[] mTmp = new int[2];
    private boolean mHideBackground;
    private int mStatusBarHeight;
    private boolean mEnableNotificationClipping;
@@ -87,7 +85,6 @@ public class NotificationShelf extends ActivatableNotificationView implements
    private int mPaddingBetweenElements;
    private int mNotGoneIndex;
    private boolean mHasItemsInStableShelf;
    private NotificationIconContainer mCollapsedIcons;
    private int mScrollFastThreshold;
    private int mStatusBarState;
    private boolean mInteractive;
@@ -868,10 +865,6 @@ public class NotificationShelf extends ActivatableNotificationView implements
        return mShelfIcons.getIconState(icon);
    }

    private float getFullyClosedTranslation() {
        return -(getIntrinsicHeight() - mStatusBarHeight) / 2;
    }

    @Override
    public boolean hasNoContentHeight() {
        return true;
@@ -893,7 +886,6 @@ public class NotificationShelf extends ActivatableNotificationView implements
    @Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);
        updateRelativeOffset();

        // we always want to clip to our sides, such that nothing can draw outside of these bounds
        int height = getResources().getDisplayMetrics().heightPixels;
@@ -903,13 +895,6 @@ public class NotificationShelf extends ActivatableNotificationView implements
        }
    }

    private void updateRelativeOffset() {
        if (mCollapsedIcons != null) {
            mCollapsedIcons.getLocationOnScreen(mTmp);
        }
        getLocationOnScreen(mTmp);
    }

    /**
     * @return the index of the notification at which the shelf visually resides
     */
@@ -924,19 +909,6 @@ public class NotificationShelf extends ActivatableNotificationView implements
        }
    }

    /**
     * @return whether the shelf has any icons in it when a potential animation has finished, i.e
     * if the current state would be applied right now
     */
    public boolean hasItemsInStableShelf() {
        return mHasItemsInStableShelf;
    }

    public void setCollapsedIcons(NotificationIconContainer collapsedIcons) {
        mCollapsedIcons = collapsedIcons;
        mCollapsedIcons.addOnLayoutChangeListener(this);
    }

    @Override
    public void onStateChanged(int newState) {
        mStatusBarState = newState;
@@ -982,12 +954,6 @@ public class NotificationShelf extends ActivatableNotificationView implements
        }
    }

    @Override
    public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft,
                               int oldTop, int oldRight, int oldBottom) {
        updateRelativeOffset();
    }

    @Override
    public boolean needsClippingToShelf() {
        return false;
+0 −22
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import com.android.systemui.statusbar.notification.row.ActivatableNotificationVi
import com.android.systemui.statusbar.notification.row.dagger.NotificationRowScope;
import com.android.systemui.statusbar.notification.stack.AmbientState;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController;
import com.android.systemui.statusbar.notification.stack.StackScrollAlgorithm;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.phone.NotificationIconContainer;

@@ -92,30 +91,12 @@ public class NotificationShelfController {
        return mView.getShelfIcons();
    }

    public @View.Visibility int getVisibility() {
        return mView.getVisibility();
    }

    public void setCollapsedIcons(NotificationIconContainer notificationIcons) {
        mView.setCollapsedIcons(notificationIcons);
    }

    public void bind(AmbientState ambientState,
            NotificationStackScrollLayoutController notificationStackScrollLayoutController) {
        mView.bind(ambientState, notificationStackScrollLayoutController);
        mAmbientState = ambientState;
    }

    public int getHeight() {
        return mView.getHeight();
    }

    public void updateState(StackScrollAlgorithm.StackScrollAlgorithmState algorithmState,
            AmbientState ambientState) {
        mAmbientState = ambientState;
        mView.updateState(algorithmState, ambientState);
    }

    public int getIntrinsicHeight() {
        return mView.getIntrinsicHeight();
    }
@@ -128,7 +109,4 @@ public class NotificationShelfController {
        mView.setOnClickListener(onClickListener);
    }

    public int getNotGoneIndex() {
        return mView.getNotGoneIndex();
    }
}
+0 −1
Original line number Diff line number Diff line
@@ -193,7 +193,6 @@ public class NotificationIconAreaController implements

    public void setupShelf(NotificationShelfController notificationShelfController) {
        mShelfIcons = notificationShelfController.getShelfIcons();
        notificationShelfController.setCollapsedIcons(mNotificationIcons);
    }

    public void onDensityOrFontScaleChanged(Context context) {