Skip to content

Commit 4eada64

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "Only show the bouncer for the assistant if secure." into jb-mr1-lockscreen-dev
2 parents 14adfe4 + 6ed3fca commit 4eada64

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
@@ -1501,19 +1501,8 @@ public void showAssistant() {
15011501
getHandler(), null);
15021502

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

1517-
mViewStateManager.showBouncer(true);
1505+
mActivityLauncher.launchActivityWithAnimation(
1506+
intent, false, opts.toBundle(), null, null);
15181507
}
15191508
}

0 commit comments

Comments
 (0)