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

Commit ad578e9b authored by Eric Biggers's avatar Eric Biggers
Browse files

locksettings: clean up logging of cached GK password expiration

When a cached GK password expires, use a much clearer log message.
Also, don't log anything if the GK password was already explicitly
removed by LockSettingsService.removeGatekeeperPasswordHandle().

Bug: 268526331
Change-Id: I734c9115bd8ea0a44ed6c03754e87341848a00f5
Merged-In: I734c9115bd8ea0a44ed6c03754e87341848a00f5
(cherry picked from commit 070e3d6c)
parent 0889b6d8
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2728,9 +2728,12 @@ public class LockSettingsService extends ILockSettings.Stub {
        final long finalHandle = handle;
        mHandler.postDelayed(() -> {
            synchronized (mGatekeeperPasswords) {
                Slog.d(TAG, "Removing handle: " + finalHandle);
                if (mGatekeeperPasswords.get(finalHandle) != null) {
                    Slogf.d(TAG, "Cached Gatekeeper password with handle %016x has expired",
                            finalHandle);
                    mGatekeeperPasswords.remove(finalHandle);
                }
            }
        }, GK_PW_HANDLE_STORE_DURATION_MS);

        return handle;