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

Commit 6e91d799 authored by Felipe Leme's avatar Felipe Leme Committed by Android (Google) Code Review
Browse files

Merge "Minor improvements on DevicePolicyManagerService." into sc-dev

parents 1b529aa1 a9583ff9
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -79,16 +79,16 @@ public class CertificateMonitor {
            X509Certificate cert = parseCert(certBuffer);
            X509Certificate cert = parseCert(certBuffer);
            pemCert = Credentials.convertToPem(cert);
            pemCert = Credentials.convertToPem(cert);
        } catch (CertificateException | IOException ce) {
        } catch (CertificateException | IOException ce) {
            Slog.e(LOG_TAG, ce, "Problem converting cert");
            Slog.e(LOG_TAG, "Problem converting cert", ce);
            return null;
            return null;
        }
        }


        try (KeyChainConnection keyChainConnection = mInjector.keyChainBindAsUser(userHandle)) {
        try (KeyChainConnection keyChainConnection = mInjector.keyChainBindAsUser(userHandle)) {
            return keyChainConnection.getService().installCaCertificate(pemCert);
            return keyChainConnection.getService().installCaCertificate(pemCert);
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            Slog.e(LOG_TAG, e, "installCaCertsToKeyChain(): ");
            Slog.e(LOG_TAG, "installCaCertsToKeyChain(): ", e);
        } catch (InterruptedException e1) {
        } catch (InterruptedException e1) {
            Slog.w(LOG_TAG, e1, "installCaCertsToKeyChain(): ");
            Slog.w(LOG_TAG, "installCaCertsToKeyChain(): ", e1);
            Thread.currentThread().interrupt();
            Thread.currentThread().interrupt();
        }
        }
        return null;
        return null;
@@ -100,9 +100,9 @@ public class CertificateMonitor {
                keyChainConnection.getService().deleteCaCertificate(aliases[i]);
                keyChainConnection.getService().deleteCaCertificate(aliases[i]);
            }
            }
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            Slog.e(LOG_TAG, e, "from CaCertUninstaller: ");
            Slog.e(LOG_TAG, "from CaCertUninstaller: ", e);
        } catch (InterruptedException ie) {
        } catch (InterruptedException ie) {
            Slog.w(LOG_TAG, ie, "CaCertUninstaller: ");
            Slog.w(LOG_TAG, "CaCertUninstaller: ", ie);
            Thread.currentThread().interrupt();
            Thread.currentThread().interrupt();
        }
        }
    }
    }
+134 −160

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Original line Diff line number Diff line
@@ -207,7 +207,7 @@ public class RemoteBugreportManager {
            return true;
            return true;
        } catch (RemoteException re) {
        } catch (RemoteException re) {
            // should never happen
            // should never happen
            Slog.e(LOG_TAG, re, "Failed to make remote calls to start bugreportremote service");
            Slog.e(LOG_TAG, "Failed to make remote calls to start bugreportremote service", re);
            return false;
            return false;
        } finally {
        } finally {
            mInjector.binderRestoreCallingIdentity(callingIdentity);
            mInjector.binderRestoreCallingIdentity(callingIdentity);