Loading packages/SystemUI/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -218,7 +218,7 @@ <!-- Notification ticker displayed when a screenshot is being saved to the Gallery. [CHAR LIMIT=30] --> <string name="screenshot_saving_ticker">Saving screenshot\u2026</string> <!-- Notification title displayed when a screenshot is being saved to the Gallery. [CHAR LIMIT=50] --> <!-- Informs the user that a screenshot is being saved. [CHAR LIMIT=50] --> <string name="screenshot_saving_title">Saving screenshot\u2026</string> <!-- Notification title displayed when a screenshot is saved to the Gallery. [CHAR LIMIT=50] --> <string name="screenshot_saved_title">Screenshot saved</string> Loading packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +11 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ import android.view.ViewOutlineProvider; import android.view.ViewTreeObserver; import android.view.WindowInsets; import android.view.WindowManager; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityManager; import android.view.animation.AccelerateInterpolator; import android.view.animation.AnimationUtils; Loading Loading @@ -183,6 +184,7 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset private final WindowManager.LayoutParams mWindowLayoutParams; private final Display mDisplay; private final DisplayMetrics mDisplayMetrics; private final AccessibilityManager mAccessibilityManager; private View mScreenshotLayout; private ScreenshotSelectorView mScreenshotSelectorView; Loading Loading @@ -241,6 +243,7 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset mScreenshotSmartActions = screenshotSmartActions; mNotificationsController = screenshotNotificationsController; mUiEventLogger = uiEventLogger; mAccessibilityManager = AccessibilityManager.getInstance(mContext); reloadAssets(); Configuration config = mContext.getResources().getConfiguration(); Loading Loading @@ -572,6 +575,14 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset private void saveScreenshot(Bitmap screenshot, Consumer<Uri> finisher, Rect screenRect, Insets screenInsets, boolean showFlash) { if (mAccessibilityManager.isEnabled()) { AccessibilityEvent event = new AccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED); event.setContentDescription( mContext.getResources().getString(R.string.screenshot_saving_title)); mAccessibilityManager.sendAccessibilityEvent(event); } if (mScreenshotLayout.isAttachedToWindow()) { // if we didn't already dismiss for another reason if (mDismissAnimation == null || !mDismissAnimation.isRunning()) { Loading Loading
packages/SystemUI/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -218,7 +218,7 @@ <!-- Notification ticker displayed when a screenshot is being saved to the Gallery. [CHAR LIMIT=30] --> <string name="screenshot_saving_ticker">Saving screenshot\u2026</string> <!-- Notification title displayed when a screenshot is being saved to the Gallery. [CHAR LIMIT=50] --> <!-- Informs the user that a screenshot is being saved. [CHAR LIMIT=50] --> <string name="screenshot_saving_title">Saving screenshot\u2026</string> <!-- Notification title displayed when a screenshot is saved to the Gallery. [CHAR LIMIT=50] --> <string name="screenshot_saved_title">Screenshot saved</string> Loading
packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +11 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ import android.view.ViewOutlineProvider; import android.view.ViewTreeObserver; import android.view.WindowInsets; import android.view.WindowManager; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityManager; import android.view.animation.AccelerateInterpolator; import android.view.animation.AnimationUtils; Loading Loading @@ -183,6 +184,7 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset private final WindowManager.LayoutParams mWindowLayoutParams; private final Display mDisplay; private final DisplayMetrics mDisplayMetrics; private final AccessibilityManager mAccessibilityManager; private View mScreenshotLayout; private ScreenshotSelectorView mScreenshotSelectorView; Loading Loading @@ -241,6 +243,7 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset mScreenshotSmartActions = screenshotSmartActions; mNotificationsController = screenshotNotificationsController; mUiEventLogger = uiEventLogger; mAccessibilityManager = AccessibilityManager.getInstance(mContext); reloadAssets(); Configuration config = mContext.getResources().getConfiguration(); Loading Loading @@ -572,6 +575,14 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset private void saveScreenshot(Bitmap screenshot, Consumer<Uri> finisher, Rect screenRect, Insets screenInsets, boolean showFlash) { if (mAccessibilityManager.isEnabled()) { AccessibilityEvent event = new AccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED); event.setContentDescription( mContext.getResources().getString(R.string.screenshot_saving_title)); mAccessibilityManager.sendAccessibilityEvent(event); } if (mScreenshotLayout.isAttachedToWindow()) { // if we didn't already dismiss for another reason if (mDismissAnimation == null || !mDismissAnimation.isRunning()) { Loading