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

Commit 8f54a7c5 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge changes Ibae2de51,I1d6718d9

* changes:
  Allow share/edit screenshot actions from lockscreen
  Prevent clobbering of activity options bundle when merging
parents ca48d745 06ca2744
Loading
Loading
Loading
Loading
+36 −14
Original line number Diff line number Diff line
@@ -302,7 +302,6 @@ public class ActivityOptions {
    private int mResultCode;
    private int mExitCoordinatorIndex;
    private PendingIntent mUsageTimeReport;
    private boolean mLockTaskMode = false;
    private int mLaunchDisplayId = INVALID_DISPLAY;
    @WindowConfiguration.WindowingMode
    private int mLaunchWindowingMode = WINDOWING_MODE_UNDEFINED;
@@ -310,6 +309,7 @@ public class ActivityOptions {
    private int mLaunchActivityType = ACTIVITY_TYPE_UNDEFINED;
    private int mLaunchTaskId = -1;
    private int mSplitScreenCreateMode = SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT;
    private boolean mLockTaskMode = false;
    private boolean mDisallowEnterPictureInPictureWhileLaunching;
    private boolean mTaskOverlay;
    private boolean mTaskOverlayCanResume;
@@ -946,7 +946,7 @@ public class ActivityOptions {
            mAnimationFinishedListener = IRemoteCallback.Stub.asInterface(
                    opts.getBinder(KEY_ANIMATION_FINISHED_LISTENER));
        }
        mRotationAnimationHint = opts.getInt(KEY_ROTATION_ANIMATION_HINT);
        mRotationAnimationHint = opts.getInt(KEY_ROTATION_ANIMATION_HINT, -1);
        mAppVerificationBundle = opts.getBundle(KEY_INSTANT_APP_VERIFICATION_BUNDLE);
        if (opts.containsKey(KEY_SPECS_FUTURE)) {
            mSpecsFuture = IAppTransitionAnimationSpecsFuture.Stub.asInterface(opts.getBinder(
@@ -1442,17 +1442,37 @@ public class ActivityOptions {
                b.putInt(KEY_EXIT_COORDINATOR_INDEX, mExitCoordinatorIndex);
                break;
        }
        if (mLockTaskMode) {
            b.putBoolean(KEY_LOCK_TASK_MODE, mLockTaskMode);
        }
        if (mLaunchDisplayId != INVALID_DISPLAY) {
            b.putInt(KEY_LAUNCH_DISPLAY_ID, mLaunchDisplayId);
        }
        if (mLaunchWindowingMode != WINDOWING_MODE_UNDEFINED) {
            b.putInt(KEY_LAUNCH_WINDOWING_MODE, mLaunchWindowingMode);
        }
        if (mLaunchActivityType != ACTIVITY_TYPE_UNDEFINED) {
            b.putInt(KEY_LAUNCH_ACTIVITY_TYPE, mLaunchActivityType);
        }
        if (mLaunchTaskId != -1) {
            b.putInt(KEY_LAUNCH_TASK_ID, mLaunchTaskId);
        }
        if (mTaskOverlay) {
            b.putBoolean(KEY_TASK_OVERLAY, mTaskOverlay);
        }
        if (mTaskOverlayCanResume) {
            b.putBoolean(KEY_TASK_OVERLAY_CAN_RESUME, mTaskOverlayCanResume);
        }
        if (mAvoidMoveToFront) {
            b.putBoolean(KEY_AVOID_MOVE_TO_FRONT, mAvoidMoveToFront);
        }
        if (mSplitScreenCreateMode != SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT) {
            b.putInt(KEY_SPLIT_SCREEN_CREATE_MODE, mSplitScreenCreateMode);
        }
        if (mDisallowEnterPictureInPictureWhileLaunching) {
            b.putBoolean(KEY_DISALLOW_ENTER_PICTURE_IN_PICTURE_WHILE_LAUNCHING,
                    mDisallowEnterPictureInPictureWhileLaunching);
        }
        if (mAnimSpecs != null) {
            b.putParcelableArray(KEY_ANIM_SPECS, mAnimSpecs);
        }
@@ -1462,7 +1482,9 @@ public class ActivityOptions {
        if (mSpecsFuture != null) {
            b.putBinder(KEY_SPECS_FUTURE, mSpecsFuture.asBinder());
        }
        if (mRotationAnimationHint != -1) {
            b.putInt(KEY_ROTATION_ANIMATION_HINT, mRotationAnimationHint);
        }
        if (mAppVerificationBundle != null) {
            b.putBundle(KEY_INSTANT_APP_VERIFICATION_BUNDLE, mAppVerificationBundle);
        }
+3 −5
Original line number Diff line number Diff line
@@ -339,19 +339,17 @@
            android:exported="false">
        </activity>

        <!-- Springboard for launching the share activity -->
        <receiver android:name=".screenshot.GlobalScreenshot$ScreenshotActionReceiver"
            android:process=":screenshot"
        <!-- Springboard for launching the share and edit activity. This needs to be in the main
             system ui process since we need to notify the status bar to dismiss the keyguard -->
        <receiver android:name=".screenshot.GlobalScreenshot$ActionProxyReceiver"
            android:exported="false" />

        <!-- Callback for dismissing screenshot notification after a share target is picked -->
        <receiver android:name=".screenshot.GlobalScreenshot$TargetChosenReceiver"
            android:process=":screenshot"
            android:exported="false" />

        <!-- Callback for deleting screenshot notification -->
        <receiver android:name=".screenshot.GlobalScreenshot$DeleteScreenshotReceiver"
            android:process=":screenshot"
            android:exported="false" />

        <!-- started from UsbDeviceSettingsManager -->
+2 −2
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
            long token = Binder.clearCallingIdentity();
            try {
                mHandler.post(() -> {
                    StatusBar statusBar = ((SystemUIApplication) mContext).getComponent(
                    StatusBar statusBar = SysUiServiceProvider.getComponent(mContext,
                            StatusBar.class);
                    if (statusBar != null) {
                        statusBar.showScreenPinningRequest(taskId, false /* allowCancel */);
@@ -152,7 +152,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
        public Rect getNonMinimizedSplitScreenSecondaryBounds() {
            long token = Binder.clearCallingIdentity();
            try {
                Divider divider = ((SystemUIApplication) mContext).getComponent(Divider.class);
                Divider divider = SysUiServiceProvider.getComponent(mContext, Divider.class);
                if (divider != null) {
                    return divider.getView().getNonMinimizedSplitScreenSecondaryBounds();
                }
+2 −1
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ import android.widget.Toast;

import com.android.systemui.Dependency;
import com.android.systemui.OverviewProxyService;
import com.android.systemui.SysUiServiceProvider;
import com.google.android.collect.Lists;

import com.android.internal.logging.MetricsLogger;
@@ -1095,7 +1096,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
    }

    private StatusBar getStatusBar() {
        return ((SystemUIApplication) mContext).getComponent(StatusBar.class);
        return SysUiServiceProvider.getComponent(mContext, StatusBar.class);
    }

    /**
+2 −2
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

import com.android.systemui.SysUiServiceProvider;
import com.android.systemui.SystemUIApplication;

/**
@@ -40,8 +41,7 @@ public class RecentsSystemUserService extends Service {

    @Override
    public IBinder onBind(Intent intent) {
        SystemUIApplication app = (SystemUIApplication) getApplication();
        Recents recents = app.getComponent(Recents.class);
        Recents recents = SysUiServiceProvider.getComponent(this, Recents.class);
        if (DEBUG) {
            Log.d(TAG, "onBind: " + recents);
        }
Loading