Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de3a068a authored by Ricky Wai's avatar Ricky Wai
Browse files

Do not show exception stack trace when no child profile key

Bug: 28396912
Change-Id: I48e3f3223d04a0ba3dd2d975901b0504ce0dd25f
parent ecd73f48
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -896,16 +896,14 @@ 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);
            }
            }
        } else {
            if (currentHandle == null) {
                if (savedCredential != null) {