summaryrefslogtreecommitdiff
path: root/core/java/android/app/ApplicationThreadNative.java
diff options
context:
space:
mode:
authorWale Ogunwale <ogunwale@google.com>2015-02-07 16:16:59 -0800
committerWale Ogunwale <ogunwale@google.com>2015-02-09 16:22:04 -0800
commitc2607b4ececbefd18f223fa89d1b1aac56516009 (patch)
tree1509f777e85daf32b252334d1313ec3988c6744a /core/java/android/app/ApplicationThreadNative.java
parent7869f4c9a355f01cb098ee0fc01da32b12079e3b (diff)
Include stack override configurations in onConfigurationChanged() call.
Important for activities that handle configuration changes. Change-Id: I4d1612026f293fbb99e1abc17e663f0215658ae6
Diffstat (limited to 'core/java/android/app/ApplicationThreadNative.java')
-rw-r--r--core/java/android/app/ApplicationThreadNative.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index 349b66dd51c7..b6989abfc578 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -409,7 +409,11 @@ public abstract class ApplicationThreadNative extends Binder
{
data.enforceInterface(IApplicationThread.descriptor);
IBinder b = data.readStrongBinder();
- scheduleActivityConfigurationChanged(b);
+ Configuration overrideConfig = null;
+ if (data.readInt() != 0) {
+ overrideConfig = Configuration.CREATOR.createFromParcel(data);
+ }
+ scheduleActivityConfigurationChanged(b, overrideConfig);
return true;
}
@@ -1116,6 +1120,7 @@ class ApplicationThreadProxy implements IApplicationThread {
data.recycle();
}
+ @Override
public final void scheduleLowMemory() throws RemoteException {
Parcel data = Parcel.obtain();
data.writeInterfaceToken(IApplicationThread.descriptor);
@@ -1124,15 +1129,24 @@ class ApplicationThreadProxy implements IApplicationThread {
data.recycle();
}
- public final void scheduleActivityConfigurationChanged(IBinder token) throws RemoteException {
+ @Override
+ public final void scheduleActivityConfigurationChanged(
+ IBinder token, Configuration overrideConfig) throws RemoteException {
Parcel data = Parcel.obtain();
data.writeInterfaceToken(IApplicationThread.descriptor);
data.writeStrongBinder(token);
+ if (overrideConfig != null) {
+ data.writeInt(1);
+ overrideConfig.writeToParcel(data, 0);
+ } else {
+ data.writeInt(0);
+ }
mRemote.transact(SCHEDULE_ACTIVITY_CONFIGURATION_CHANGED_TRANSACTION, data, null,
IBinder.FLAG_ONEWAY);
data.recycle();
}
+ @Override
public void profilerControl(boolean start, ProfilerInfo profilerInfo, int profileType)
throws RemoteException {
Parcel data = Parcel.obtain();