summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/ActivityManagerNative.java
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2015-05-07 11:41:41 -0700
committerJorim Jaggi <jjaggi@google.com>2015-05-13 14:23:05 -0700
commit827e0facfefd0c0033dcfb1747b4fa6f80f9e0e2 (patch)
treec6905d367303ce8dc3ba3dde34d0b18c6314f29e /core/java/android/app/ActivityManagerNative.java
parente1d0188b6954bd42160cbb1e9445e08c7c9c0ae3 (diff)
downloadframeworks_base-827e0facfefd0c0033dcfb1747b4fa6f80f9e0e2.zip
frameworks_base-827e0facfefd0c0033dcfb1747b4fa6f80f9e0e2.tar.gz
frameworks_base-827e0facfefd0c0033dcfb1747b4fa6f80f9e0e2.tar.bz2
Make sure the app can draw a frame before unlocking
- The mechanism to stop windows drawing while window animator was animating was somehow flaky. It relied on the fact that the client would call relayout() whenever the animating state changed. This is mostly the case, but not for lockscreen animations. Instead, we now use a push model, where window manager tells the app that the state has changed. - In addition, it only stopped drawing if that window was animating, but then only resumed drawing after all windows have finished animating. Now, we do this per window, so we only stop drawing for windows that are currently animating. - We resume the top activity now at the very beginning of the unlocking sequence. This gives the app a chance to draw a frame before the user sees anything. If it's to slow, then we just use the outdated framebuffer. Bug: 19964562 Change-Id: Ifef8abd189a3146d854b81b9b948861e4d38c155
Diffstat (limited to 'core/java/android/app/ActivityManagerNative.java')
-rw-r--r--core/java/android/app/ActivityManagerNative.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index a71a258..1e9bc54 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -2069,6 +2069,13 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
return true;
}
+ case KEYGUARD_GOING_AWAY_TRANSACTION: {
+ data.enforceInterface(IActivityManager.descriptor);
+ keyguardGoingAway(data.readInt() != 0, data.readInt() != 0);
+ reply.writeNoException();
+ return true;
+ }
+
case SHOULD_UP_RECREATE_TASK_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
IBinder token = data.readStrongBinder();
@@ -5179,6 +5186,19 @@ class ActivityManagerProxy implements IActivityManager
reply.recycle();
}
+ public void keyguardGoingAway(boolean disableWindowAnimations,
+ boolean keyguardGoingToNotificationShade) throws RemoteException {
+ Parcel data = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ data.writeInterfaceToken(IActivityManager.descriptor);
+ data.writeInt(disableWindowAnimations ? 1 : 0);
+ data.writeInt(keyguardGoingToNotificationShade ? 1 : 0);
+ mRemote.transact(KEYGUARD_GOING_AWAY_TRANSACTION, data, reply, 0);
+ reply.readException();
+ data.recycle();
+ reply.recycle();
+ }
+
public boolean shouldUpRecreateTask(IBinder token, String destAffinity)
throws RemoteException {
Parcel data = Parcel.obtain();