am 474731d5: Merge change I2ffe306f into eclair
Merge commit '474731d5efb30c1e9184f998610054747eb8e764' into eclair-mr2 * commit '474731d5efb30c1e9184f998610054747eb8e764': Fix issue #2304284: contacts/dialer/recentcalls constantly flashing
This commit is contained in:
@ -1383,13 +1383,14 @@ public final class ActivityThread {
|
|||||||
|
|
||||||
public final void scheduleRelaunchActivity(IBinder token,
|
public final void scheduleRelaunchActivity(IBinder token,
|
||||||
List<ResultInfo> pendingResults, List<Intent> pendingNewIntents,
|
List<ResultInfo> pendingResults, List<Intent> pendingNewIntents,
|
||||||
int configChanges, boolean notResumed) {
|
int configChanges, boolean notResumed, Configuration config) {
|
||||||
ActivityRecord r = new ActivityRecord();
|
ActivityRecord r = new ActivityRecord();
|
||||||
|
|
||||||
r.token = token;
|
r.token = token;
|
||||||
r.pendingResults = pendingResults;
|
r.pendingResults = pendingResults;
|
||||||
r.pendingIntents = pendingNewIntents;
|
r.pendingIntents = pendingNewIntents;
|
||||||
r.startsNotResumed = notResumed;
|
r.startsNotResumed = notResumed;
|
||||||
|
r.createdConfig = config;
|
||||||
|
|
||||||
synchronized (mRelaunchingActivities) {
|
synchronized (mRelaunchingActivities) {
|
||||||
mRelaunchingActivities.add(r);
|
mRelaunchingActivities.add(r);
|
||||||
@ -2511,7 +2512,7 @@ public final class ActivityThread {
|
|||||||
Activity a = performLaunchActivity(r, customIntent);
|
Activity a = performLaunchActivity(r, customIntent);
|
||||||
|
|
||||||
if (a != null) {
|
if (a != null) {
|
||||||
r.createdConfig = new Configuration(a.getResources().getConfiguration());
|
r.createdConfig = new Configuration(mConfiguration);
|
||||||
handleResumeActivity(r.token, false, r.isForward);
|
handleResumeActivity(r.token, false, r.isForward);
|
||||||
|
|
||||||
if (!r.activity.mFinished && r.startsNotResumed) {
|
if (!r.activity.mFinished && r.startsNotResumed) {
|
||||||
@ -3563,6 +3564,16 @@ public final class ActivityThread {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tmp.createdConfig != null) {
|
||||||
|
// If the activity manager is passing us its current config,
|
||||||
|
// assume that is really what we want regardless of what we
|
||||||
|
// may have pending.
|
||||||
|
if (mConfiguration == null
|
||||||
|
|| mConfiguration.diff(tmp.createdConfig) != 0) {
|
||||||
|
changedConfig = tmp.createdConfig;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (DEBUG_CONFIGURATION) Log.v(TAG, "Relaunching activity "
|
if (DEBUG_CONFIGURATION) Log.v(TAG, "Relaunching activity "
|
||||||
+ tmp.token + ": changedConfig=" + changedConfig);
|
+ tmp.token + ": changedConfig=" + changedConfig);
|
||||||
|
|
||||||
|
@ -140,7 +140,11 @@ public abstract class ApplicationThreadNative extends Binder
|
|||||||
List<Intent> pi = data.createTypedArrayList(Intent.CREATOR);
|
List<Intent> pi = data.createTypedArrayList(Intent.CREATOR);
|
||||||
int configChanges = data.readInt();
|
int configChanges = data.readInt();
|
||||||
boolean notResumed = data.readInt() != 0;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -491,7 +495,8 @@ class ApplicationThreadProxy implements IApplicationThread {
|
|||||||
|
|
||||||
public final void scheduleRelaunchActivity(IBinder token,
|
public final void scheduleRelaunchActivity(IBinder token,
|
||||||
List<ResultInfo> pendingResults, List<Intent> pendingNewIntents,
|
List<ResultInfo> pendingResults, List<Intent> pendingNewIntents,
|
||||||
int configChanges, boolean notResumed) throws RemoteException {
|
int configChanges, boolean notResumed, Configuration config)
|
||||||
|
throws RemoteException {
|
||||||
Parcel data = Parcel.obtain();
|
Parcel data = Parcel.obtain();
|
||||||
data.writeInterfaceToken(IApplicationThread.descriptor);
|
data.writeInterfaceToken(IApplicationThread.descriptor);
|
||||||
data.writeStrongBinder(token);
|
data.writeStrongBinder(token);
|
||||||
@ -499,6 +504,12 @@ class ApplicationThreadProxy implements IApplicationThread {
|
|||||||
data.writeTypedList(pendingNewIntents);
|
data.writeTypedList(pendingNewIntents);
|
||||||
data.writeInt(configChanges);
|
data.writeInt(configChanges);
|
||||||
data.writeInt(notResumed ? 1 : 0);
|
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,
|
mRemote.transact(SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION, data, null,
|
||||||
IBinder.FLAG_ONEWAY);
|
IBinder.FLAG_ONEWAY);
|
||||||
data.recycle();
|
data.recycle();
|
||||||
|
@ -56,7 +56,7 @@ public interface IApplicationThread extends IInterface {
|
|||||||
throws RemoteException;
|
throws RemoteException;
|
||||||
void scheduleRelaunchActivity(IBinder token, List<ResultInfo> pendingResults,
|
void scheduleRelaunchActivity(IBinder token, List<ResultInfo> pendingResults,
|
||||||
List<Intent> pendingNewIntents, int configChanges,
|
List<Intent> pendingNewIntents, int configChanges,
|
||||||
boolean notResumed) throws RemoteException;
|
boolean notResumed, Configuration config) throws RemoteException;
|
||||||
void scheduleNewIntent(List<Intent> intent, IBinder token) throws RemoteException;
|
void scheduleNewIntent(List<Intent> intent, IBinder token) throws RemoteException;
|
||||||
void scheduleDestroyActivity(IBinder token, boolean finished,
|
void scheduleDestroyActivity(IBinder token, boolean finished,
|
||||||
int configChanges) throws RemoteException;
|
int configChanges) throws RemoteException;
|
||||||
|
@ -12891,7 +12891,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
try {
|
try {
|
||||||
if (DEBUG_SWITCH) Log.i(TAG, "Switch is restarting resumed " + r);
|
if (DEBUG_SWITCH) Log.i(TAG, "Switch is restarting resumed " + r);
|
||||||
r.app.thread.scheduleRelaunchActivity(r, results, newIntents,
|
r.app.thread.scheduleRelaunchActivity(r, results, newIntents,
|
||||||
changes, !andResume);
|
changes, !andResume, mConfiguration);
|
||||||
// Note: don't need to call pauseIfSleepingLocked() here, because
|
// Note: don't need to call pauseIfSleepingLocked() here, because
|
||||||
// the caller will only pass in 'andResume' if this activity is
|
// the caller will only pass in 'andResume' if this activity is
|
||||||
// currently resumed, which implies we aren't sleeping.
|
// currently resumed, which implies we aren't sleeping.
|
||||||
|
Reference in New Issue
Block a user