summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2016-02-15 18:58:24 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-02-16 13:45:50 -0800
commitb3551e0b0b72939af0f11912a5d13ab98a5a1d78 (patch)
tree1d18a8dd14f7e9971316cafad21a36682e2469b0 /packages/SystemUI/src
parent32bcedfcf42a7e145abe44528ada47c4151eb570 (diff)
downloadframeworks_base-b3551e0b0b72939af0f11912a5d13ab98a5a1d78.zip
frameworks_base-b3551e0b0b72939af0f11912a5d13ab98a5a1d78.tar.gz
frameworks_base-b3551e0b0b72939af0f11912a5d13ab98a5a1d78.tar.bz2
SysUI: Wait for keyguard gone before starting activity
Some apps, I'm looking at you Chrome, don't like to do any work if they are being started while the lock screen is shown, even if it is being dismissed. This patch adds another version of startActivityDismissingKeyguard() which takes an extra boolean parameter that allows to override the afterKeyguardGone behavior. Normally that is only true if the resolver will be shown instead of launching an app. Overriding this allows us to get the exact behavior we want without altering this behavior under normal circumstances. Change-Id: Ia804c7a5a73f2a4ad45593bcfcc192fedddf8d92 TICKET: CYNGNOS-2044
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java10
2 files changed, 10 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 7a6c872..9763982 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -1238,7 +1238,8 @@ public class NotificationPanelView extends PanelView implements
@Override
public void run() {
mStatusBar.showKeyguard();
- mStatusBar.startActivity(intent, true);
+ mStatusBar.startActivityDismissingKeyguard(intent, false, true, true,
+ null);
}
});
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 28afd3e..ee0789a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -3410,10 +3410,16 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
public void startActivityDismissingKeyguard(final Intent intent, boolean onlyProvisioned,
final boolean dismissShade, final Callback callback) {
- if (onlyProvisioned && !isDeviceProvisioned()) return;
-
final boolean afterKeyguardGone = PreviewInflater.wouldLaunchResolverActivity(
mContext, intent, mCurrentUserId);
+ startActivityDismissingKeyguard(intent, onlyProvisioned, dismissShade, afterKeyguardGone,
+ callback);
+ }
+
+ public void startActivityDismissingKeyguard(final Intent intent, boolean onlyProvisioned,
+ final boolean dismissShade, final boolean afterKeyguardGone, final Callback callback) {
+ if (onlyProvisioned && !isDeviceProvisioned()) return;
+
final boolean keyguardShowing = mStatusBarKeyguardViewManager.isShowing();
Runnable runnable = new Runnable() {
public void run() {