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

Commit 829da884 authored by Marvin Ramin's avatar Marvin Ramin
Browse files

Use getLaunchedFromPackage instead of getCallingPackage

Ensure that MediaProjectionPermissionActivity is doing proper
attribution and validation of permissions before showing.

Bug: 373581993
Test: presubmit
Flag: com.android.systemui.media_projection_request_attribution_fix
Change-Id: Ibcc14090ce38a0fac21a394d861d044b9669a8a0
parent a28b2a71
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1487,3 +1487,13 @@ flag {
  description: "Enables notes role qs tile which opens default notes role app in app bubbles"
  bug: "357863750"
}

flag {
   name: "media_projection_request_attribution_fix"
   namespace: "systemui"
   description: "Ensure MediaProjection consent requests are properly attributed"
   bug: "373581993"
   metadata {
       purpose: PURPOSE_BUGFIX
   }
}
+5 −2
Original line number Diff line number Diff line
@@ -122,8 +122,11 @@ public class MediaProjectionPermissionActivity extends Activity {
        final Intent launchingIntent = getIntent();
        mReviewGrantedConsentRequired = launchingIntent.getBooleanExtra(
                EXTRA_USER_REVIEW_GRANTED_CONSENT, false);

        if (com.android.systemui.Flags.mediaProjectionRequestAttributionFix()) {
            mPackageName = getLaunchedFromPackage();
        } else {
            mPackageName = getCallingPackage();
        }

        // This activity is launched directly by an app, or system server. System server provides
        // the package name through the intent if so.