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

Commit dfd4b34e authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[CS] Remove unused methods from CentralSurfaces interface.

`start` and `dump` can be removed because they're covered by
`CentralSurfacesImpl` implementing `CoreStartable`.

Bug: 277764509
Test: `adb shell dumpsys activity service
com.android.systemui/.SystemUIService CentralSurfacesGoogle` -> dumps
CentralSurfaces info
Test: atest CentralSurfacesImplTest

Change-Id: Ie546c1896051e94379603837f4aca75233075b50
parent c7666d77
Loading
Loading
Loading
Loading
+0 −12
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);
+0 −6
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
+0 −15
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) {
@@ -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.