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

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

Announce saving screenshot to work profile

Guarded by the SCREENSHOT_WORK_PROFILE_POLICY flag.

Bug: 258706100
Fix: 258706100
Test: manual (using talkback)
Change-Id: I70af7253d8bb951cf64da3d024dd2a038db4ce99
parent 712b0bcd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -200,6 +200,8 @@

    <!-- Informs the user that a screenshot is being saved. [CHAR LIMIT=50] -->
    <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] -->
    <string name="screenshot_saved_title">Screenshot saved</string>
    <!-- Notification title displayed when we fail to take a screenshot. [CHAR LIMIT=50] -->
+9 −2
Original line number Diff line number Diff line
@@ -546,9 +546,16 @@ public class ScreenshotController {

    private void saveScreenshot(Bitmap screenshot, Consumer<Uri> finisher, Rect screenRect,
            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(
                        mContext.getResources().getString(R.string.screenshot_saving_title)));
                        mContext.getResources().getString(R.string.screenshot_saving_title));
            }
        });

        mScreenshotView.reset();