From 871ecdce67fb59a2603c1b93db657fe8b65695bd Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Fri, 11 Dec 2009 15:24:33 -0800 Subject: Fix issue #2304284: contacts/dialer/recentcalls constantly flashing Make sure the application is always given the most recent configuration when launcher. Use the current configuration, instead of whatever happens to be set by the app, for reporting what it was launched with. Change-Id: I2ffe306f56cc9092b640546dd0a28d2c29b9c0b3 --- core/java/android/app/ApplicationThreadNative.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'core/java/android/app/ApplicationThreadNative.java') diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java index a772a8f78ddf..7cba13fe428b 100644 --- a/core/java/android/app/ApplicationThreadNative.java +++ b/core/java/android/app/ApplicationThreadNative.java @@ -140,7 +140,11 @@ public abstract class ApplicationThreadNative extends Binder List pi = data.createTypedArrayList(Intent.CREATOR); int configChanges = data.readInt(); boolean notResumed = data.readInt() != 0; - scheduleRelaunchActivity(b, ri, pi, configChanges, notResumed); + Configuration config = null; + if (data.readInt() != 0) { + config = Configuration.CREATOR.createFromParcel(data); + } + scheduleRelaunchActivity(b, ri, pi, configChanges, notResumed, config); return true; } @@ -491,7 +495,8 @@ class ApplicationThreadProxy implements IApplicationThread { public final void scheduleRelaunchActivity(IBinder token, List pendingResults, List pendingNewIntents, - int configChanges, boolean notResumed) throws RemoteException { + int configChanges, boolean notResumed, Configuration config) + throws RemoteException { Parcel data = Parcel.obtain(); data.writeInterfaceToken(IApplicationThread.descriptor); data.writeStrongBinder(token); @@ -499,6 +504,12 @@ class ApplicationThreadProxy implements IApplicationThread { data.writeTypedList(pendingNewIntents); data.writeInt(configChanges); data.writeInt(notResumed ? 1 : 0); + if (config != null) { + data.writeInt(1); + config.writeToParcel(data, 0); + } else { + data.writeInt(0); + } mRemote.transact(SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION, data, null, IBinder.FLAG_ONEWAY); data.recycle(); -- cgit v1.2.3