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

Commit 975daf26 authored by Chandru S's avatar Chandru S Committed by Android (Google) Code Review
Browse files

Merge "Remove unused methods" into main

parents 792e5817 14c19f2d
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -133,16 +133,6 @@ public interface ActivityStarter {
            boolean afterKeyguardGone,
            boolean deferred);

    /** Execute a runnable after dismissing keyguard. */
    void executeRunnableDismissingKeyguard(
            Runnable runnable,
            Runnable cancelAction,
            boolean dismissShade,
            boolean afterKeyguardGone,
            boolean deferred,
            boolean willAnimateOnKeyguard,
            @Nullable String customMessage);

    /** Whether we should animate an activity launch. */
    boolean shouldAnimateLaunch(boolean isActivityIntent);

+0 −20
Original line number Diff line number Diff line
@@ -372,26 +372,6 @@ constructor(
        )
    }

    override fun executeRunnableDismissingKeyguard(
        runnable: Runnable?,
        cancelAction: Runnable?,
        dismissShade: Boolean,
        afterKeyguardGone: Boolean,
        deferred: Boolean,
        willAnimateOnKeyguard: Boolean,
        customMessage: String?,
    ) {
        activityStarterInternal.executeRunnableDismissingKeyguard(
            runnable = runnable,
            cancelAction = cancelAction,
            dismissShade = dismissShade,
            afterKeyguardGone = afterKeyguardGone,
            deferred = deferred,
            willAnimateOnKeyguard = willAnimateOnKeyguard,
            customMessage = customMessage,
        )
    }

    override fun postQSRunnableDismissingKeyguard(runnable: Runnable?) {
        postOnUiThread {
            statusBarStateController.setLeaveOpenOnKeyguardHide(true)
+0 −40
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ import static com.android.systemui.statusbar.NotificationLockscreenUserManager.P
import static com.android.systemui.statusbar.StatusBarState.SHADE;

import android.annotation.Nullable;
import android.app.ActivityManager;
import android.app.ActivityOptions;
import android.app.IWallpaperManager;
import android.app.KeyguardManager;
@@ -2929,45 +2928,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
        }
    }

    /**
     * Dismiss the keyguard then execute an action.
     *
     * @param action The action to execute after dismissing the keyguard.
     * @param collapsePanel Whether we should collapse the panel after dismissing the keyguard.
     * @param willAnimateOnKeyguard Whether {@param action} will run an animation on the keyguard if
     *                              we are locked.
     */
    private void executeActionDismissingKeyguard(Runnable action, boolean afterKeyguardGone,
            boolean collapsePanel, boolean willAnimateOnKeyguard) {
        if (!mDeviceProvisionedController.isDeviceProvisioned()) return;

        OnDismissAction onDismissAction = new OnDismissAction() {
            @Override
            public boolean onDismiss() {
                new Thread(() -> {
                    try {
                        // The intent we are sending is for the application, which
                        // won't have permission to immediately start an activity after
                        // the user switches to home.  We know it is safe to do at this
                        // point, so make sure new activity switches are now allowed.
                        ActivityManager.getService().resumeAppSwitches();
                    } catch (RemoteException e) {
                    }
                    action.run();
                }).start();

                return collapsePanel ? mShadeController.collapseShade() : willAnimateOnKeyguard;
            }

            @Override
            public boolean willRunAnimationOnKeyguard() {
                return willAnimateOnKeyguard;
            }
        };
        mActivityStarter.dismissKeyguardThenExecute(onDismissAction, /* cancel= */ null,
                afterKeyguardGone);
    }

    private void clearNotificationEffects() {
        try {
            mBarService.clearNotificationEffects();