Do not show exception stack trace when no child profile key

Bug: 28396912
Change-Id: I48e3f3223d04a0ba3dd2d975901b0504ce0dd25f
This commit is contained in:
Ricky Wai
2016-05-03 14:50:03 +01:00
parent ecd73f48fe
commit de3a068af6

View File

@@ -896,15 +896,13 @@ public class LockSettingsService extends ILockSettings.Stub {
// get credential from keystore when managed profile has unified lock
try {
savedCredential = getDecryptedPasswordForTiedProfile(userId);
} catch (FileNotFoundException e) {
Slog.i(TAG, "Child profile key not found");
} catch (UnrecoverableKeyException | InvalidKeyException | KeyStoreException
| NoSuchAlgorithmException | NoSuchPaddingException
| InvalidAlgorithmParameterException | IllegalBlockSizeException
| BadPaddingException | CertificateException | IOException e) {
if (e instanceof FileNotFoundException) {
Slog.i(TAG, "Child profile key not found");
} else {
Slog.e(TAG, "Failed to decrypt child profile key", e);
}
Slog.e(TAG, "Failed to decrypt child profile key", e);
}
} else {
if (currentHandle == null) {