diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java b/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java index c6716e44899f..68a69d34b75a 100644 --- a/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java +++ b/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java @@ -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); } |