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

Commit f0c9c4d6 authored by Matt Casey's avatar Matt Casey Committed by Android (Google) Code Review
Browse files

Merge "Remove screenshot_private_profile_accessibility_announcement_fix" into main

parents 215452e2 93ab91a2
Loading
Loading
Loading
Loading
+0 −10
Original line number Original line Diff line number Diff line
@@ -588,16 +588,6 @@ flag {
    }
    }
}
}


flag {
    name: "screenshot_private_profile_accessibility_announcement_fix"
    namespace: "systemui"
    description: "Modified a11y announcement for private space screenshots"
    bug: "326941376"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
flag {
    name: "screenshot_private_profile_behavior_fix"
    name: "screenshot_private_profile_behavior_fix"
    namespace: "systemui"
    namespace: "systemui"
+3 −14
Original line number Original line Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.systemui.screenshot;
import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
import static android.view.WindowManager.LayoutParams.TYPE_SCREENSHOT;
import static android.view.WindowManager.LayoutParams.TYPE_SCREENSHOT;


import static com.android.systemui.Flags.screenshotPrivateProfileAccessibilityAnnouncementFix;
import static com.android.systemui.Flags.screenshotSaveImageExporter;
import static com.android.systemui.Flags.screenshotSaveImageExporter;
import static com.android.systemui.screenshot.LogConfig.DEBUG_ANIM;
import static com.android.systemui.screenshot.LogConfig.DEBUG_ANIM;
import static com.android.systemui.screenshot.LogConfig.DEBUG_CALLBACK;
import static com.android.systemui.screenshot.LogConfig.DEBUG_CALLBACK;
@@ -355,19 +354,9 @@ public class LegacyScreenshotController implements InteractiveScreenshotHandler


    void prepareViewForNewScreenshot(@NonNull ScreenshotData screenshot, String oldPackageName) {
    void prepareViewForNewScreenshot(@NonNull ScreenshotData screenshot, String oldPackageName) {
        withWindowAttached(() -> {
        withWindowAttached(() -> {
            if (screenshotPrivateProfileAccessibilityAnnouncementFix()) {
            mAnnouncementResolver.getScreenshotAnnouncement(
            mAnnouncementResolver.getScreenshotAnnouncement(
                    screenshot.getUserHandle().getIdentifier(),
                    screenshot.getUserHandle().getIdentifier(),
                    mViewProxy::announceForAccessibility);
                    mViewProxy::announceForAccessibility);
            } else {
                if (mUserManager.isManagedProfile(screenshot.getUserHandle().getIdentifier())) {
                    mViewProxy.announceForAccessibility(mContext.getResources().getString(
                            R.string.screenshot_saving_work_profile_title));
                } else {
                    mViewProxy.announceForAccessibility(
                            mContext.getResources().getString(R.string.screenshot_saving_title));
                }
            }
        });
        });


        mViewProxy.reset();
        mViewProxy.reset();
+5 −14
Original line number Original line Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.systemui.screenshot;
import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
import static android.view.WindowManager.LayoutParams.TYPE_SCREENSHOT;
import static android.view.WindowManager.LayoutParams.TYPE_SCREENSHOT;


import static com.android.systemui.Flags.screenshotPrivateProfileAccessibilityAnnouncementFix;
import static com.android.systemui.Flags.screenshotSaveImageExporter;
import static com.android.systemui.Flags.screenshotSaveImageExporter;
import static com.android.systemui.screenshot.LogConfig.DEBUG_ANIM;
import static com.android.systemui.screenshot.LogConfig.DEBUG_ANIM;
import static com.android.systemui.screenshot.LogConfig.DEBUG_CALLBACK;
import static com.android.systemui.screenshot.LogConfig.DEBUG_CALLBACK;
@@ -355,19 +354,11 @@ public class ScreenshotController implements InteractiveScreenshotHandler {


    void prepareViewForNewScreenshot(@NonNull ScreenshotData screenshot, String oldPackageName) {
    void prepareViewForNewScreenshot(@NonNull ScreenshotData screenshot, String oldPackageName) {
        withWindowAttached(() -> {
        withWindowAttached(() -> {
            if (screenshotPrivateProfileAccessibilityAnnouncementFix()) {
            mAnnouncementResolver.getScreenshotAnnouncement(
            mAnnouncementResolver.getScreenshotAnnouncement(
                    screenshot.getUserHandle().getIdentifier(),
                    screenshot.getUserHandle().getIdentifier(),
                        mViewProxy::announceForAccessibility);
                    announcement -> {
            } else {
                        mViewProxy.announceForAccessibility(announcement);
                if (mUserManager.isManagedProfile(screenshot.getUserHandle().getIdentifier())) {
                    });
                    mViewProxy.announceForAccessibility(mContext.getResources().getString(
                            R.string.screenshot_saving_work_profile_title));
                } else {
                    mViewProxy.announceForAccessibility(
                            mContext.getResources().getString(R.string.screenshot_saving_title));
                }
            }
        });
        });


        mViewProxy.reset();
        mViewProxy.reset();