Merge "Announce saving screenshot to work profile" into tm-qpr-dev am: 6b37d71772
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20519951 Change-Id: I0e59c541dc5e4277a2ca896eec672139bfd0be34 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -200,6 +200,8 @@
|
|||||||
|
|
||||||
<!-- Informs the user that a screenshot is being saved. [CHAR LIMIT=50] -->
|
<!-- Informs the user that a screenshot is being saved. [CHAR LIMIT=50] -->
|
||||||
<string name="screenshot_saving_title">Saving screenshot\u2026</string>
|
<string name="screenshot_saving_title">Saving screenshot\u2026</string>
|
||||||
|
<!-- Informs the user that a screenshot is being saved. [CHAR LIMIT=50] -->
|
||||||
|
<string name="screenshot_saving_work_profile_title">Saving screenshot to work profile\u2026</string>
|
||||||
<!-- Notification title displayed when a screenshot is saved to the Gallery. [CHAR LIMIT=50] -->
|
<!-- Notification title displayed when a screenshot is saved to the Gallery. [CHAR LIMIT=50] -->
|
||||||
<string name="screenshot_saved_title">Screenshot saved</string>
|
<string name="screenshot_saved_title">Screenshot saved</string>
|
||||||
<!-- Notification title displayed when we fail to take a screenshot. [CHAR LIMIT=50] -->
|
<!-- Notification title displayed when we fail to take a screenshot. [CHAR LIMIT=50] -->
|
||||||
|
|||||||
@@ -579,9 +579,16 @@ public class ScreenshotController {
|
|||||||
|
|
||||||
private void saveScreenshot(Bitmap screenshot, Consumer<Uri> finisher, Rect screenRect,
|
private void saveScreenshot(Bitmap screenshot, Consumer<Uri> finisher, Rect screenRect,
|
||||||
Insets screenInsets, ComponentName topComponent, boolean showFlash, UserHandle owner) {
|
Insets screenInsets, ComponentName topComponent, boolean showFlash, UserHandle owner) {
|
||||||
withWindowAttached(() ->
|
withWindowAttached(() -> {
|
||||||
|
if (mFlags.isEnabled(SCREENSHOT_WORK_PROFILE_POLICY)
|
||||||
|
&& mUserManager.isManagedProfile(owner.getIdentifier())) {
|
||||||
|
mScreenshotView.announceForAccessibility(mContext.getResources().getString(
|
||||||
|
R.string.screenshot_saving_work_profile_title));
|
||||||
|
} else {
|
||||||
mScreenshotView.announceForAccessibility(
|
mScreenshotView.announceForAccessibility(
|
||||||
mContext.getResources().getString(R.string.screenshot_saving_title)));
|
mContext.getResources().getString(R.string.screenshot_saving_title));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
mScreenshotView.reset();
|
mScreenshotView.reset();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user