diff options
| author | 2024-04-25 15:08:47 -0400 | |
|---|---|---|
| committer | 2024-04-30 20:19:45 +0000 | |
| commit | bea1cce6f12ae9e75ec37918bde0442c9c13595f (patch) | |
| tree | 91e6ef1071e6ca2cc5e7d708cca950911dec5718 | |
| parent | 71c42508b814151ff1b484edf958d856b16a4468 (diff) | |
Keep reference to ScreenshotHelper in SystemActions
Bug: 326350415
Flag: NONE
Test: manual
Change-Id: Idac23a7e5db0afdaeac82462037beea47d7746ea
| -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); } |