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

Commit 49508c63 authored by Robin Lee's avatar Robin Lee
Browse files

Rename "capture own screenshot" flag again

Adding metadata{} to the flag after the first commit is not
supported by the release tooling and breaks the flag process.

Change-Id: I9c3b7efb4273ed73c230ac70041f803c8b5eb38d
Flag: android.app.contextualsearch.flags.contextual_search_prevent_self_capture
Test: GtsInteractiveContextualSearchIntentTestCases
Bug: 390176823
parent 13fad8b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -24,7 +24,7 @@ flag {
}
}


flag {
flag {
    name: "contextual_search_window_layer"
    name: "contextual_search_prevent_self_capture"
    namespace: "sysui_integrations"
    namespace: "sysui_integrations"
    description: "Identify live contextual search UI to exclude from contextual search screenshot."
    description: "Identify live contextual search UI to exclude from contextual search screenshot."
    bug: "390176823"
    bug: "390176823"
+2 −2
Original line number Original line Diff line number Diff line
@@ -348,7 +348,7 @@ public class ContextualSearchManagerService extends SystemService {
            }
            }
        }
        }
        final ScreenshotHardwareBuffer shb = mWmInternal.takeContextualSearchScreenshot(
        final ScreenshotHardwareBuffer shb = mWmInternal.takeContextualSearchScreenshot(
                (Flags.contextualSearchWindowLayer() ? csUid : -1));
                (Flags.contextualSearchPreventSelfCapture() ? csUid : -1));
        final Bitmap bm = shb != null ? shb.asBitmap() : null;
        final Bitmap bm = shb != null ? shb.asBitmap() : null;
        // Now that everything is fetched, putting it in the launchIntent.
        // Now that everything is fetched, putting it in the launchIntent.
        if (bm != null) {
        if (bm != null) {
@@ -501,7 +501,7 @@ public class ContextualSearchManagerService extends SystemService {
                Binder.withCleanCallingIdentity(() -> {
                Binder.withCleanCallingIdentity(() -> {
                    final ScreenshotHardwareBuffer shb =
                    final ScreenshotHardwareBuffer shb =
                            mWmInternal.takeContextualSearchScreenshot(
                            mWmInternal.takeContextualSearchScreenshot(
                               (Flags.contextualSearchWindowLayer() ? callingUid : -1));
                               (Flags.contextualSearchPreventSelfCapture() ? callingUid : -1));
                    final Bitmap bm = shb != null ? shb.asBitmap() : null;
                    final Bitmap bm = shb != null ? shb.asBitmap() : null;
                    if (bm != null) {
                    if (bm != null) {
                        bundle.putParcelable(ContextualSearchManager.EXTRA_SCREENSHOT,
                        bundle.putParcelable(ContextualSearchManager.EXTRA_SCREENSHOT,