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

Commit a1f33163 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Add additional logging to internalCleanup

Bug: 179668157
Test: presubmit
Change-Id: Ic5cd28b295f8dcf678c0c135aea53884ea60548a
parent 3919f6d2
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -69,6 +69,8 @@ public abstract class InternalCleanupClient<S extends BiometricAuthenticator.Ide
            final List<BiometricAuthenticator.Identifier> unknownHALTemplates =
            final List<BiometricAuthenticator.Identifier> unknownHALTemplates =
                    ((InternalEnumerateClient<T>) mCurrentTask).getUnknownHALTemplates();
                    ((InternalEnumerateClient<T>) mCurrentTask).getUnknownHALTemplates();


            Slog.d(TAG, "Enumerate onClientFinished: " + clientMonitor + ", success: " + success);

            if (!unknownHALTemplates.isEmpty()) {
            if (!unknownHALTemplates.isEmpty()) {
                Slog.w(TAG, "Adding " + unknownHALTemplates.size() + " templates for deletion");
                Slog.w(TAG, "Adding " + unknownHALTemplates.size() + " templates for deletion");
            }
            }
@@ -90,6 +92,7 @@ public abstract class InternalCleanupClient<S extends BiometricAuthenticator.Ide
    private final Callback mRemoveCallback = new Callback() {
    private final Callback mRemoveCallback = new Callback() {
        @Override
        @Override
        public void onClientFinished(@NonNull BaseClientMonitor clientMonitor, boolean success) {
        public void onClientFinished(@NonNull BaseClientMonitor clientMonitor, boolean success) {
            Slog.d(TAG, "Remove onClientFinished: " + clientMonitor + ", success: " + success);
            mCallback.onClientFinished(InternalCleanupClient.this, success);
            mCallback.onClientFinished(InternalCleanupClient.this, success);
        }
        }
    };
    };
@@ -115,6 +118,8 @@ public abstract class InternalCleanupClient<S extends BiometricAuthenticator.Ide
    }
    }


    private void startCleanupUnknownHalTemplates() {
    private void startCleanupUnknownHalTemplates() {
        Slog.d(TAG, "startCleanupUnknownHalTemplates, size: " + mUnknownHALTemplates.size());

        UserTemplate template = mUnknownHALTemplates.get(0);
        UserTemplate template = mUnknownHALTemplates.get(0);
        mUnknownHALTemplates.remove(template);
        mUnknownHALTemplates.remove(template);
        mCurrentTask = getRemovalClient(getContext(), mLazyDaemon, getToken(),
        mCurrentTask = getRemovalClient(getContext(), mLazyDaemon, getToken(),
@@ -138,6 +143,8 @@ public abstract class InternalCleanupClient<S extends BiometricAuthenticator.Ide
        // Start enumeration. Removal will start if necessary, when enumeration is completed.
        // Start enumeration. Removal will start if necessary, when enumeration is completed.
        mCurrentTask = getEnumerateClient(getContext(), mLazyDaemon, getToken(), getTargetUserId(),
        mCurrentTask = getEnumerateClient(getContext(), mLazyDaemon, getToken(), getTargetUserId(),
                getOwnerString(), mEnrolledList, mBiometricUtils, getSensorId());
                getOwnerString(), mEnrolledList, mBiometricUtils, getSensorId());

        Slog.d(TAG, "Starting enumerate: " + mCurrentTask);
        mCurrentTask.start(mEnumerateCallback);
        mCurrentTask.start(mEnumerateCallback);
    }
    }


@@ -165,6 +172,7 @@ public abstract class InternalCleanupClient<S extends BiometricAuthenticator.Ide
                    + mCurrentTask.getClass().getSimpleName());
                    + mCurrentTask.getClass().getSimpleName());
            return;
            return;
        }
        }
        Slog.d(TAG, "onEnumerated, remaining: " + remaining);
        ((EnumerateConsumer) mCurrentTask).onEnumerationResult(identifier, remaining);
        ((EnumerateConsumer) mCurrentTask).onEnumerationResult(identifier, remaining);
    }
    }


+2 −0
Original line number Original line Diff line number Diff line
@@ -82,6 +82,7 @@ public abstract class InternalEnumerateClient<T> extends HalClientMonitor<T>


    private void handleEnumeratedTemplate(BiometricAuthenticator.Identifier identifier) {
    private void handleEnumeratedTemplate(BiometricAuthenticator.Identifier identifier) {
        if (identifier == null) {
        if (identifier == null) {
            Slog.d(TAG, "Null identifier");
            return;
            return;
        }
        }
        Slog.v(TAG, "handleEnumeratedTemplate: " + identifier.getBiometricId());
        Slog.v(TAG, "handleEnumeratedTemplate: " + identifier.getBiometricId());
@@ -103,6 +104,7 @@ public abstract class InternalEnumerateClient<T> extends HalClientMonitor<T>


    private void doTemplateCleanup() {
    private void doTemplateCleanup() {
        if (mEnrolledList == null) {
        if (mEnrolledList == null) {
            Slog.d(TAG, "Null enrolledList");
            return;
            return;
        }
        }