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

Commit 31252ad9 authored by Aaron Liu's avatar Aaron Liu Committed by Automerger Merge Worker
Browse files

Merge changes from topic "activity-starter" into udc-dev am: 5bb61ba0

parents ee09d06f 5bb61ba0
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -119,6 +119,16 @@ 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);

    interface Callback {
        void onActivityStarted(int resultCode);
    }
+12 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ import javax.inject.Inject;
/**
 * Single common instance of ActivityStarter that can be gotten and referenced from anywhere, but
 * delegates to an actual implementation (CentralSurfaces).
 *
 * @deprecated Migrating to ActivityStarterImpl
 */
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
@SysUISingleton
@@ -206,4 +208,14 @@ public class ActivityStarterDelegate implements ActivityStarter {
                starter -> starter.executeRunnableDismissingKeyguard(runnable, cancelAction,
                        dismissShade, afterKeyguardGone, deferred));
    }

    @Override
    public void executeRunnableDismissingKeyguard(Runnable runnable, Runnable cancelAction,
            boolean dismissShade, boolean afterKeyguardGone, boolean deferred,
            boolean willAnimateOnKeyguard, @Nullable String customMessage) {
        mActualStarterOptionalLazy.get().ifPresent(
                starter -> starter.executeRunnableDismissingKeyguard(runnable, cancelAction,
                        dismissShade, afterKeyguardGone, deferred, willAnimateOnKeyguard,
                        customMessage));
    }
}
+8 −1
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ package com.android.systemui.dagger;

import com.android.systemui.ActivityStarterDelegate;
import com.android.systemui.classifier.FalsingManagerProxy;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.flags.Flags;
import com.android.systemui.globalactions.GlobalActionsComponent;
import com.android.systemui.globalactions.GlobalActionsImpl;
import com.android.systemui.plugins.ActivityStarter;
@@ -28,6 +30,7 @@ import com.android.systemui.plugins.PluginDependencyProvider;
import com.android.systemui.plugins.VolumeDialogController;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.StatusBarStateControllerImpl;
import com.android.systemui.statusbar.phone.ActivityStarterImpl;
import com.android.systemui.statusbar.phone.DarkIconDispatcherImpl;
import com.android.systemui.volume.VolumeDialogControllerImpl;

@@ -46,7 +49,11 @@ public abstract class PluginModule {
    /** */
    @Provides
    static ActivityStarter provideActivityStarter(ActivityStarterDelegate delegate,
            PluginDependencyProvider dependencyProvider) {
            PluginDependencyProvider dependencyProvider, ActivityStarterImpl activityStarterImpl,
            FeatureFlags featureFlags) {
        if (featureFlags.isEnabled(Flags.USE_NEW_ACTIVITY_STARTER)) {
            return activityStarterImpl;
        }
        dependencyProvider.allowPluginDependency(ActivityStarter.class, delegate);
        return delegate;
    }
+867 −0

File added.

Preview size limit exceeded, changes collapsed.

+12 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ import com.android.systemui.shade.NotificationShadeWindowViewController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.statusbar.LightRevealScrim;
import com.android.systemui.statusbar.NotificationPresenter;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.util.Compile;

import java.io.PrintWriter;
@@ -612,4 +613,15 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {
            mDeviceId = deviceId;
        }
    }

    /**
     * Sets launching activity over LS state in central surfaces.
     */
    void setIsLaunchingActivityOverLockscreen(boolean isLaunchingActivityOverLockscreen);

    /**
     * Gets an animation controller from a notification row.
     */
    ActivityLaunchAnimator.Controller getAnimatorControllerFromNotification(
            ExpandableNotificationRow associatedView);
}
Loading