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

Commit 4522ff0d authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes Ie546c189,I48eeb8b0 into main

* changes:
  [CS] Remove unused methods from CentralSurfaces interface.
  [CS] Remove CentralSurfaces#isKeyguardSecure.
parents 29b04374 dfd4b34e
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ import com.android.systemui.navigationbar.NavigationBarView;
import com.android.systemui.plugins.ActivityStarter.OnDismissAction;
import com.android.systemui.qs.QSPanelController;
import com.android.systemui.shared.system.RemoteAnimationRunnerCompat;
import com.android.systemui.statusbar.NotificationPresenter;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.util.Compile;

@@ -183,8 +182,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {
        return contextForUser.getPackageManager();
    }

    void start();

    boolean updateIsKeyguard();

    boolean updateIsKeyguard(boolean forceStateChange);
@@ -200,8 +197,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {

    void onKeyguardViewManagerStatesUpdated();

    NotificationPresenter getPresenter();

    /**
     * Used to dispatch initial touch events before crossing the threshold to pull down the
     * notification shade. After that, since the launcher window is set to slippery, input
@@ -220,8 +215,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {
    /** */
    boolean getCommandQueuePanelsEnabled();

    BiometricUnlockController getBiometricUnlockController();

    void showWirelessChargingAnimation(int batteryLevel);

    void checkBarModes();
@@ -230,9 +223,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {

    void setInteracting(int barWindow, boolean interacting);

    @Override
    void dump(PrintWriter pwOriginal, String[] args);

    /** @deprecated Use {@link DisplayMetricsRepository} instead. */
    @Deprecated
    float getDisplayWidth();
@@ -281,8 +271,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {

    void setBouncerShowing(boolean bouncerShowing);

    int getWakefulnessState();

    boolean isScreenFullyOff();

    void showScreenPinningRequest(int taskId, boolean allowCancel);
@@ -323,8 +311,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {

    boolean isBouncerShowingOverDream();

    boolean isKeyguardSecure();

    void updateNotificationPanelTouchState();

    int getRotation();
+0 −7
Original line number Diff line number Diff line
@@ -23,9 +23,7 @@ import com.android.systemui.animation.ActivityLaunchAnimator
import com.android.systemui.navigationbar.NavigationBarView
import com.android.systemui.plugins.ActivityStarter.OnDismissAction
import com.android.systemui.qs.QSPanelController
import com.android.systemui.statusbar.NotificationPresenter
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import java.io.PrintWriter

/**
 * Empty implementation of [CentralSurfaces] for variants only need to override portions of the
@@ -41,15 +39,12 @@ abstract class CentralSurfacesEmptyImpl : CentralSurfaces {
    override fun getKeyguardMessageArea(): AuthKeyguardMessageArea? = null
    override fun isLaunchingActivityOverLockscreen() = false
    override fun onKeyguardViewManagerStatesUpdated() {}
    override fun getPresenter(): NotificationPresenter? = null
    override fun onInputFocusTransfer(start: Boolean, cancel: Boolean, velocity: Float) {}
    override fun getCommandQueuePanelsEnabled() = false
    override fun getBiometricUnlockController(): BiometricUnlockController? = null
    override fun showWirelessChargingAnimation(batteryLevel: Int) {}
    override fun checkBarModes() {}
    override fun updateBubblesVisibility() {}
    override fun setInteracting(barWindow: Int, interacting: Boolean) {}
    override fun dump(pwOriginal: PrintWriter, args: Array<String>) {}
    override fun getDisplayWidth() = 0f
    override fun getDisplayHeight() = 0f
    override fun showKeyguard() {}
@@ -77,7 +72,6 @@ abstract class CentralSurfacesEmptyImpl : CentralSurfaces {
    override fun showPinningEnterExitToast(entering: Boolean) {}
    override fun showPinningEscapeToast() {}
    override fun setBouncerShowing(bouncerShowing: Boolean) {}
    override fun getWakefulnessState() = 0
    override fun isScreenFullyOff() = false
    override fun showScreenPinningRequest(taskId: Int, allowCancel: Boolean) {}
    override fun getEmergencyActionIntent(): Intent? = null
@@ -95,7 +89,6 @@ abstract class CentralSurfacesEmptyImpl : CentralSurfaces {
    override fun isBouncerShowing() = false
    override fun isBouncerShowingScrimmed() = false
    override fun isBouncerShowingOverDream() = false
    override fun isKeyguardSecure() = false
    override fun updateNotificationPanelTouchState() {}
    override fun getRotation() = 0
    override fun setBarStateForTest(state: Int) {}
+2 −22
Original line number Diff line number Diff line
@@ -1649,11 +1649,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
        logStateToEventlog();
    }

    @Override
    public NotificationPresenter getPresenter() {
        return mPresenter;
    }

    @VisibleForTesting
    @Override
    public void setBarStateForTest(int state) {
@@ -1727,11 +1722,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
        return mCommandQueue.panelsEnabled();
    }

    @Override
    public BiometricUnlockController getBiometricUnlockController() {
        return mBiometricUnlockController;
    }

    @Override
    public void showTransientUnchecked() {
        if (!mTransientShown) {
@@ -2486,7 +2476,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
                mStatusBarKeyguardViewManager.reset(true);
            } else if (mState == StatusBarState.KEYGUARD
                    && !mStatusBarKeyguardViewManager.primaryBouncerIsOrWillBeShowing()
                    && isKeyguardSecure()) {
                    && mStatusBarKeyguardViewManager.isSecure()) {
                mStatusBarKeyguardViewManager.showBouncer(true /* scrimmed */);
            }
        }
@@ -2825,11 +2815,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
        }
    };

    @Override
    public int getWakefulnessState() {
        return mWakefulnessLifecycle.getWakefulness();
    }

    /**
     * @return true if the screen is currently fully off, i.e. has finished turning off and has
     * since not started turning on.
@@ -2895,7 +2880,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
        if (mDevicePolicyManager.getCameraDisabled(null,
                mLockscreenUserManager.getCurrentUserId())) {
            return false;
        } else if (isKeyguardShowing() && isKeyguardSecure()) {
        } else if (isKeyguardShowing() && mStatusBarKeyguardViewManager.isSecure()) {
            // Check if the admin has disabled the camera specifically for the keyguard
            return (mDevicePolicyManager.getKeyguardDisabledFeatures(null,
                    mLockscreenUserManager.getCurrentUserId())
@@ -3198,11 +3183,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
        return mBouncerShowingOverDream;
    }

    @Override
    public boolean isKeyguardSecure() {
        return mStatusBarKeyguardViewManager.isSecure();
    }

    // End Extra BaseStatusBarMethods.

    boolean isTransientShown() {