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

Commit 3b422f05 authored by Vadim Caen's avatar Vadim Caen
Browse files

Remove the mediaProjectionRequestAttributionFix flag

 Ibcc14090ce38a0fac21a394d861d044b9669a8a0 was flag but is actually
a security fix, so we should not flag the change

Flag: EXEMPT security fix
Bug: 372670004
Test: N/A
Change-Id: I1fe00d54ac8b8fcf802c0b0ac18ab2a802272325
parent 929eab03
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -122,21 +122,20 @@ public class MediaProjectionPermissionActivity extends Activity {
        final Intent launchingIntent = getIntent();
        mReviewGrantedConsentRequired = launchingIntent.getBooleanExtra(
                EXTRA_USER_REVIEW_GRANTED_CONSENT, false);
        if (com.android.systemui.Flags.mediaProjectionRequestAttributionFix()) {

        // The original requester of this activity start
        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.
        if (mPackageName == null || (
                com.android.systemui.Flags.mediaProjectionRequestAttributionFix()
                        && getCallingPackage() == null)) {
        // This activity is launched directly by using startActivity(),
        // thus getCallingPackage() will be null.
        if (getCallingPackage() == null) {
            // System server provides the package name through the intent if so and is able to get
            // the result back. Other applications can't.
            if (launchingIntent.hasExtra(EXTRA_PACKAGE_REUSING_GRANTED_CONSENT)) {
                mPackageName = launchingIntent.getStringExtra(
                        EXTRA_PACKAGE_REUSING_GRANTED_CONSENT);
            } else {
                // The activity was not launched for result, we abort here
                finishAsCancelled();
                return;
            }