Merge changes I7070326d,I8346e53c

am: 546073a5b6

Change-Id: I4ca0a1ebf9240d81dbbf966fd2ceae3c2bd39a2c
This commit is contained in:
Janis Danisevskis
2018-10-11 13:36:49 -07:00
committed by android-build-merger
2 changed files with 20 additions and 4 deletions

4
keystore/OWNERS Normal file
View File

@@ -0,0 +1,4 @@
jbires@google.com
jdanis@google.com
robbarnes@google.com
swillden@google.com

View File

@@ -95,10 +95,22 @@ public class KeyguardStateMonitor extends IKeyguardStateCallback.Stub {
mIsShowing = showing;
mCallback.onShowingChanged();
try {
mKeystoreService.onKeyguardVisibilityChanged(showing, mCurrentUserId);
} catch (RemoteException e) {
Slog.e(TAG, "Error informing keystore of screen lock", e);
int retry = 2;
while (retry > 0) {
try {
mKeystoreService.onKeyguardVisibilityChanged(showing, mCurrentUserId);
break;
} catch (RemoteException e) {
if (retry == 2) {
Slog.w(TAG, "Error informing keystore of screen lock. Keystore may have died"
+ " -> refreshing service token and retrying");
mKeystoreService = IKeystoreService.Stub.asInterface(ServiceManager
.getService("android.security.keystore"));
} else {
Slog.e(TAG, "Error informing keystore of screen lock after retrying once", e);
}
--retry;
}
}
}