diff options
| author | Craig Mautner <cmautner@google.com> | 2014-07-02 15:04:09 -0700 |
|---|---|---|
| committer | George Mount <mount@google.com> | 2014-07-07 12:48:50 -0700 |
| commit | eb8abf7207aa118065999514f9248affbdd94de1 (patch) | |
| tree | 692d600948fdc214b59eb042b4802459a05f163b /core/java/android/app/ActivityThread.java | |
| parent | d1ed9b3ea74870fae3e666b4a3b26d8281999d8a (diff) | |
Introduce onNewActivityOptions for return activity
When an activity that is already translucent returns to the
previous activity using a scene transition the receiving activity
did not receive its ActivityOptions for its side of the animation.
The new method onNewActivityOptions() delivers those options.
Fixes bug 14869070.
Change-Id: I09b136b3213aae5d3521894e17a7500ac793f3d2
Diffstat (limited to 'core/java/android/app/ActivityThread.java')
| -rw-r--r-- | core/java/android/app/ActivityThread.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 422d88c6b403..7b48e1d14396 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -77,6 +77,7 @@ import android.util.DisplayMetrics; import android.util.EventLog; import android.util.Log; import android.util.LogPrinter; +import android.util.Pair; import android.util.PrintWriterPrinter; import android.util.Slog; import android.util.SuperNotCalledException; @@ -1113,6 +1114,11 @@ public final class ActivityThread { sendMessage(H.TRANSLUCENT_CONVERSION_COMPLETE, token, drawComplete ? 1 : 0); } + public void scheduleOnNewActivityOptions(IBinder token, ActivityOptions options) { + sendMessage(H.ON_NEW_ACTIVITY_OPTIONS, + new Pair<IBinder, ActivityOptions>(token, options)); + } + public void setProcessState(int state) { updateProcessState(state, true); } @@ -1196,6 +1202,7 @@ public final class ActivityThread { public static final int REQUEST_ASSIST_CONTEXT_EXTRAS = 143; public static final int TRANSLUCENT_CONVERSION_COMPLETE = 144; public static final int INSTALL_PROVIDER = 145; + public static final int ON_NEW_ACTIVITY_OPTIONS = 146; String codeToString(int code) { if (DEBUG_MESSAGES) { @@ -1245,6 +1252,7 @@ public final class ActivityThread { case REQUEST_ASSIST_CONTEXT_EXTRAS: return "REQUEST_ASSIST_CONTEXT_EXTRAS"; case TRANSLUCENT_CONVERSION_COMPLETE: return "TRANSLUCENT_CONVERSION_COMPLETE"; case INSTALL_PROVIDER: return "INSTALL_PROVIDER"; + case ON_NEW_ACTIVITY_OPTIONS: return "ON_NEW_ACTIVITY_OPTIONS"; } } return Integer.toString(code); @@ -1459,6 +1467,10 @@ public final class ActivityThread { case INSTALL_PROVIDER: handleInstallProvider((ProviderInfo) msg.obj); break; + case ON_NEW_ACTIVITY_OPTIONS: + Pair<IBinder, ActivityOptions> pair = (Pair<IBinder, ActivityOptions>) msg.obj; + onNewActivityOptions(pair.first, pair.second); + break; } if (DEBUG_MESSAGES) Slog.v(TAG, "<<< done: " + codeToString(msg.what)); } @@ -2435,6 +2447,13 @@ public final class ActivityThread { } } + public void onNewActivityOptions(IBinder token, ActivityOptions options) { + ActivityClientRecord r = mActivities.get(token); + if (r != null) { + r.activity.onNewActivityOptions(options); + } + } + public void handleInstallProvider(ProviderInfo info) { installContentProviders(mInitialApplication, Lists.newArrayList(info)); } |
