am 221b545c: Merge "Fix issue #18510117: Returning from an activity started with..." into lmp-mr1-dev
* commit '221b545cdaba2522fbb299428ac048641410c284': Fix issue #18510117: Returning from an activity started with...
This commit is contained in:
@@ -2436,7 +2436,7 @@ public final class ActivityThread {
|
|||||||
private void deliverNewIntents(ActivityClientRecord r, List<ReferrerIntent> intents) {
|
private void deliverNewIntents(ActivityClientRecord r, List<ReferrerIntent> intents) {
|
||||||
final int N = intents.size();
|
final int N = intents.size();
|
||||||
for (int i=0; i<N; i++) {
|
for (int i=0; i<N; i++) {
|
||||||
Intent intent = intents.get(i);
|
ReferrerIntent intent = intents.get(i);
|
||||||
intent.setExtrasClassLoader(r.activity.getClassLoader());
|
intent.setExtrasClassLoader(r.activity.getClassLoader());
|
||||||
intent.prepareToEnterProcess();
|
intent.prepareToEnterProcess();
|
||||||
r.activity.mFragments.noteStateNotSaved();
|
r.activity.mFragments.noteStateNotSaved();
|
||||||
|
|||||||
@@ -1208,14 +1208,17 @@ public class Instrumentation {
|
|||||||
* @param intent The new intent being received.
|
* @param intent The new intent being received.
|
||||||
*/
|
*/
|
||||||
public void callActivityOnNewIntent(Activity activity, Intent intent) {
|
public void callActivityOnNewIntent(Activity activity, Intent intent) {
|
||||||
|
activity.onNewIntent(intent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public void callActivityOnNewIntent(Activity activity, ReferrerIntent intent) {
|
||||||
final String oldReferrer = activity.mReferrer;
|
final String oldReferrer = activity.mReferrer;
|
||||||
try {
|
try {
|
||||||
try {
|
activity.mReferrer = intent.mReferrer;
|
||||||
activity.mReferrer = ((ReferrerIntent)intent).mReferrer;
|
callActivityOnNewIntent(activity, new Intent(intent));
|
||||||
} catch (ClassCastException e) {
|
|
||||||
activity.mReferrer = null;
|
|
||||||
}
|
|
||||||
activity.onNewIntent(intent);
|
|
||||||
} finally {
|
} finally {
|
||||||
activity.mReferrer = oldReferrer;
|
activity.mReferrer = oldReferrer;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user