diff options
author | Jorim Jaggi <jjaggi@google.com> | 2014-08-11 22:36:20 +0200 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2014-08-12 22:47:52 +0000 |
commit | 8de4311c51229efbe2f2d0afbf298982c5cadd96 (patch) | |
tree | 93189443fcf95e9014b67eb5f037d83baeef67c2 /packages/SystemUI/src/com/android/systemui/power | |
parent | 125cf62d596f544db4cb7b314f94c2757f5afaa7 (diff) | |
download | frameworks_base-8de4311c51229efbe2f2d0afbf298982c5cadd96.zip frameworks_base-8de4311c51229efbe2f2d0afbf298982c5cadd96.tar.gz frameworks_base-8de4311c51229efbe2f2d0afbf298982c5cadd96.tar.bz2 |
Lockscreen launch animations
- Get rid of ActivityManager.dismissKeyguardOnNextActivity, which was
used for two different things: Dismiss keyguard from somewhere else
(not really necessary anymore), wait to actually dismiss keyguard
after the window behind is drawn. Instead, introduce
keyguardWaitingForActivityDrawn(), and change the semantics where
necessary.
- Make wallpaper_close_enter consistent with task_open_enter and the
Keyguard launch animation.
- Close the panel even on lockscreen when launching a notification.
- Block notification shade updates during the collapsing motion so
notification don't play the disappear animation immediately after
having launched a notification.
Bug: 15991916
Change-Id: I133c177b84e926c87c1a404ba93d633593fec3ab
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/power')
3 files changed, 10 insertions, 13 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerDialogWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerDialogWarnings.java index 79fadbd..8420dc0 100644 --- a/packages/SystemUI/src/com/android/systemui/power/PowerDialogWarnings.java +++ b/packages/SystemUI/src/com/android/systemui/power/PowerDialogWarnings.java @@ -16,7 +16,6 @@ package com.android.systemui.power; -import android.app.ActivityManagerNative; import android.app.AlertDialog; import android.content.ContentResolver; import android.content.Context; @@ -26,15 +25,14 @@ import android.media.AudioManager; import android.media.Ringtone; import android.media.RingtoneManager; import android.net.Uri; -import android.os.RemoteException; import android.os.SystemClock; -import android.os.UserHandle; import android.provider.Settings; import android.util.Slog; import android.view.ContextThemeWrapper; import android.view.WindowManager; import com.android.systemui.R; +import com.android.systemui.statusbar.phone.PhoneStatusBar; import java.io.PrintWriter; @@ -43,6 +41,7 @@ public class PowerDialogWarnings implements PowerUI.WarningsUI { private static final boolean DEBUG = PowerUI.DEBUG; private final Context mContext; + private final PhoneStatusBar mPhoneStatusBar; private int mBatteryLevel; private int mBucket; @@ -52,8 +51,9 @@ public class PowerDialogWarnings implements PowerUI.WarningsUI { private AlertDialog mInvalidChargerDialog; private AlertDialog mLowBatteryDialog; - public PowerDialogWarnings(Context context) { + public PowerDialogWarnings(Context context, PhoneStatusBar phoneStatusBar) { mContext = new ContextThemeWrapper(context, android.R.style.Theme_DeviceDefault_Light); + mPhoneStatusBar = phoneStatusBar; } @Override @@ -121,12 +121,7 @@ public class PowerDialogWarnings implements PowerUI.WarningsUI { new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { - try { - ActivityManagerNative.getDefault().dismissKeyguardOnNextActivity(); - } catch (RemoteException e) { - // we tried - } - mContext.startActivityAsUser(intent, UserHandle.CURRENT); + mPhoneStatusBar.startActivity(intent, true /* dismissShade */); dismissLowBatteryWarning(); } }); diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java index dd923e3..d455cec 100644 --- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java +++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java @@ -38,6 +38,7 @@ import android.util.Slog; import android.view.View; import com.android.systemui.R; +import com.android.systemui.statusbar.phone.PhoneStatusBar; import com.android.systemui.statusbar.phone.SystemUIDialog; import java.io.PrintWriter; @@ -93,10 +94,10 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { private boolean mInvalidCharger; private SystemUIDialog mSaverConfirmation; - public PowerNotificationWarnings(Context context) { + public PowerNotificationWarnings(Context context, PhoneStatusBar phoneStatusBar) { mContext = context; mNoMan = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); - mFallbackDialogs = new PowerDialogWarnings(context); + mFallbackDialogs = new PowerDialogWarnings(context, phoneStatusBar); mReceiver.init(); } diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java index ccef8eb..d3c7dee 100644 --- a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java +++ b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java @@ -32,6 +32,7 @@ import android.util.Log; import android.util.Slog; import com.android.systemui.SystemUI; +import com.android.systemui.statusbar.phone.PhoneStatusBar; import java.io.FileDescriptor; import java.io.PrintWriter; @@ -59,7 +60,7 @@ public class PowerUI extends SystemUI { public void start() { mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); mScreenOffTime = mPowerManager.isScreenOn() ? -1 : SystemClock.elapsedRealtime(); - mWarnings = new PowerNotificationWarnings(mContext); + mWarnings = new PowerNotificationWarnings(mContext, getComponent(PhoneStatusBar.class)); ContentObserver obs = new ContentObserver(mHandler) { @Override |