Loading packages/SystemUI/AndroidManifest.xml +2 −0 Original line number Diff line number Diff line Loading @@ -650,6 +650,7 @@ <!-- started from MediaProjectionManager --> <activity android:name=".mediaprojection.permission.MediaProjectionPermissionActivity" android:showForAllUsers="true" android:exported="true" android:theme="@style/Theme.SystemUI.MediaProjectionAlertDialog" android:finishOnCloseSystemDialogs="true" Loading @@ -660,6 +661,7 @@ <activity android:name=".mediaprojection.appselector.MediaProjectionAppSelectorActivity" android:theme="@style/Theme.SystemUI.MediaProjectionAppSelector" android:showForAllUsers="true" android:finishOnCloseSystemDialogs="true" android:excludeFromRecents="true" android:documentLaunchMode="never" Loading packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/data/RecentTaskListProvider.kt +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ constructor( // opening the app selector in split screen mode, the foreground task will be the second // task in index 0. val foregroundGroup = if (groupedTasks.first().splitBounds != null) groupedTasks.first() if (groupedTasks.firstOrNull()?.splitBounds != null) groupedTasks.first() else groupedTasks.elementAtOrNull(1) val foregroundTaskId1 = foregroundGroup?.taskInfo1?.taskId val foregroundTaskId2 = foregroundGroup?.taskInfo2?.taskId Loading packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionActivity.java +5 −5 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static android.media.projection.IMediaProjectionManager.EXTRA_USER_REVIEW import static android.media.projection.MediaProjectionManager.OVERRIDE_DISABLE_MEDIA_PROJECTION_SINGLE_APP_OPTION; import static android.media.projection.ReviewGrantedConsentResult.RECORD_CANCEL; import static android.media.projection.ReviewGrantedConsentResult.RECORD_CONTENT_DISPLAY; import static android.os.UserHandle.USER_SYSTEM; import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import static com.android.systemui.mediaprojection.permission.ScreenShareOptionKt.ENTIRE_SCREEN; Loading @@ -31,7 +32,6 @@ import static com.android.systemui.mediaprojection.permission.ScreenShareOptionK import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.app.Activity; import android.app.ActivityManager; import android.app.ActivityOptions.LaunchCookie; import android.app.AlertDialog; import android.app.StatusBarManager; Loading Loading @@ -366,11 +366,11 @@ public class MediaProjectionPermissionActivity extends Activity intent.putExtra(EXTRA_USER_REVIEW_GRANTED_CONSENT, mReviewGrantedConsentRequired); intent.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT); // Start activity from the current foreground user to avoid creating a separate // SystemUI process without access to recent tasks because it won't have // WM Shell running inside. // Start activity as system user and manually show app selector to all users to // avoid creating a separate SystemUI process without access to recent tasks // because it won't have WM Shell running inside. mUserSelectingTask = true; startActivityAsUser(intent, UserHandle.of(ActivityManager.getCurrentUser())); startActivityAsUser(intent, UserHandle.of(USER_SYSTEM)); // close shade if it's open mStatusBarManager.collapsePanels(); } Loading Loading
packages/SystemUI/AndroidManifest.xml +2 −0 Original line number Diff line number Diff line Loading @@ -650,6 +650,7 @@ <!-- started from MediaProjectionManager --> <activity android:name=".mediaprojection.permission.MediaProjectionPermissionActivity" android:showForAllUsers="true" android:exported="true" android:theme="@style/Theme.SystemUI.MediaProjectionAlertDialog" android:finishOnCloseSystemDialogs="true" Loading @@ -660,6 +661,7 @@ <activity android:name=".mediaprojection.appselector.MediaProjectionAppSelectorActivity" android:theme="@style/Theme.SystemUI.MediaProjectionAppSelector" android:showForAllUsers="true" android:finishOnCloseSystemDialogs="true" android:excludeFromRecents="true" android:documentLaunchMode="never" Loading
packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/data/RecentTaskListProvider.kt +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ constructor( // opening the app selector in split screen mode, the foreground task will be the second // task in index 0. val foregroundGroup = if (groupedTasks.first().splitBounds != null) groupedTasks.first() if (groupedTasks.firstOrNull()?.splitBounds != null) groupedTasks.first() else groupedTasks.elementAtOrNull(1) val foregroundTaskId1 = foregroundGroup?.taskInfo1?.taskId val foregroundTaskId2 = foregroundGroup?.taskInfo2?.taskId Loading
packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionActivity.java +5 −5 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static android.media.projection.IMediaProjectionManager.EXTRA_USER_REVIEW import static android.media.projection.MediaProjectionManager.OVERRIDE_DISABLE_MEDIA_PROJECTION_SINGLE_APP_OPTION; import static android.media.projection.ReviewGrantedConsentResult.RECORD_CANCEL; import static android.media.projection.ReviewGrantedConsentResult.RECORD_CONTENT_DISPLAY; import static android.os.UserHandle.USER_SYSTEM; import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import static com.android.systemui.mediaprojection.permission.ScreenShareOptionKt.ENTIRE_SCREEN; Loading @@ -31,7 +32,6 @@ import static com.android.systemui.mediaprojection.permission.ScreenShareOptionK import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.app.Activity; import android.app.ActivityManager; import android.app.ActivityOptions.LaunchCookie; import android.app.AlertDialog; import android.app.StatusBarManager; Loading Loading @@ -366,11 +366,11 @@ public class MediaProjectionPermissionActivity extends Activity intent.putExtra(EXTRA_USER_REVIEW_GRANTED_CONSENT, mReviewGrantedConsentRequired); intent.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT); // Start activity from the current foreground user to avoid creating a separate // SystemUI process without access to recent tasks because it won't have // WM Shell running inside. // Start activity as system user and manually show app selector to all users to // avoid creating a separate SystemUI process without access to recent tasks // because it won't have WM Shell running inside. mUserSelectingTask = true; startActivityAsUser(intent, UserHandle.of(ActivityManager.getCurrentUser())); startActivityAsUser(intent, UserHandle.of(USER_SYSTEM)); // close shade if it's open mStatusBarManager.collapsePanels(); } Loading