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

Unverified Commit 6a9e1ac2 authored by LuK1337's avatar LuK1337 Committed by Michael Bestas
Browse files

SystemUI: screenshot: close QS after launching long screenshot activity

Change-Id: Ief5510c037b27be714f8f6cc8661d81931f3babd
parent fc7b094a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ import android.window.WindowContext;
import com.android.internal.app.ChooserActivity;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.policy.PhoneWindow;
import com.android.internal.statusbar.IStatusBarService;
import com.android.settingslib.applications.InterestingConfigChanges;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.broadcast.BroadcastSender;
@@ -223,6 +224,7 @@ public class ScreenshotController implements ScreenshotHandler {
    private final ScreenshotNotificationSmartActionsProvider
            mScreenshotNotificationSmartActionsProvider;
    private final TimeoutHandler mScreenshotHandler;
    private final IStatusBarService mStatusBarService;
    private final ActionIntentExecutor mActionIntentExecutor;
    private final UserManager mUserManager;
    private final AssistContentRequester mAssistContentRequester;
@@ -306,6 +308,7 @@ public class ScreenshotController implements ScreenshotHandler {
            BroadcastDispatcher broadcastDispatcher,
            ScreenshotNotificationSmartActionsProvider screenshotNotificationSmartActionsProvider,
            ScreenshotActionsController.Factory screenshotActionsControllerFactory,
            IStatusBarService statusBarService,
            ActionIntentExecutor actionIntentExecutor,
            ActionExecutor.Factory actionExecutorFactory,
            UserManager userManager,
@@ -325,6 +328,7 @@ public class ScreenshotController implements ScreenshotHandler {
        mMainExecutor = mainExecutor;
        mScrollCaptureExecutor = scrollCaptureExecutor;
        mScreenshotNotificationSmartActionsProvider = screenshotNotificationSmartActionsProvider;
        mStatusBarService = statusBarService;
        mBgExecutor = Executors.newSingleThreadExecutor();
        mBroadcastSender = broadcastSender;
        mBroadcastDispatcher = broadcastDispatcher;
@@ -718,6 +722,12 @@ public class ScreenshotController implements ScreenshotHandler {
                    final Intent intent = ActionIntentCreator.INSTANCE.createLongScreenshotIntent(
                            owner, mContext);
                    mContext.startActivity(intent);

                    try {
                        mStatusBarService.collapsePanels();
                    } catch (RemoteException e) {
                        Log.e(TAG, "Error during collapsing panels", e);
                    }
                },
                (destination, onTransitionEnd, longScreenshot) -> {
                    onTransitionEnd.run();