Loading core/java/android/app/Activity.java +8 −2 Original line number Diff line number Diff line Loading @@ -890,6 +890,9 @@ public class Activity extends ContextThemeWrapper @UnsupportedAppUsage final FragmentController mFragments = FragmentController.createController(new HostCallbacks()); /** The options for scene transition. */ ActivityOptions mPendingOptions; private static final class ManagedCursor { ManagedCursor(Cursor cursor) { mCursor = cursor; Loading Loading @@ -7258,7 +7261,7 @@ public class Activity extends ContextThemeWrapper } /** * Retrieve the ActivityOptions passed in from the launching activity or passed back * Takes the ActivityOptions passed in from the launching activity or passed back * from an activity launched by this activity in its call to {@link * #convertToTranslucent(TranslucentConversionListener, ActivityOptions)} * Loading @@ -7267,7 +7270,10 @@ public class Activity extends ContextThemeWrapper */ @UnsupportedAppUsage ActivityOptions getActivityOptions() { return ActivityOptions.fromBundle(ActivityClient.getInstance().getActivityOptions(mToken)); final ActivityOptions options = mPendingOptions; // The option only applies once. mPendingOptions = null; return options; } /** Loading core/java/android/app/ActivityClient.java +0 −8 Original line number Diff line number Diff line Loading @@ -237,14 +237,6 @@ public class ActivityClient { } } Bundle getActivityOptions(IBinder token) { try { return getActivityClientController().getActivityOptions(token); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } public void setRequestedOrientation(IBinder token, int requestedOrientation) { try { getActivityClientController().setRequestedOrientation(token, requestedOrientation); Loading core/java/android/app/ActivityThread.java +14 −3 Original line number Diff line number Diff line Loading @@ -567,6 +567,9 @@ public final class ActivityThread extends ClientTransactionHandler { @UnsupportedAppUsage boolean mPreserveWindow; /** The options for scene transition. */ ActivityOptions mActivityOptions; /** * If non-null, the activity is launching with a specified rotation, the adjustments should * be consumed before activity creation. Loading @@ -587,8 +590,8 @@ public final class ActivityThread extends ClientTransactionHandler { ActivityInfo info, Configuration overrideConfig, CompatibilityInfo compatInfo, String referrer, IVoiceInteractor voiceInteractor, Bundle state, PersistableBundle persistentState, List<ResultInfo> pendingResults, List<ReferrerIntent> pendingNewIntents, boolean isForward, ProfilerInfo profilerInfo, ClientTransactionHandler client, List<ReferrerIntent> pendingNewIntents, ActivityOptions activityOptions, boolean isForward, ProfilerInfo profilerInfo, ClientTransactionHandler client, IBinder assistToken, FixedRotationAdjustments fixedRotationAdjustments) { this.token = token; this.assistToken = assistToken; Loading @@ -607,6 +610,7 @@ public final class ActivityThread extends ClientTransactionHandler { this.overrideConfig = overrideConfig; this.packageInfo = client.getPackageInfoNoCheck(activityInfo.applicationInfo, compatInfo); mActivityOptions = activityOptions; mPendingFixedRotationAdjustments = fixedRotationAdjustments; init(); } Loading Loading @@ -3469,6 +3473,10 @@ public final class ActivityThread extends ClientTransactionHandler { activity.setTheme(theme); } if (r.mActivityOptions != null) { activity.mPendingOptions = r.mActivityOptions; r.mActivityOptions = null; } activity.mCalled = false; if (r.isPersistable()) { mInstrumentation.callActivityOnCreate(activity, r.state, r.persistentState); Loading Loading @@ -3509,7 +3517,7 @@ public final class ActivityThread extends ClientTransactionHandler { @Override public void handleStartActivity(ActivityClientRecord r, PendingTransactionActions pendingActions) { PendingTransactionActions pendingActions, ActivityOptions activityOptions) { final Activity activity = r.activity; if (!r.stopped) { throw new IllegalStateException("Can't start activity that is not stopped."); Loading @@ -3520,6 +3528,9 @@ public final class ActivityThread extends ClientTransactionHandler { } unscheduleGcIdler(); if (activityOptions != null) { activity.mPendingOptions = activityOptions; } // Start activity.performStart("handleStartActivity"); Loading core/java/android/app/ClientTransactionHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -164,7 +164,7 @@ public abstract class ClientTransactionHandler { /** Perform activity start. */ public abstract void handleStartActivity(@NonNull ActivityClientRecord r, PendingTransactionActions pendingActions); PendingTransactionActions pendingActions, ActivityOptions activityOptions); /** Get package info. */ public abstract LoadedApk getPackageInfoNoCheck(ApplicationInfo ai, Loading core/java/android/app/IActivityClientController.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,6 @@ interface IActivityClientController { String getCallingPackage(in IBinder token); int getLaunchedFromUid(in IBinder token); String getLaunchedFromPackage(in IBinder token); Bundle getActivityOptions(in IBinder token); void setRequestedOrientation(in IBinder token, int requestedOrientation); int getRequestedOrientation(in IBinder token); Loading Loading
core/java/android/app/Activity.java +8 −2 Original line number Diff line number Diff line Loading @@ -890,6 +890,9 @@ public class Activity extends ContextThemeWrapper @UnsupportedAppUsage final FragmentController mFragments = FragmentController.createController(new HostCallbacks()); /** The options for scene transition. */ ActivityOptions mPendingOptions; private static final class ManagedCursor { ManagedCursor(Cursor cursor) { mCursor = cursor; Loading Loading @@ -7258,7 +7261,7 @@ public class Activity extends ContextThemeWrapper } /** * Retrieve the ActivityOptions passed in from the launching activity or passed back * Takes the ActivityOptions passed in from the launching activity or passed back * from an activity launched by this activity in its call to {@link * #convertToTranslucent(TranslucentConversionListener, ActivityOptions)} * Loading @@ -7267,7 +7270,10 @@ public class Activity extends ContextThemeWrapper */ @UnsupportedAppUsage ActivityOptions getActivityOptions() { return ActivityOptions.fromBundle(ActivityClient.getInstance().getActivityOptions(mToken)); final ActivityOptions options = mPendingOptions; // The option only applies once. mPendingOptions = null; return options; } /** Loading
core/java/android/app/ActivityClient.java +0 −8 Original line number Diff line number Diff line Loading @@ -237,14 +237,6 @@ public class ActivityClient { } } Bundle getActivityOptions(IBinder token) { try { return getActivityClientController().getActivityOptions(token); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } public void setRequestedOrientation(IBinder token, int requestedOrientation) { try { getActivityClientController().setRequestedOrientation(token, requestedOrientation); Loading
core/java/android/app/ActivityThread.java +14 −3 Original line number Diff line number Diff line Loading @@ -567,6 +567,9 @@ public final class ActivityThread extends ClientTransactionHandler { @UnsupportedAppUsage boolean mPreserveWindow; /** The options for scene transition. */ ActivityOptions mActivityOptions; /** * If non-null, the activity is launching with a specified rotation, the adjustments should * be consumed before activity creation. Loading @@ -587,8 +590,8 @@ public final class ActivityThread extends ClientTransactionHandler { ActivityInfo info, Configuration overrideConfig, CompatibilityInfo compatInfo, String referrer, IVoiceInteractor voiceInteractor, Bundle state, PersistableBundle persistentState, List<ResultInfo> pendingResults, List<ReferrerIntent> pendingNewIntents, boolean isForward, ProfilerInfo profilerInfo, ClientTransactionHandler client, List<ReferrerIntent> pendingNewIntents, ActivityOptions activityOptions, boolean isForward, ProfilerInfo profilerInfo, ClientTransactionHandler client, IBinder assistToken, FixedRotationAdjustments fixedRotationAdjustments) { this.token = token; this.assistToken = assistToken; Loading @@ -607,6 +610,7 @@ public final class ActivityThread extends ClientTransactionHandler { this.overrideConfig = overrideConfig; this.packageInfo = client.getPackageInfoNoCheck(activityInfo.applicationInfo, compatInfo); mActivityOptions = activityOptions; mPendingFixedRotationAdjustments = fixedRotationAdjustments; init(); } Loading Loading @@ -3469,6 +3473,10 @@ public final class ActivityThread extends ClientTransactionHandler { activity.setTheme(theme); } if (r.mActivityOptions != null) { activity.mPendingOptions = r.mActivityOptions; r.mActivityOptions = null; } activity.mCalled = false; if (r.isPersistable()) { mInstrumentation.callActivityOnCreate(activity, r.state, r.persistentState); Loading Loading @@ -3509,7 +3517,7 @@ public final class ActivityThread extends ClientTransactionHandler { @Override public void handleStartActivity(ActivityClientRecord r, PendingTransactionActions pendingActions) { PendingTransactionActions pendingActions, ActivityOptions activityOptions) { final Activity activity = r.activity; if (!r.stopped) { throw new IllegalStateException("Can't start activity that is not stopped."); Loading @@ -3520,6 +3528,9 @@ public final class ActivityThread extends ClientTransactionHandler { } unscheduleGcIdler(); if (activityOptions != null) { activity.mPendingOptions = activityOptions; } // Start activity.performStart("handleStartActivity"); Loading
core/java/android/app/ClientTransactionHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -164,7 +164,7 @@ public abstract class ClientTransactionHandler { /** Perform activity start. */ public abstract void handleStartActivity(@NonNull ActivityClientRecord r, PendingTransactionActions pendingActions); PendingTransactionActions pendingActions, ActivityOptions activityOptions); /** Get package info. */ public abstract LoadedApk getPackageInfoNoCheck(ApplicationInfo ai, Loading
core/java/android/app/IActivityClientController.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,6 @@ interface IActivityClientController { String getCallingPackage(in IBinder token); int getLaunchedFromUid(in IBinder token); String getLaunchedFromPackage(in IBinder token); Bundle getActivityOptions(in IBinder token); void setRequestedOrientation(in IBinder token, int requestedOrientation); int getRequestedOrientation(in IBinder token); Loading