OSDN Git Service

Should check isDeviceSecure in shouldConfirmCredentials
authorTony Mak <tonymak@google.com>
Tue, 17 May 2016 15:36:14 +0000 (16:36 +0100)
committerTony Mak <tonymak@google.com>
Wed, 18 May 2016 16:58:13 +0000 (16:58 +0000)
commitae13e18c5561537e062f46ddda8e5dff30d1fe26
treef4da0fba4dcdff9529b5296270f5d85a719764cd
parent048cabdbcbc262869a5b737a22ccddb5ef0d76f9
Should check isDeviceSecure in shouldConfirmCredentials

The NPE is because createConfirmDeviceCredentialIntent returns a null
intent when it founds that user does not set a secure lock.
So the fix is we should check is the user set a secure lock screen as well.

The reason the crash only happens in multi-window flow because
we have null checking in
the normal flow (i.e. interceptWithConfirmCredentialsIfNeeded).
But I think we better check it explicitly.

Bug: 28716456
Change-Id: Ib204cd02c0007bd1df36908bb3b5254ec4ffb914
services/core/java/com/android/server/am/ActivityStarter.java
services/core/java/com/android/server/am/UserController.java