Skip to content

Commit 6ed3fca

Browse files
committed
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
1 parent 7a73344 commit 6ed3fca

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

policy/src/com/android/internal/policy/impl/keyguard/KeyguardActivityLauncher.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,19 @@ public void launchActivity(final Intent intent,
151151
boolean useDefaultAnimations,
152152
final Handler worker,
153153
final Runnable onStarted) {
154+
154155
final Context context = getContext();
155156
final Bundle animation = useDefaultAnimations ? null
156157
: ActivityOptions.makeCustomAnimation(context, 0, 0).toBundle();
158+
launchActivityWithAnimation(intent, showsWhileLocked, animation, worker, onStarted);
159+
}
160+
161+
public void launchActivityWithAnimation(final Intent intent,
162+
boolean showsWhileLocked,
163+
final Bundle animation,
164+
final Handler worker,
165+
final Runnable onStarted) {
166+
157167
LockPatternUtils lockPatternUtils = getLockPatternUtils();
158168
intent.addFlags(
159169
Intent.FLAG_ACTIVITY_NEW_TASK

policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,19 +1497,8 @@ public void showAssistant() {
14971497
getHandler(), null);
14981498

14991499
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
1500-
setOnDismissAction(new OnDismissAction() {
1501-
@Override
1502-
public boolean onDismiss() {
1503-
try {
1504-
mContext.startActivityAsUser(intent, opts.toBundle(),
1505-
new UserHandle(UserHandle.USER_CURRENT));
1506-
} catch (ActivityNotFoundException e) {
1507-
Slog.w(TAG, "Activity not found for " + intent.getAction());
1508-
}
1509-
return false;
1510-
}
1511-
});
15121500

1513-
mViewStateManager.showBouncer(true);
1501+
mActivityLauncher.launchActivityWithAnimation(
1502+
intent, false, opts.toBundle(), null, null);
15141503
}
15151504
}

0 commit comments

Comments
 (0)