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

Commit 2ceb6178 authored by Chris Göllner's avatar Chris Göllner Committed by Automerger Merge Worker
Browse files

Merge "Revert "PSS: Make sure shade is dismissed when starting the app ...""...

Merge "Revert "PSS: Make sure shade is dismissed when starting the app ..."" into udc-qpr-dev am: 433adc3e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24620230



Change-Id: Ib4f4d7b062551051bbeb3d2f995ed58a00137345
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 425970d2 433adc3e
Loading
Loading
Loading
Loading
+2 −14
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@ import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.flags.Flags;
import com.android.systemui.mediaprojection.devicepolicy.ScreenCaptureDevicePolicyResolver;
import com.android.systemui.mediaprojection.devicepolicy.ScreenCaptureDisabledDialog;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.screenrecord.MediaProjectionPermissionDialog;
import com.android.systemui.screenrecord.ScreenShareOption;
import com.android.systemui.statusbar.phone.SystemUIDialog;
@@ -73,7 +72,6 @@ public class MediaProjectionPermissionActivity extends Activity

    private final FeatureFlags mFeatureFlags;
    private final Lazy<ScreenCaptureDevicePolicyResolver> mScreenCaptureDevicePolicyResolver;
    private final ActivityStarter mActivityStarter;

    private String mPackageName;
    private int mUid;
@@ -89,10 +87,8 @@ public class MediaProjectionPermissionActivity extends Activity

    @Inject
    public MediaProjectionPermissionActivity(FeatureFlags featureFlags,
            Lazy<ScreenCaptureDevicePolicyResolver> screenCaptureDevicePolicyResolver,
            ActivityStarter activityStarter) {
            Lazy<ScreenCaptureDevicePolicyResolver> screenCaptureDevicePolicyResolver) {
        mFeatureFlags = featureFlags;
        mActivityStarter = activityStarter;
        mScreenCaptureDevicePolicyResolver = screenCaptureDevicePolicyResolver;
    }

@@ -313,16 +309,8 @@ public class MediaProjectionPermissionActivity extends Activity
                // 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.
                // It is also important to make sure the shade is dismissed, otherwise users won't
                // see the app selector.
                mUserSelectingTask = true;
                mActivityStarter.startActivity(
                        intent,
                        /* dismissShade= */ true,
                        /* animationController= */ null,
                        /* showOverLockscreenWhenLocked= */ false,
                        UserHandle.of(ActivityManager.getCurrentUser())
                );
                startActivityAsUser(intent, UserHandle.of(ActivityManager.getCurrentUser()));
            }
        } catch (RemoteException e) {
            Log.e(TAG, "Error granting projection permission", e);