Loading cmds/statsd/src/atoms.proto +2 −2 Original line number Original line Diff line number Diff line Loading @@ -381,8 +381,8 @@ message Atom { NotificationReported notification_reported = 244; NotificationReported notification_reported = 244; NotificationPanelReported notification_panel_reported = 245; NotificationPanelReported notification_panel_reported = 245; NotificationChannelModified notification_panel_modified = 246; NotificationChannelModified notification_panel_modified = 246; IntegrityCheckResultReported integrity_check_result_reported = 247; IntegrityCheckResultReported integrity_check_result_reported = 247 [(module) = "framework"]; IntegrityRulesPushed integrity_rules_pushed = 248; IntegrityRulesPushed integrity_rules_pushed = 248 [(module) = "framework"]; CellBroadcastMessageReported cb_message_reported = CellBroadcastMessageReported cb_message_reported = 249 [(module) = "cellbroadcast"]; 249 [(module) = "cellbroadcast"]; CellBroadcastMessageError cb_message_error = CellBroadcastMessageError cb_message_error = Loading core/java/android/app/admin/DevicePolicyEventLogger.java +3 −4 Original line number Original line Diff line number Diff line Loading @@ -19,10 +19,9 @@ package android.app.admin; import android.annotation.Nullable; import android.annotation.Nullable; import android.content.ComponentName; import android.content.ComponentName; import android.stats.devicepolicy.nano.StringList; import android.stats.devicepolicy.nano.StringList; import android.util.StatsLog; import com.android.framework.protobuf.nano.MessageNano; import com.android.framework.protobuf.nano.MessageNano; import com.android.internal.util.Preconditions; import com.android.internal.util.FrameworkStatsLog; import java.util.Arrays; import java.util.Arrays; import java.util.Objects; import java.util.Objects; Loading Loading @@ -197,8 +196,8 @@ public class DevicePolicyEventLogger { */ */ public void write() { public void write() { byte[] bytes = stringArrayValueToBytes(mStringArrayValue); byte[] bytes = stringArrayValueToBytes(mStringArrayValue); StatsLog.write(StatsLog.DEVICE_POLICY_EVENT, mEventId, mAdminPackageName, mIntValue, FrameworkStatsLog.write(FrameworkStatsLog.DEVICE_POLICY_EVENT, mEventId, mAdminPackageName, mBooleanValue, mTimePeriodMs, bytes); mIntValue, mBooleanValue, mTimePeriodMs, bytes); } } /** /** Loading core/java/android/service/contentcapture/ContentCaptureService.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -42,7 +42,6 @@ import android.os.RemoteException; import android.util.Log; import android.util.Log; import android.util.Slog; import android.util.Slog; import android.util.SparseIntArray; import android.util.SparseIntArray; import android.util.StatsLog; import android.view.contentcapture.ContentCaptureCondition; import android.view.contentcapture.ContentCaptureCondition; import android.view.contentcapture.ContentCaptureContext; import android.view.contentcapture.ContentCaptureContext; import android.view.contentcapture.ContentCaptureEvent; import android.view.contentcapture.ContentCaptureEvent; Loading @@ -55,6 +54,7 @@ import android.view.contentcapture.IContentCaptureDirectManager; import android.view.contentcapture.MainContentCaptureSession; import android.view.contentcapture.MainContentCaptureSession; import com.android.internal.os.IResultReceiver; import com.android.internal.os.IResultReceiver; import com.android.internal.util.FrameworkStatsLog; import com.android.internal.util.Preconditions; import com.android.internal.util.Preconditions; import java.io.FileDescriptor; import java.io.FileDescriptor; Loading Loading @@ -594,7 +594,7 @@ public abstract class ContentCaptureService extends Service { + rightUid); + rightUid); long now = System.currentTimeMillis(); long now = System.currentTimeMillis(); if (now - mLastCallerMismatchLog > mCallerMismatchTimeout) { if (now - mLastCallerMismatchLog > mCallerMismatchTimeout) { StatsLog.write(StatsLog.CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED, FrameworkStatsLog.write(FrameworkStatsLog.CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED, getPackageManager().getNameForUid(rightUid), getPackageManager().getNameForUid(rightUid), getPackageManager().getNameForUid(uid)); getPackageManager().getNameForUid(uid)); mLastCallerMismatchLog = now; mLastCallerMismatchLog = now; Loading core/java/android/util/StatsLog.java +6 −3 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,8 @@ import android.os.IStatsd; import android.os.RemoteException; import android.os.RemoteException; import android.os.ServiceManager; import android.os.ServiceManager; import com.android.internal.util.FrameworkStatsLog; /** /** * StatsLog provides an API for developers to send events to statsd. The events can be used to * StatsLog provides an API for developers to send events to statsd. The events can be used to * define custom metrics inside statsd. * define custom metrics inside statsd. Loading Loading @@ -60,7 +62,7 @@ public final class StatsLog extends StatsLogInternal { return false; return false; } } service.sendAppBreadcrumbAtom(label, service.sendAppBreadcrumbAtom(label, StatsLog.APP_BREADCRUMB_REPORTED__STATE__START); FrameworkStatsLog.APP_BREADCRUMB_REPORTED__STATE__START); return true; return true; } catch (RemoteException e) { } catch (RemoteException e) { sService = null; sService = null; Loading Loading @@ -88,7 +90,8 @@ public final class StatsLog extends StatsLogInternal { } } return false; return false; } } service.sendAppBreadcrumbAtom(label, StatsLog.APP_BREADCRUMB_REPORTED__STATE__STOP); service.sendAppBreadcrumbAtom( label, FrameworkStatsLog.APP_BREADCRUMB_REPORTED__STATE__STOP); return true; return true; } catch (RemoteException e) { } catch (RemoteException e) { sService = null; sService = null; Loading Loading @@ -117,7 +120,7 @@ public final class StatsLog extends StatsLogInternal { return false; return false; } } service.sendAppBreadcrumbAtom( service.sendAppBreadcrumbAtom( label, StatsLog.APP_BREADCRUMB_REPORTED__STATE__UNSPECIFIED); label, FrameworkStatsLog.APP_BREADCRUMB_REPORTED__STATE__UNSPECIFIED); return true; return true; } catch (RemoteException e) { } catch (RemoteException e) { sService = null; sService = null; Loading core/java/android/view/GestureDetector.java +10 −9 Original line number Original line Diff line number Diff line Loading @@ -16,12 +16,12 @@ package android.view; package android.view; import static android.util.StatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__DEEP_PRESS; import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__DEEP_PRESS; import static android.util.StatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__DOUBLE_TAP; import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__DOUBLE_TAP; import static android.util.StatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__LONG_PRESS; import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__LONG_PRESS; import static android.util.StatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__SCROLL; import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__SCROLL; import static android.util.StatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__SINGLE_TAP; import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__SINGLE_TAP; import static android.util.StatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__UNKNOWN_CLASSIFICATION; import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__UNKNOWN_CLASSIFICATION; import android.compat.annotation.UnsupportedAppUsage; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; import android.content.Context; Loading @@ -29,7 +29,8 @@ import android.os.Build; import android.os.Handler; import android.os.Handler; import android.os.Message; import android.os.Message; import android.os.SystemClock; import android.os.SystemClock; import android.util.StatsLog; import com.android.internal.util.FrameworkStatsLog; /** /** * Detects various gestures and events using the supplied {@link MotionEvent}s. * Detects various gestures and events using the supplied {@link MotionEvent}s. Loading Loading @@ -887,8 +888,8 @@ public class GestureDetector { mHasRecordedClassification = true; mHasRecordedClassification = true; return; return; } } StatsLog.write( FrameworkStatsLog.write( StatsLog.TOUCH_GESTURE_CLASSIFIED, FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED, getClass().getName(), getClass().getName(), classification, classification, (int) (SystemClock.uptimeMillis() - mCurrentMotionEvent.getDownTime()), (int) (SystemClock.uptimeMillis() - mCurrentMotionEvent.getDownTime()), Loading Loading
cmds/statsd/src/atoms.proto +2 −2 Original line number Original line Diff line number Diff line Loading @@ -381,8 +381,8 @@ message Atom { NotificationReported notification_reported = 244; NotificationReported notification_reported = 244; NotificationPanelReported notification_panel_reported = 245; NotificationPanelReported notification_panel_reported = 245; NotificationChannelModified notification_panel_modified = 246; NotificationChannelModified notification_panel_modified = 246; IntegrityCheckResultReported integrity_check_result_reported = 247; IntegrityCheckResultReported integrity_check_result_reported = 247 [(module) = "framework"]; IntegrityRulesPushed integrity_rules_pushed = 248; IntegrityRulesPushed integrity_rules_pushed = 248 [(module) = "framework"]; CellBroadcastMessageReported cb_message_reported = CellBroadcastMessageReported cb_message_reported = 249 [(module) = "cellbroadcast"]; 249 [(module) = "cellbroadcast"]; CellBroadcastMessageError cb_message_error = CellBroadcastMessageError cb_message_error = Loading
core/java/android/app/admin/DevicePolicyEventLogger.java +3 −4 Original line number Original line Diff line number Diff line Loading @@ -19,10 +19,9 @@ package android.app.admin; import android.annotation.Nullable; import android.annotation.Nullable; import android.content.ComponentName; import android.content.ComponentName; import android.stats.devicepolicy.nano.StringList; import android.stats.devicepolicy.nano.StringList; import android.util.StatsLog; import com.android.framework.protobuf.nano.MessageNano; import com.android.framework.protobuf.nano.MessageNano; import com.android.internal.util.Preconditions; import com.android.internal.util.FrameworkStatsLog; import java.util.Arrays; import java.util.Arrays; import java.util.Objects; import java.util.Objects; Loading Loading @@ -197,8 +196,8 @@ public class DevicePolicyEventLogger { */ */ public void write() { public void write() { byte[] bytes = stringArrayValueToBytes(mStringArrayValue); byte[] bytes = stringArrayValueToBytes(mStringArrayValue); StatsLog.write(StatsLog.DEVICE_POLICY_EVENT, mEventId, mAdminPackageName, mIntValue, FrameworkStatsLog.write(FrameworkStatsLog.DEVICE_POLICY_EVENT, mEventId, mAdminPackageName, mBooleanValue, mTimePeriodMs, bytes); mIntValue, mBooleanValue, mTimePeriodMs, bytes); } } /** /** Loading
core/java/android/service/contentcapture/ContentCaptureService.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -42,7 +42,6 @@ import android.os.RemoteException; import android.util.Log; import android.util.Log; import android.util.Slog; import android.util.Slog; import android.util.SparseIntArray; import android.util.SparseIntArray; import android.util.StatsLog; import android.view.contentcapture.ContentCaptureCondition; import android.view.contentcapture.ContentCaptureCondition; import android.view.contentcapture.ContentCaptureContext; import android.view.contentcapture.ContentCaptureContext; import android.view.contentcapture.ContentCaptureEvent; import android.view.contentcapture.ContentCaptureEvent; Loading @@ -55,6 +54,7 @@ import android.view.contentcapture.IContentCaptureDirectManager; import android.view.contentcapture.MainContentCaptureSession; import android.view.contentcapture.MainContentCaptureSession; import com.android.internal.os.IResultReceiver; import com.android.internal.os.IResultReceiver; import com.android.internal.util.FrameworkStatsLog; import com.android.internal.util.Preconditions; import com.android.internal.util.Preconditions; import java.io.FileDescriptor; import java.io.FileDescriptor; Loading Loading @@ -594,7 +594,7 @@ public abstract class ContentCaptureService extends Service { + rightUid); + rightUid); long now = System.currentTimeMillis(); long now = System.currentTimeMillis(); if (now - mLastCallerMismatchLog > mCallerMismatchTimeout) { if (now - mLastCallerMismatchLog > mCallerMismatchTimeout) { StatsLog.write(StatsLog.CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED, FrameworkStatsLog.write(FrameworkStatsLog.CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED, getPackageManager().getNameForUid(rightUid), getPackageManager().getNameForUid(rightUid), getPackageManager().getNameForUid(uid)); getPackageManager().getNameForUid(uid)); mLastCallerMismatchLog = now; mLastCallerMismatchLog = now; Loading
core/java/android/util/StatsLog.java +6 −3 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,8 @@ import android.os.IStatsd; import android.os.RemoteException; import android.os.RemoteException; import android.os.ServiceManager; import android.os.ServiceManager; import com.android.internal.util.FrameworkStatsLog; /** /** * StatsLog provides an API for developers to send events to statsd. The events can be used to * StatsLog provides an API for developers to send events to statsd. The events can be used to * define custom metrics inside statsd. * define custom metrics inside statsd. Loading Loading @@ -60,7 +62,7 @@ public final class StatsLog extends StatsLogInternal { return false; return false; } } service.sendAppBreadcrumbAtom(label, service.sendAppBreadcrumbAtom(label, StatsLog.APP_BREADCRUMB_REPORTED__STATE__START); FrameworkStatsLog.APP_BREADCRUMB_REPORTED__STATE__START); return true; return true; } catch (RemoteException e) { } catch (RemoteException e) { sService = null; sService = null; Loading Loading @@ -88,7 +90,8 @@ public final class StatsLog extends StatsLogInternal { } } return false; return false; } } service.sendAppBreadcrumbAtom(label, StatsLog.APP_BREADCRUMB_REPORTED__STATE__STOP); service.sendAppBreadcrumbAtom( label, FrameworkStatsLog.APP_BREADCRUMB_REPORTED__STATE__STOP); return true; return true; } catch (RemoteException e) { } catch (RemoteException e) { sService = null; sService = null; Loading Loading @@ -117,7 +120,7 @@ public final class StatsLog extends StatsLogInternal { return false; return false; } } service.sendAppBreadcrumbAtom( service.sendAppBreadcrumbAtom( label, StatsLog.APP_BREADCRUMB_REPORTED__STATE__UNSPECIFIED); label, FrameworkStatsLog.APP_BREADCRUMB_REPORTED__STATE__UNSPECIFIED); return true; return true; } catch (RemoteException e) { } catch (RemoteException e) { sService = null; sService = null; Loading
core/java/android/view/GestureDetector.java +10 −9 Original line number Original line Diff line number Diff line Loading @@ -16,12 +16,12 @@ package android.view; package android.view; import static android.util.StatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__DEEP_PRESS; import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__DEEP_PRESS; import static android.util.StatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__DOUBLE_TAP; import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__DOUBLE_TAP; import static android.util.StatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__LONG_PRESS; import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__LONG_PRESS; import static android.util.StatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__SCROLL; import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__SCROLL; import static android.util.StatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__SINGLE_TAP; import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__SINGLE_TAP; import static android.util.StatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__UNKNOWN_CLASSIFICATION; import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__UNKNOWN_CLASSIFICATION; import android.compat.annotation.UnsupportedAppUsage; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; import android.content.Context; Loading @@ -29,7 +29,8 @@ import android.os.Build; import android.os.Handler; import android.os.Handler; import android.os.Message; import android.os.Message; import android.os.SystemClock; import android.os.SystemClock; import android.util.StatsLog; import com.android.internal.util.FrameworkStatsLog; /** /** * Detects various gestures and events using the supplied {@link MotionEvent}s. * Detects various gestures and events using the supplied {@link MotionEvent}s. Loading Loading @@ -887,8 +888,8 @@ public class GestureDetector { mHasRecordedClassification = true; mHasRecordedClassification = true; return; return; } } StatsLog.write( FrameworkStatsLog.write( StatsLog.TOUCH_GESTURE_CLASSIFIED, FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED, getClass().getName(), getClass().getName(), classification, classification, (int) (SystemClock.uptimeMillis() - mCurrentMotionEvent.getDownTime()), (int) (SystemClock.uptimeMillis() - mCurrentMotionEvent.getDownTime()), Loading