summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/ActivityThread.java
diff options
context:
space:
mode:
authorCraig Mautner <cmautner@google.com>2014-05-09 17:05:11 -0700
committerCraig Mautner <cmautner@google.com>2014-05-13 09:51:50 -0700
commit233ceeebab7efe6ad4783371003c4cf29b896436 (patch)
tree0e342913f30ebd922a3b4313bad0ece303c78e68 /core/java/android/app/ActivityThread.java
parente4f1960652a50b99100f7ff68ed461524ca2b9f1 (diff)
downloadframeworks_base-233ceeebab7efe6ad4783371003c4cf29b896436.zip
frameworks_base-233ceeebab7efe6ad4783371003c4cf29b896436.tar.gz
frameworks_base-233ceeebab7efe6ad4783371003c4cf29b896436.tar.bz2
Pass ActivityOptions back from finishing activity.
Adding an ActivityOptions parameter to convertToTranslucent provides a mechanism for delivering these options to the activity that launched the one that is returning. Fixes bug 13032208. Fixes bug 14469460. Fixes bug 14597427. Change-Id: I4115dd3c69de9d175f6df0498a6e964fca5eca29
Diffstat (limited to 'core/java/android/app/ActivityThread.java')
-rw-r--r--core/java/android/app/ActivityThread.java27
1 files changed, 9 insertions, 18 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 161cb76..a839ea3 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -76,7 +76,6 @@ 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;
@@ -294,7 +293,6 @@ public final class ActivityThread {
boolean isForward;
int pendingConfigChanges;
boolean onlyLocalRequest;
- Bundle activityOptions;
View mPendingRemoveWindow;
WindowManager mPendingRemoveWindowManager;
@@ -593,8 +591,7 @@ public final class ActivityThread {
public final void scheduleResumeActivity(IBinder token, int processState,
boolean isForward, Bundle resumeArgs) {
updateProcessState(processState, false);
- sendMessage(H.RESUME_ACTIVITY, new Pair<IBinder, Bundle>(token, resumeArgs),
- isForward ? 1 : 0);
+ sendMessage(H.RESUME_ACTIVITY, token, isForward ? 1 : 0);
}
public final void scheduleSendResult(IBinder token, List<ResultInfo> results) {
@@ -611,8 +608,7 @@ public final class ActivityThread {
IVoiceInteractor voiceInteractor, int procState, Bundle state,
PersistableBundle persistentState, List<ResultInfo> pendingResults,
List<Intent> pendingNewIntents, boolean notResumed, boolean isForward,
- String profileName, ParcelFileDescriptor profileFd, boolean autoStopProfiler,
- Bundle resumeArgs) {
+ String profileName, ParcelFileDescriptor profileFd, boolean autoStopProfiler) {
updateProcessState(procState, false);
@@ -636,7 +632,6 @@ public final class ActivityThread {
r.profileFile = profileName;
r.profileFd = profileFd;
r.autoStopProfiler = autoStopProfiler;
- r.activityOptions = resumeArgs;
updatePendingConfiguration(curConfig);
@@ -1301,9 +1296,7 @@ public final class ActivityThread {
break;
case RESUME_ACTIVITY:
Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "activityResume");
- final Pair<IBinder, Bundle> resumeArgs = (Pair<IBinder, Bundle>) msg.obj;
- handleResumeActivity(resumeArgs.first, resumeArgs.second, true,
- msg.arg1 != 0, true);
+ handleResumeActivity((IBinder) msg.obj, true, msg.arg1 != 0, true);
Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
break;
case SEND_RESULT:
@@ -2083,7 +2076,7 @@ public final class ActivityThread {
+ ", comp=" + name
+ ", token=" + token);
}
- return performLaunchActivity(r, null, null);
+ return performLaunchActivity(r, null);
}
public final Activity getActivity(IBinder token) {
@@ -2136,8 +2129,7 @@ public final class ActivityThread {
sendMessage(H.CLEAN_UP_CONTEXT, cci);
}
- private Activity performLaunchActivity(ActivityClientRecord r, Intent customIntent,
- Bundle options) {
+ private Activity performLaunchActivity(ActivityClientRecord r, Intent customIntent) {
// System.out.println("##### [" + System.currentTimeMillis() + "] ActivityThread.performLaunchActivity(" + r + ")");
ActivityInfo aInfo = r.activityInfo;
@@ -2195,7 +2187,7 @@ public final class ActivityThread {
+ r.activityInfo.name + " with config " + config);
activity.attach(appContext, this, getInstrumentation(), r.token,
r.ident, app, r.intent, r.activityInfo, title, r.parent,
- r.embeddedID, r.lastNonConfigurationInstances, config, options,
+ r.embeddedID, r.lastNonConfigurationInstances, config,
r.voiceInteractor);
if (customIntent != null) {
@@ -2321,12 +2313,12 @@ public final class ActivityThread {
if (localLOGV) Slog.v(
TAG, "Handling launch of " + r);
- Activity a = performLaunchActivity(r, customIntent, r.activityOptions);
+ Activity a = performLaunchActivity(r, customIntent);
if (a != null) {
r.createdConfig = new Configuration(mConfiguration);
Bundle oldState = r.state;
- handleResumeActivity(r.token, r.activityOptions, false, r.isForward,
+ handleResumeActivity(r.token, false, r.isForward,
!r.activity.mFinished && !r.startsNotResumed);
if (!r.activity.mFinished && r.startsNotResumed) {
@@ -2886,7 +2878,7 @@ public final class ActivityThread {
r.mPendingRemoveWindowManager = null;
}
- final void handleResumeActivity(IBinder token, Bundle resumeArgs,
+ final void handleResumeActivity(IBinder token,
boolean clearHide, boolean isForward, boolean reallyResume) {
// If we are getting ready to gc after going to the background, well
// we are back active so skip it.
@@ -3809,7 +3801,6 @@ public final class ActivityThread {
}
}
r.startsNotResumed = tmp.startsNotResumed;
- r.activityOptions = null;
handleLaunchActivity(r, currentIntent);
}