Merge "Don't start work challenge unless auto-cancel." into udc-dev
This commit is contained in:
@@ -304,10 +304,11 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
|
|||||||
ActivityManager.getService().resumeAppSwitches();
|
ActivityManager.getService().resumeAppSwitches();
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
}
|
}
|
||||||
// If we are launching a work activity and require to launch
|
// If the notification should be cancelled on click and we are launching a work activity in
|
||||||
// separate work challenge, we defer the activity action and cancel
|
// a locked profile with separate challenge, we defer the activity action and cancelling of
|
||||||
// notification until work challenge is unlocked.
|
// the notification until work challenge is unlocked. If the notification shouldn't be
|
||||||
if (isActivityIntent) {
|
// cancelled, the work challenge will be shown by ActivityManager if necessary anyway.
|
||||||
|
if (isActivityIntent && shouldAutoCancel(entry.getSbn())) {
|
||||||
final int userId = intent.getCreatorUserHandle().getIdentifier();
|
final int userId = intent.getCreatorUserHandle().getIdentifier();
|
||||||
if (mLockPatternUtils.isSeparateProfileChallengeEnabled(userId)
|
if (mLockPatternUtils.isSeparateProfileChallengeEnabled(userId)
|
||||||
&& mKeyguardManager.isDeviceLocked(userId)) {
|
&& mKeyguardManager.isDeviceLocked(userId)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user