Loading packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionActivity.java +9 −10 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading
packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionActivity.java +9 −10 Original line number Diff line number Diff line Loading @@ -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; } Loading