Loading core/java/android/hardware/fingerprint/FingerprintManager.java +20 −0 Original line number Original line Diff line number Diff line Loading @@ -668,6 +668,25 @@ public class FingerprintManager { return 0; return 0; } } /** * Reset the lockout timer when asked to do so by keyguard. * * @param token an opaque token returned by password confirmation. * * @hide */ public void resetTimeout(byte[] token) { if (mService != null) { try { mService.resetTimeout(token); } catch (RemoteException e) { Log.v(TAG, "Remote exception in getAuthenticatorId(): ", e); } } else { Log.w(TAG, "getAuthenticatorId(): Service not connected!"); } } private class MyHandler extends Handler { private class MyHandler extends Handler { private MyHandler(Context context) { private MyHandler(Context context) { super(context.getMainLooper()); super(context.getMainLooper()); Loading @@ -677,6 +696,7 @@ public class FingerprintManager { super(looper); super(looper); } } @Override public void handleMessage(android.os.Message msg) { public void handleMessage(android.os.Message msg) { switch(msg.what) { switch(msg.what) { case MSG_ENROLL_RESULT: case MSG_ENROLL_RESULT: Loading core/java/android/hardware/fingerprint/IFingerprintService.aidl +3 −0 Original line number Original line Diff line number Diff line Loading @@ -68,4 +68,7 @@ interface IFingerprintService { // Gets the authenticator ID for fingerprint // Gets the authenticator ID for fingerprint long getAuthenticatorId(String opPackageName); long getAuthenticatorId(String opPackageName); // Reset the timeout when user authenticates with strong auth (e.g. PIN, pattern or password) void resetTimeout(in byte [] cryptoToken); } } core/res/AndroidManifest.xml +4 −0 Original line number Original line Diff line number Diff line Loading @@ -2472,6 +2472,10 @@ <permission android:name="android.permission.MANAGE_FINGERPRINT" <permission android:name="android.permission.MANAGE_FINGERPRINT" android:protectionLevel="system|signature" /> android:protectionLevel="system|signature" /> <!-- Allows an app to reset fingerprint attempt counter. Reserved for the system. @hide --> <permission android:name="android.permission.RESET_FINGERPRINT_LOCKOUT" android:protectionLevel="signature" /> <!-- Allows an application to control keyguard. Only allowed for system processes. <!-- Allows an application to control keyguard. Only allowed for system processes. @hide --> @hide --> <permission android:name="android.permission.CONTROL_KEYGUARD" <permission android:name="android.permission.CONTROL_KEYGUARD" Loading packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -578,6 +578,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { public void reportSuccessfulStrongAuthUnlockAttempt() { public void reportSuccessfulStrongAuthUnlockAttempt() { mStrongAuthTimedOut.remove(sCurrentUser); mStrongAuthTimedOut.remove(sCurrentUser); scheduleStrongAuthTimeout(); scheduleStrongAuthTimeout(); if (mFpm != null) { byte[] token = null; /* TODO: pass real auth token once fp HAL supports it */ mFpm.resetTimeout(token); } } } private void scheduleStrongAuthTimeout() { private void scheduleStrongAuthTimeout() { Loading packages/SystemUI/AndroidManifest.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -108,6 +108,7 @@ <uses-permission android:name="android.permission.ACCESS_KEYGUARD_SECURE_STORAGE" /> <uses-permission android:name="android.permission.ACCESS_KEYGUARD_SECURE_STORAGE" /> <uses-permission android:name="android.permission.TRUST_LISTENER" /> <uses-permission android:name="android.permission.TRUST_LISTENER" /> <uses-permission android:name="android.permission.USE_FINGERPRINT" /> <uses-permission android:name="android.permission.USE_FINGERPRINT" /> <uses-permission android:name="android.permission.RESET_FINGERPRINT_LOCKOUT" /> <!-- Needed for WallpaperManager.clear in ImageWallpaper.updateWallpaperLocked --> <!-- Needed for WallpaperManager.clear in ImageWallpaper.updateWallpaperLocked --> <uses-permission android:name="android.permission.SET_WALLPAPER"/> <uses-permission android:name="android.permission.SET_WALLPAPER"/> Loading Loading
core/java/android/hardware/fingerprint/FingerprintManager.java +20 −0 Original line number Original line Diff line number Diff line Loading @@ -668,6 +668,25 @@ public class FingerprintManager { return 0; return 0; } } /** * Reset the lockout timer when asked to do so by keyguard. * * @param token an opaque token returned by password confirmation. * * @hide */ public void resetTimeout(byte[] token) { if (mService != null) { try { mService.resetTimeout(token); } catch (RemoteException e) { Log.v(TAG, "Remote exception in getAuthenticatorId(): ", e); } } else { Log.w(TAG, "getAuthenticatorId(): Service not connected!"); } } private class MyHandler extends Handler { private class MyHandler extends Handler { private MyHandler(Context context) { private MyHandler(Context context) { super(context.getMainLooper()); super(context.getMainLooper()); Loading @@ -677,6 +696,7 @@ public class FingerprintManager { super(looper); super(looper); } } @Override public void handleMessage(android.os.Message msg) { public void handleMessage(android.os.Message msg) { switch(msg.what) { switch(msg.what) { case MSG_ENROLL_RESULT: case MSG_ENROLL_RESULT: Loading
core/java/android/hardware/fingerprint/IFingerprintService.aidl +3 −0 Original line number Original line Diff line number Diff line Loading @@ -68,4 +68,7 @@ interface IFingerprintService { // Gets the authenticator ID for fingerprint // Gets the authenticator ID for fingerprint long getAuthenticatorId(String opPackageName); long getAuthenticatorId(String opPackageName); // Reset the timeout when user authenticates with strong auth (e.g. PIN, pattern or password) void resetTimeout(in byte [] cryptoToken); } }
core/res/AndroidManifest.xml +4 −0 Original line number Original line Diff line number Diff line Loading @@ -2472,6 +2472,10 @@ <permission android:name="android.permission.MANAGE_FINGERPRINT" <permission android:name="android.permission.MANAGE_FINGERPRINT" android:protectionLevel="system|signature" /> android:protectionLevel="system|signature" /> <!-- Allows an app to reset fingerprint attempt counter. Reserved for the system. @hide --> <permission android:name="android.permission.RESET_FINGERPRINT_LOCKOUT" android:protectionLevel="signature" /> <!-- Allows an application to control keyguard. Only allowed for system processes. <!-- Allows an application to control keyguard. Only allowed for system processes. @hide --> @hide --> <permission android:name="android.permission.CONTROL_KEYGUARD" <permission android:name="android.permission.CONTROL_KEYGUARD" Loading
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -578,6 +578,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { public void reportSuccessfulStrongAuthUnlockAttempt() { public void reportSuccessfulStrongAuthUnlockAttempt() { mStrongAuthTimedOut.remove(sCurrentUser); mStrongAuthTimedOut.remove(sCurrentUser); scheduleStrongAuthTimeout(); scheduleStrongAuthTimeout(); if (mFpm != null) { byte[] token = null; /* TODO: pass real auth token once fp HAL supports it */ mFpm.resetTimeout(token); } } } private void scheduleStrongAuthTimeout() { private void scheduleStrongAuthTimeout() { Loading
packages/SystemUI/AndroidManifest.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -108,6 +108,7 @@ <uses-permission android:name="android.permission.ACCESS_KEYGUARD_SECURE_STORAGE" /> <uses-permission android:name="android.permission.ACCESS_KEYGUARD_SECURE_STORAGE" /> <uses-permission android:name="android.permission.TRUST_LISTENER" /> <uses-permission android:name="android.permission.TRUST_LISTENER" /> <uses-permission android:name="android.permission.USE_FINGERPRINT" /> <uses-permission android:name="android.permission.USE_FINGERPRINT" /> <uses-permission android:name="android.permission.RESET_FINGERPRINT_LOCKOUT" /> <!-- Needed for WallpaperManager.clear in ImageWallpaper.updateWallpaperLocked --> <!-- Needed for WallpaperManager.clear in ImageWallpaper.updateWallpaperLocked --> <uses-permission android:name="android.permission.SET_WALLPAPER"/> <uses-permission android:name="android.permission.SET_WALLPAPER"/> Loading