diff options
author | Daniel Sandler <dsandler@android.com> | 2012-11-08 09:58:27 -0500 |
---|---|---|
committer | Daniel Sandler <dsandler@android.com> | 2012-11-08 12:13:17 -0500 |
commit | 6ed3fcafdbdeda9a10a62bbd0e5997017e8e2635 (patch) | |
tree | 1dfc89c5ca13fca050059490c6a44f1dd96dc9dc | |
parent | 7a73344bbe1636fd01a8b551b0b539168a9a9987 (diff) | |
download | base-6ed3fcafdbdeda9a10a62bbd0e5997017e8e2635.tar.gz |
Only show the bouncer for the assistant if secure.
We do this by using the helpful tools in
KeyguardActivityLauncher which do all the right callbacks
and stuff.
(This assumes the assist gesture is sufficiently hard to
false that we don't need the extra step of bouncing the
glowpad unlock affordance.)
Bug: 7500637
Change-Id: Id68cb85cdfd741f43a5bce69118ec4209125d785
-rw-r--r-- | policy/src/com/android/internal/policy/impl/keyguard/KeyguardActivityLauncher.java | 10 | ||||
-rw-r--r-- | policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java | 15 |
2 files changed, 12 insertions, 13 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardActivityLauncher.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardActivityLauncher.java index dbb357710850..cec91d39b96e 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardActivityLauncher.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardActivityLauncher.java @@ -151,9 +151,19 @@ public abstract class KeyguardActivityLauncher { boolean useDefaultAnimations, final Handler worker, final Runnable onStarted) { + final Context context = getContext(); final Bundle animation = useDefaultAnimations ? null : ActivityOptions.makeCustomAnimation(context, 0, 0).toBundle(); + launchActivityWithAnimation(intent, showsWhileLocked, animation, worker, onStarted); + } + + public void launchActivityWithAnimation(final Intent intent, + boolean showsWhileLocked, + final Bundle animation, + final Handler worker, + final Runnable onStarted) { + LockPatternUtils lockPatternUtils = getLockPatternUtils(); intent.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java index 5b9eb8672812..478f07071a86 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java @@ -1497,19 +1497,8 @@ public class KeyguardHostView extends KeyguardViewBase { getHandler(), null); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - setOnDismissAction(new OnDismissAction() { - @Override - public boolean onDismiss() { - try { - mContext.startActivityAsUser(intent, opts.toBundle(), - new UserHandle(UserHandle.USER_CURRENT)); - } catch (ActivityNotFoundException e) { - Slog.w(TAG, "Activity not found for " + intent.getAction()); - } - return false; - } - }); - mViewStateManager.showBouncer(true); + mActivityLauncher.launchActivityWithAnimation( + intent, false, opts.toBundle(), null, null); } } |