Use FrameworkStatsLog instead of StatsLog
As part of statsd becoming a Mainline module in R, autogenerated StatsLog.write() calls are going away and replaced by *StatsLog.java that is autogenerated for each module. This CL replaces some usages of StatsLog with FrameworkStatsLog. Bug: 145952197 Test: m Change-Id: Ied4cad6550c99697003948a2639c74fba31f1fde
This commit is contained in:
@@ -60,12 +60,12 @@ import android.security.KeyStore;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Pair;
|
||||
import android.util.Slog;
|
||||
import android.util.StatsLog;
|
||||
|
||||
import com.android.internal.R;
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.internal.os.SomeArgs;
|
||||
import com.android.internal.statusbar.IStatusBarService;
|
||||
import com.android.internal.util.FrameworkStatsLog;
|
||||
import com.android.server.SystemService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -1142,17 +1142,17 @@ public class BiometricService extends SystemService {
|
||||
+ ", Client: " + BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT
|
||||
+ ", RequireConfirmation: "
|
||||
+ mCurrentAuthSession.mRequireConfirmation
|
||||
+ ", State: " + StatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED
|
||||
+ ", State: " + FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED
|
||||
+ ", Latency: " + latency);
|
||||
}
|
||||
|
||||
StatsLog.write(StatsLog.BIOMETRIC_AUTHENTICATED,
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.BIOMETRIC_AUTHENTICATED,
|
||||
statsModality(),
|
||||
mCurrentAuthSession.mUserId,
|
||||
mCurrentAuthSession.isCrypto(),
|
||||
BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
|
||||
mCurrentAuthSession.mRequireConfirmation,
|
||||
StatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED,
|
||||
FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED,
|
||||
latency,
|
||||
mInjector.isDebugEnabled(getContext(), mCurrentAuthSession.mUserId));
|
||||
} else {
|
||||
@@ -1174,7 +1174,7 @@ public class BiometricService extends SystemService {
|
||||
+ ", Latency: " + latency);
|
||||
}
|
||||
// Auth canceled
|
||||
StatsLog.write(StatsLog.BIOMETRIC_ERROR_OCCURRED,
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.BIOMETRIC_ERROR_OCCURRED,
|
||||
statsModality(),
|
||||
mCurrentAuthSession.mUserId,
|
||||
mCurrentAuthSession.isCrypto(),
|
||||
|
||||
@@ -51,10 +51,10 @@ import android.os.SystemClock;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.util.Slog;
|
||||
import android.util.StatsLog;
|
||||
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.internal.statusbar.IStatusBarService;
|
||||
import com.android.internal.util.FrameworkStatsLog;
|
||||
import com.android.server.SystemService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -371,7 +371,7 @@ public abstract class BiometricServiceBase extends SystemService
|
||||
+ identifier.getName());
|
||||
mUtils.removeBiometricForUser(getContext(),
|
||||
getTargetUserId(), identifier.getBiometricId());
|
||||
StatsLog.write(StatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED,
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED,
|
||||
statsModality(),
|
||||
BiometricsProtoEnums.ISSUE_UNKNOWN_TEMPLATE_ENROLLED_FRAMEWORK);
|
||||
}
|
||||
@@ -551,7 +551,7 @@ public abstract class BiometricServiceBase extends SystemService
|
||||
+ " failed to respond to cancel, starting client "
|
||||
+ (mPendingClient != null ? mPendingClient.getOwnerString() : "null"));
|
||||
|
||||
StatsLog.write(StatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED,
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED,
|
||||
statsModality(), BiometricsProtoEnums.ISSUE_CANCEL_TIMED_OUT);
|
||||
|
||||
mCurrentClient = null;
|
||||
@@ -673,8 +673,8 @@ public abstract class BiometricServiceBase extends SystemService
|
||||
0 /*vendorCode */);
|
||||
});
|
||||
|
||||
StatsLog.write(StatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED, statsModality(),
|
||||
BiometricsProtoEnums.ISSUE_HAL_DEATH);
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED,
|
||||
statsModality(), BiometricsProtoEnums.ISSUE_HAL_DEATH);
|
||||
}
|
||||
|
||||
protected ClientMonitor getCurrentClient() {
|
||||
@@ -1249,7 +1249,7 @@ public abstract class BiometricServiceBase extends SystemService
|
||||
template.mIdentifier.getBiometricId(), 0 /* groupId */, template.mUserId,
|
||||
restricted, getContext().getPackageName());
|
||||
removeInternal(client);
|
||||
StatsLog.write(StatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED,
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED,
|
||||
statsModality(),
|
||||
BiometricsProtoEnums.ISSUE_UNKNOWN_TEMPLATE_ENROLLED_HAL);
|
||||
} else {
|
||||
|
||||
@@ -21,7 +21,8 @@ import android.hardware.biometrics.BiometricConstants;
|
||||
import android.hardware.biometrics.BiometricsProtoEnums;
|
||||
import android.hardware.face.FaceManager;
|
||||
import android.util.Slog;
|
||||
import android.util.StatsLog;
|
||||
|
||||
import com.android.internal.util.FrameworkStatsLog;
|
||||
|
||||
/**
|
||||
* Abstract class that adds logging functionality to the ClientMonitor classes.
|
||||
@@ -86,7 +87,7 @@ public abstract class LoggableMonitor {
|
||||
+ ", AcquiredInfo: " + acquiredInfo
|
||||
+ ", VendorCode: " + vendorCode);
|
||||
}
|
||||
StatsLog.write(StatsLog.BIOMETRIC_ACQUIRED,
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.BIOMETRIC_ACQUIRED,
|
||||
statsModality(),
|
||||
targetUserId,
|
||||
isCryptoOperation(),
|
||||
@@ -114,7 +115,7 @@ public abstract class LoggableMonitor {
|
||||
} else {
|
||||
Slog.v(TAG, "Error latency: " + latency);
|
||||
}
|
||||
StatsLog.write(StatsLog.BIOMETRIC_ERROR_OCCURRED,
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.BIOMETRIC_ERROR_OCCURRED,
|
||||
statsModality(),
|
||||
targetUserId,
|
||||
isCryptoOperation(),
|
||||
@@ -128,15 +129,15 @@ public abstract class LoggableMonitor {
|
||||
|
||||
protected final void logOnAuthenticated(Context context, boolean authenticated,
|
||||
boolean requireConfirmation, int targetUserId, boolean isBiometricPrompt) {
|
||||
int authState = StatsLog.BIOMETRIC_AUTHENTICATED__STATE__UNKNOWN;
|
||||
int authState = FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__UNKNOWN;
|
||||
if (!authenticated) {
|
||||
authState = StatsLog.BIOMETRIC_AUTHENTICATED__STATE__REJECTED;
|
||||
authState = FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__REJECTED;
|
||||
} else {
|
||||
// Authenticated
|
||||
if (isBiometricPrompt && requireConfirmation) {
|
||||
authState = StatsLog.BIOMETRIC_AUTHENTICATED__STATE__PENDING_CONFIRMATION;
|
||||
authState = FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__PENDING_CONFIRMATION;
|
||||
} else {
|
||||
authState = StatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED;
|
||||
authState = FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,7 +158,7 @@ public abstract class LoggableMonitor {
|
||||
Slog.v(TAG, "Authentication latency: " + latency);
|
||||
}
|
||||
|
||||
StatsLog.write(StatsLog.BIOMETRIC_AUTHENTICATED,
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.BIOMETRIC_AUTHENTICATED,
|
||||
statsModality(),
|
||||
targetUserId,
|
||||
isCryptoOperation(),
|
||||
@@ -179,7 +180,7 @@ public abstract class LoggableMonitor {
|
||||
Slog.v(TAG, "Enroll latency: " + latency);
|
||||
}
|
||||
|
||||
StatsLog.write(StatsLog.BIOMETRIC_ENROLLED,
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.BIOMETRIC_ENROLLED,
|
||||
statsModality(),
|
||||
targetUserId,
|
||||
latency,
|
||||
|
||||
Reference in New Issue
Block a user