diff options
| -rw-r--r-- | services/core/java/com/android/server/wm/ActivityStartController.java | 5 | ||||
| -rw-r--r-- | services/core/java/com/android/server/wm/WindowOrganizerController.java | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityStartController.java b/services/core/java/com/android/server/wm/ActivityStartController.java index 35ec5adf54b0..0580d4a5a4a3 100644 --- a/services/core/java/com/android/server/wm/ActivityStartController.java +++ b/services/core/java/com/android/server/wm/ActivityStartController.java @@ -43,7 +43,6 @@ import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.os.Binder; -import android.os.Bundle; import android.os.IBinder; import android.os.Trace; import android.os.UserHandle; @@ -550,14 +549,14 @@ public class ActivityStartController { * Starts an activity in the TaskFragment. * @param taskFragment TaskFragment {@link TaskFragment} to start the activity in. * @param activityIntent intent to start the activity. - * @param activityOptions ActivityOptions to start the activity with. + * @param activityOptions SafeActivityOptions to start the activity with. * @param resultTo the caller activity * @param callingUid the caller uid * @param callingPid the caller pid * @return the start result. */ int startActivityInTaskFragment(@NonNull TaskFragment taskFragment, - @NonNull Intent activityIntent, @Nullable Bundle activityOptions, + @NonNull Intent activityIntent, @Nullable SafeActivityOptions activityOptions, @Nullable IBinder resultTo, int callingUid, int callingPid, @Nullable IBinder errorCallbackToken) { final ActivityRecord caller = diff --git a/services/core/java/com/android/server/wm/WindowOrganizerController.java b/services/core/java/com/android/server/wm/WindowOrganizerController.java index 2229807f5db1..82c7a9350eca 100644 --- a/services/core/java/com/android/server/wm/WindowOrganizerController.java +++ b/services/core/java/com/android/server/wm/WindowOrganizerController.java @@ -1523,8 +1523,10 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub final IBinder callerActivityToken = operation.getActivityToken(); final Intent activityIntent = operation.getActivityIntent(); final Bundle activityOptions = operation.getBundle(); + final SafeActivityOptions safeOptions = + SafeActivityOptions.fromBundle(activityOptions, caller.mPid, caller.mUid); final int result = waitAsyncStart(() -> mService.getActivityStartController() - .startActivityInTaskFragment(taskFragment, activityIntent, activityOptions, + .startActivityInTaskFragment(taskFragment, activityIntent, safeOptions, callerActivityToken, caller.mUid, caller.mPid, errorCallbackToken)); if (!isStartResultSuccessful(result)) { |