Loading services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java +39 −14 Original line number Diff line number Diff line Loading @@ -77,7 +77,6 @@ import java.util.NoSuchElementException; import java.util.Objects; import java.util.Set; /** * A class that manages a user's synthetic password (SP) ({@link #SyntheticPassword}), along with a * set of SP protectors that are independent ways that the SP is protected. Loading Loading @@ -552,11 +551,40 @@ class SyntheticPasswordManager { } } private @Nullable IWeaver getWeaverServiceInternal() { // Try to get the AIDL service first private @Nullable IWeaver getWeaverAidlService() { final IWeaver aidlWeaver; try { IWeaver aidlWeaver = IWeaver.Stub.asInterface( aidlWeaver = IWeaver.Stub.asInterface( ServiceManager.waitForDeclaredService(IWeaver.DESCRIPTOR + "/default")); } catch (SecurityException e) { Slog.w(TAG, "Does not have permissions to get AIDL weaver service"); return null; } if (aidlWeaver == null) { return null; } final int aidlVersion; try { aidlVersion = aidlWeaver.getInterfaceVersion(); } catch (RemoteException e) { Slog.e(TAG, "Cannot get AIDL weaver service version", e); return null; } if (aidlVersion < 2) { Slog.w(TAG, "Ignoring AIDL weaver service v" + aidlVersion + " because only v2 and later are supported"); return null; } Slog.i(TAG, "Found AIDL weaver service v" + aidlVersion); return aidlWeaver; } private @Nullable IWeaver getWeaverServiceInternal() { // Try to get the AIDL service first IWeaver aidlWeaver = getWeaverAidlService(); if (aidlWeaver != null) { Slog.i(TAG, "Using AIDL weaver service"); try { Loading @@ -566,9 +594,6 @@ class SyntheticPasswordManager { } return aidlWeaver; } } catch (SecurityException e) { Slog.w(TAG, "Does not have permissions to get AIDL weaver service"); } // If the AIDL service can't be found, look for the HIDL service try { Loading Loading
services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java +39 −14 Original line number Diff line number Diff line Loading @@ -77,7 +77,6 @@ import java.util.NoSuchElementException; import java.util.Objects; import java.util.Set; /** * A class that manages a user's synthetic password (SP) ({@link #SyntheticPassword}), along with a * set of SP protectors that are independent ways that the SP is protected. Loading Loading @@ -552,11 +551,40 @@ class SyntheticPasswordManager { } } private @Nullable IWeaver getWeaverServiceInternal() { // Try to get the AIDL service first private @Nullable IWeaver getWeaverAidlService() { final IWeaver aidlWeaver; try { IWeaver aidlWeaver = IWeaver.Stub.asInterface( aidlWeaver = IWeaver.Stub.asInterface( ServiceManager.waitForDeclaredService(IWeaver.DESCRIPTOR + "/default")); } catch (SecurityException e) { Slog.w(TAG, "Does not have permissions to get AIDL weaver service"); return null; } if (aidlWeaver == null) { return null; } final int aidlVersion; try { aidlVersion = aidlWeaver.getInterfaceVersion(); } catch (RemoteException e) { Slog.e(TAG, "Cannot get AIDL weaver service version", e); return null; } if (aidlVersion < 2) { Slog.w(TAG, "Ignoring AIDL weaver service v" + aidlVersion + " because only v2 and later are supported"); return null; } Slog.i(TAG, "Found AIDL weaver service v" + aidlVersion); return aidlWeaver; } private @Nullable IWeaver getWeaverServiceInternal() { // Try to get the AIDL service first IWeaver aidlWeaver = getWeaverAidlService(); if (aidlWeaver != null) { Slog.i(TAG, "Using AIDL weaver service"); try { Loading @@ -566,9 +594,6 @@ class SyntheticPasswordManager { } return aidlWeaver; } } catch (SecurityException e) { Slog.w(TAG, "Does not have permissions to get AIDL weaver service"); } // If the AIDL service can't be found, look for the HIDL service try { Loading