Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +9 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,7 @@ import com.android.systemui.dump.DumpManager; import com.android.systemui.dump.DumpsysTableLogger; import com.android.systemui.keyguard.domain.interactor.FaceAuthenticationListener; import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteractor; import com.android.systemui.keyguard.shared.constants.TrustAgentUiEvent; import com.android.systemui.keyguard.shared.model.AcquiredAuthenticationStatus; import com.android.systemui.keyguard.shared.model.AuthenticationStatus; import com.android.systemui.keyguard.shared.model.DetectionStatus; Loading Loading @@ -537,6 +538,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mLogger.logTrustGrantedWithFlags(flags, newlyUnlocked, userId, message); if (userId == getCurrentUser()) { if (newlyUnlocked) { // if this callback is ever removed, this should then be logged in // TrustRepository mUiEventLogger.log( TrustAgentUiEvent.TRUST_AGENT_NEWLY_UNLOCKED, getKeyguardSessionId() ); } final TrustGrantFlags trustGrantFlags = new TrustGrantFlags(flags); for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); Loading packages/SystemUI/src/com/android/systemui/keyguard/shared/constants/TrustAgentUiEvent.kt 0 → 100644 +25 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.keyguard.shared.constants import com.android.internal.logging.UiEvent import com.android.internal.logging.UiEventLogger enum class TrustAgentUiEvent(private val metricId: Int) : UiEventLogger.UiEventEnum { @UiEvent(doc = "TrustAgent newly unlocked the device") TRUST_AGENT_NEWLY_UNLOCKED(1361); override fun getId() = metricId } Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +9 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,7 @@ import com.android.systemui.dump.DumpManager; import com.android.systemui.dump.DumpsysTableLogger; import com.android.systemui.keyguard.domain.interactor.FaceAuthenticationListener; import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteractor; import com.android.systemui.keyguard.shared.constants.TrustAgentUiEvent; import com.android.systemui.keyguard.shared.model.AcquiredAuthenticationStatus; import com.android.systemui.keyguard.shared.model.AuthenticationStatus; import com.android.systemui.keyguard.shared.model.DetectionStatus; Loading Loading @@ -537,6 +538,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mLogger.logTrustGrantedWithFlags(flags, newlyUnlocked, userId, message); if (userId == getCurrentUser()) { if (newlyUnlocked) { // if this callback is ever removed, this should then be logged in // TrustRepository mUiEventLogger.log( TrustAgentUiEvent.TRUST_AGENT_NEWLY_UNLOCKED, getKeyguardSessionId() ); } final TrustGrantFlags trustGrantFlags = new TrustGrantFlags(flags); for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); Loading
packages/SystemUI/src/com/android/systemui/keyguard/shared/constants/TrustAgentUiEvent.kt 0 → 100644 +25 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.keyguard.shared.constants import com.android.internal.logging.UiEvent import com.android.internal.logging.UiEventLogger enum class TrustAgentUiEvent(private val metricId: Int) : UiEventLogger.UiEventEnum { @UiEvent(doc = "TrustAgent newly unlocked the device") TRUST_AGENT_NEWLY_UNLOCKED(1361); override fun getId() = metricId }