Merge "Change KeyguardUpdateMonitorLogger to accept nullable params" into tm-qpr-dev

This commit is contained in:
TreeHugger Robot
2022-10-24 13:54:51 +00:00
committed by Android (Google) Code Review
2 changed files with 13 additions and 13 deletions

View File

@@ -2429,7 +2429,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
* Attempts to trigger active unlock from trust agent. * Attempts to trigger active unlock from trust agent.
*/ */
private void requestActiveUnlock( private void requestActiveUnlock(
ActiveUnlockConfig.ACTIVE_UNLOCK_REQUEST_ORIGIN requestOrigin, @NonNull ActiveUnlockConfig.ACTIVE_UNLOCK_REQUEST_ORIGIN requestOrigin,
String reason, String reason,
boolean dismissKeyguard boolean dismissKeyguard
) { ) {
@@ -2459,7 +2459,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
* Only dismisses the keyguard under certain conditions. * Only dismisses the keyguard under certain conditions.
*/ */
public void requestActiveUnlock( public void requestActiveUnlock(
ActiveUnlockConfig.ACTIVE_UNLOCK_REQUEST_ORIGIN requestOrigin, @NonNull ActiveUnlockConfig.ACTIVE_UNLOCK_REQUEST_ORIGIN requestOrigin,
String extraReason String extraReason
) { ) {
final boolean canFaceBypass = isFaceEnrolled() && mKeyguardBypassController != null final boolean canFaceBypass = isFaceEnrolled() && mKeyguardBypassController != null
@@ -2726,7 +2726,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
return shouldListen; return shouldListen;
} }
private void maybeLogListenerModelData(KeyguardListenModel model) { private void maybeLogListenerModelData(@NonNull KeyguardListenModel model) {
mLogger.logKeyguardListenerModel(model); mLogger.logKeyguardListenerModel(model);
if (model instanceof KeyguardActiveUnlockModel) { if (model instanceof KeyguardActiveUnlockModel) {

View File

@@ -51,7 +51,7 @@ class KeyguardUpdateMonitorLogger @Inject constructor(
fun log(@CompileTimeConstant msg: String, level: LogLevel) = logBuffer.log(TAG, level, msg) fun log(@CompileTimeConstant msg: String, level: LogLevel) = logBuffer.log(TAG, level, msg)
fun logActiveUnlockTriggered(reason: String) { fun logActiveUnlockTriggered(reason: String?) {
logBuffer.log("ActiveUnlock", DEBUG, logBuffer.log("ActiveUnlock", DEBUG,
{ str1 = reason }, { str1 = reason },
{ "initiate active unlock triggerReason=$str1" }) { "initiate active unlock triggerReason=$str1" })
@@ -101,14 +101,14 @@ class KeyguardUpdateMonitorLogger @Inject constructor(
{ "Face authenticated for wrong user: $int1" }) { "Face authenticated for wrong user: $int1" })
} }
fun logFaceAuthHelpMsg(msgId: Int, helpMsg: String) { fun logFaceAuthHelpMsg(msgId: Int, helpMsg: String?) {
logBuffer.log(TAG, DEBUG, { logBuffer.log(TAG, DEBUG, {
int1 = msgId int1 = msgId
str1 = helpMsg str1 = helpMsg
}, { "Face help received, msgId: $int1 msg: $str1" }) }, { "Face help received, msgId: $int1 msg: $str1" })
} }
fun logFaceAuthRequested(userInitiatedRequest: Boolean, reason: String) { fun logFaceAuthRequested(userInitiatedRequest: Boolean, reason: String?) {
logBuffer.log(TAG, DEBUG, { logBuffer.log(TAG, DEBUG, {
bool1 = userInitiatedRequest bool1 = userInitiatedRequest
str1 = reason str1 = reason
@@ -187,7 +187,7 @@ class KeyguardUpdateMonitorLogger @Inject constructor(
{ "No Profile Owner or Device Owner supervision app found for User $int1" }) { "No Profile Owner or Device Owner supervision app found for User $int1" })
} }
fun logPhoneStateChanged(newState: String) { fun logPhoneStateChanged(newState: String?) {
logBuffer.log(TAG, DEBUG, logBuffer.log(TAG, DEBUG,
{ str1 = newState }, { str1 = newState },
{ "handlePhoneStateChanged($str1)" }) { "handlePhoneStateChanged($str1)" })
@@ -240,7 +240,7 @@ class KeyguardUpdateMonitorLogger @Inject constructor(
}, { "handleServiceStateChange(subId=$int1, serviceState=$str1)" }) }, { "handleServiceStateChange(subId=$int1, serviceState=$str1)" })
} }
fun logServiceStateIntent(action: String, serviceState: ServiceState?, subId: Int) { fun logServiceStateIntent(action: String?, serviceState: ServiceState?, subId: Int) {
logBuffer.log(TAG, VERBOSE, { logBuffer.log(TAG, VERBOSE, {
str1 = action str1 = action
str2 = "$serviceState" str2 = "$serviceState"
@@ -256,7 +256,7 @@ class KeyguardUpdateMonitorLogger @Inject constructor(
}, { "handleSimStateChange(subId=$int1, slotId=$int2, state=$long1)" }) }, { "handleSimStateChange(subId=$int1, slotId=$int2, state=$long1)" })
} }
fun logSimStateFromIntent(action: String, extraSimState: String, slotId: Int, subId: Int) { fun logSimStateFromIntent(action: String?, extraSimState: String?, slotId: Int, subId: Int) {
logBuffer.log(TAG, VERBOSE, { logBuffer.log(TAG, VERBOSE, {
str1 = action str1 = action
str2 = extraSimState str2 = extraSimState
@@ -289,7 +289,7 @@ class KeyguardUpdateMonitorLogger @Inject constructor(
{ "SubInfo:$str1" }) { "SubInfo:$str1" })
} }
fun logTimeFormatChanged(newTimeFormat: String) { fun logTimeFormatChanged(newTimeFormat: String?) {
logBuffer.log(TAG, DEBUG, logBuffer.log(TAG, DEBUG,
{ str1 = newTimeFormat }, { str1 = newTimeFormat },
{ "handleTimeFormatUpdate timeFormat=$str1" }) { "handleTimeFormatUpdate timeFormat=$str1" })
@@ -338,18 +338,18 @@ class KeyguardUpdateMonitorLogger @Inject constructor(
fun logUserRequestedUnlock( fun logUserRequestedUnlock(
requestOrigin: ActiveUnlockConfig.ACTIVE_UNLOCK_REQUEST_ORIGIN, requestOrigin: ActiveUnlockConfig.ACTIVE_UNLOCK_REQUEST_ORIGIN,
reason: String, reason: String?,
dismissKeyguard: Boolean dismissKeyguard: Boolean
) { ) {
logBuffer.log("ActiveUnlock", DEBUG, { logBuffer.log("ActiveUnlock", DEBUG, {
str1 = requestOrigin.name str1 = requestOrigin?.name
str2 = reason str2 = reason
bool1 = dismissKeyguard bool1 = dismissKeyguard
}, { "reportUserRequestedUnlock origin=$str1 reason=$str2 dismissKeyguard=$bool1" }) }, { "reportUserRequestedUnlock origin=$str1 reason=$str2 dismissKeyguard=$bool1" })
} }
fun logShowTrustGrantedMessage( fun logShowTrustGrantedMessage(
message: String message: String?
) { ) {
logBuffer.log(TAG, DEBUG, { logBuffer.log(TAG, DEBUG, {
str1 = message str1 = message