diff options
| author | Jorim Jaggi <jjaggi@google.com> | 2015-05-05 20:51:17 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-05 20:51:18 +0000 |
| commit | 5be4d295c08614eaf8afd012f90e5c7726bc293e (patch) | |
| tree | b7d340c271363c0ce777cb2b27d3ea0649d065d0 /core/java | |
| parent | d5304020b29762ce79d66c1ed3028b0ee30c68ad (diff) | |
| parent | 237b061182d36fd3bf2238092ccf3d529ec8877b (diff) | |
| download | frameworks_base-5be4d295c08614eaf8afd012f90e5c7726bc293e.zip frameworks_base-5be4d295c08614eaf8afd012f90e5c7726bc293e.tar.gz frameworks_base-5be4d295c08614eaf8afd012f90e5c7726bc293e.tar.bz2 | |
Merge "Only enable fingerprint auth after first regular auth" into mnc-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/trust/ITrustManager.aidl | 1 | ||||
| -rw-r--r-- | core/java/android/app/trust/TrustManager.java | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/app/trust/ITrustManager.aidl b/core/java/android/app/trust/ITrustManager.aidl index 17cff5c..32951d9 100644 --- a/core/java/android/app/trust/ITrustManager.aidl +++ b/core/java/android/app/trust/ITrustManager.aidl @@ -32,4 +32,5 @@ interface ITrustManager { void reportKeyguardShowingChanged(); boolean isDeviceLocked(int userId); boolean isDeviceSecure(int userId); + boolean hasUserAuthenticatedSinceBoot(int userId); } diff --git a/core/java/android/app/trust/TrustManager.java b/core/java/android/app/trust/TrustManager.java index b5c5317..8cab565 100644 --- a/core/java/android/app/trust/TrustManager.java +++ b/core/java/android/app/trust/TrustManager.java @@ -147,6 +147,23 @@ public class TrustManager { } } + /** + * Checks whether the specified user has been authenticated since the last boot. + * + * @param userId the user id of the user to check for + * @return true if the user has authenticated since boot, false otherwise + * + * Requires the {@link android.Manifest.permission#ACCESS_KEYGUARD_SECURE_STORAGE} permission. + */ + public boolean hasUserAuthenticatedSinceBoot(int userId) { + try { + return mService.hasUserAuthenticatedSinceBoot(userId); + } catch (RemoteException e) { + onError(e); + return false; + } + } + private void onError(Exception e) { Log.e(TAG, "Error while calling TrustManagerService", e); } |
