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

Commit bea1cce6 authored by Miranda Kephart's avatar Miranda Kephart
Browse files

Keep reference to ScreenshotHelper in SystemActions

Bug: 326350415
Flag: NONE
Test: manual
Change-Id: Idac23a7e5db0afdaeac82462037beea47d7746ea
parent 71c42508
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -192,6 +192,7 @@ public class SystemActions implements CoreStartable, ConfigurationController.Con
    private final ShadeController mShadeController;
    private final Lazy<PanelExpansionInteractor> mPanelExpansionInteractor;
    private final StatusBarWindowCallback mNotificationShadeCallback;
    private final ScreenshotHelper mScreenshotHelper;
    private boolean mDismissNotificationShadeActionRegistered;

    @Inject
@@ -221,6 +222,7 @@ public class SystemActions implements CoreStartable, ConfigurationController.Con
                (keyguardShowing, keyguardOccluded, keyguardGoingAway, bouncerShowing, mDozing,
                        panelExpanded, isDreaming) ->
                        registerOrUnregisterDismissNotificationShadeAction();
        mScreenshotHelper = new ScreenshotHelper(mContext);
    }

    @Override
@@ -516,8 +518,7 @@ public class SystemActions implements CoreStartable, ConfigurationController.Con
    }

    private void handleTakeScreenshot() {
        ScreenshotHelper screenshotHelper = new ScreenshotHelper(mContext);
        screenshotHelper.takeScreenshot(
        mScreenshotHelper.takeScreenshot(
                SCREENSHOT_ACCESSIBILITY_ACTIONS, new Handler(Looper.getMainLooper()), null);
    }