Loading apex/statsd/framework/Android.bp +16 −0 Original line number Diff line number Diff line Loading @@ -12,11 +12,27 @@ // See the License for the specific language governing permissions and // limitations under the License. genrule { name: "statslog-statsd-java-gen", tools: ["stats-log-api-gen"], cmd: "$(location stats-log-api-gen) --java $(out) --module statsd" + " --javaPackage com.android.internal.util --javaClass StatsdStatsLog", out: ["com/android/internal/util/StatsdStatsLog.java"], } java_library_static { name: "statslog-statsd", srcs: [ ":statslog-statsd-java-gen", ], } filegroup { name: "framework-statsd-sources", srcs: [ "java/**/*.java", ":statsd_java_aidl", ":statslog-statsd-java-gen", ], } Loading apex/statsd/framework/java/android/util/StatsLog.java +5 −5 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ import android.os.RemoteException; import android.os.ServiceManager; import android.util.proto.ProtoOutputStream; import com.android.internal.util.FrameworkStatsLog; import com.android.internal.util.StatsdStatsLog; /** * StatsLog provides an API for developers to send events to statsd. The events can be used to Loading Loading @@ -64,7 +64,7 @@ public final class StatsLog { return false; } service.sendAppBreadcrumbAtom(label, FrameworkStatsLog.APP_BREADCRUMB_REPORTED__STATE__START); StatsdStatsLog.APP_BREADCRUMB_REPORTED__STATE__START); return true; } catch (RemoteException e) { sService = null; Loading Loading @@ -93,7 +93,7 @@ public final class StatsLog { return false; } service.sendAppBreadcrumbAtom( label, FrameworkStatsLog.APP_BREADCRUMB_REPORTED__STATE__STOP); label, StatsdStatsLog.APP_BREADCRUMB_REPORTED__STATE__STOP); return true; } catch (RemoteException e) { sService = null; Loading Loading @@ -122,7 +122,7 @@ public final class StatsLog { return false; } service.sendAppBreadcrumbAtom( label, FrameworkStatsLog.APP_BREADCRUMB_REPORTED__STATE__UNSPECIFIED); label, StatsdStatsLog.APP_BREADCRUMB_REPORTED__STATE__UNSPECIFIED); return true; } catch (RemoteException e) { sService = null; Loading Loading @@ -162,7 +162,7 @@ public final class StatsLog { | EXPERIMENT_IDS_FIELD_ID, id); } FrameworkStatsLog.write(FrameworkStatsLog.BINARY_PUSH_STATE_CHANGED, StatsdStatsLog.write(StatsdStatsLog.BINARY_PUSH_STATE_CHANGED, trainName, trainVersionCode, (options & IStatsd.FLAG_REQUIRE_STAGING) > 0, Loading cmds/statsd/src/atoms.proto +2 −2 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ message Atom { WallClockTimeShifted wall_clock_time_shifted = 45 [(module) = "framework"]; AnomalyDetected anomaly_detected = 46; AppBreadcrumbReported app_breadcrumb_reported = 47 [(allow_from_any_uid) = true, (module) = "framework"]; 47 [(allow_from_any_uid) = true, (module) = "statsd"]; AppStartOccurred app_start_occurred = 48 [(module) = "framework"]; AppStartCanceled app_start_canceled = 49 [(module) = "framework"]; AppStartFullyDrawn app_start_fully_drawn = 50 [(module) = "framework"]; Loading Loading @@ -188,7 +188,7 @@ message Atom { ServiceStateChanged service_state_changed = 99 [(module) = "framework"]; ServiceLaunchReported service_launch_reported = 100 [(module) = "framework"]; FlagFlipUpdateOccurred flag_flip_update_occurred = 101 [(module) = "framework"]; BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "framework"]; BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "statsd"]; DevicePolicyEvent device_policy_event = 103 [(module) = "framework"]; DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104 [(module) = "docsui"]; DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported = Loading Loading
apex/statsd/framework/Android.bp +16 −0 Original line number Diff line number Diff line Loading @@ -12,11 +12,27 @@ // See the License for the specific language governing permissions and // limitations under the License. genrule { name: "statslog-statsd-java-gen", tools: ["stats-log-api-gen"], cmd: "$(location stats-log-api-gen) --java $(out) --module statsd" + " --javaPackage com.android.internal.util --javaClass StatsdStatsLog", out: ["com/android/internal/util/StatsdStatsLog.java"], } java_library_static { name: "statslog-statsd", srcs: [ ":statslog-statsd-java-gen", ], } filegroup { name: "framework-statsd-sources", srcs: [ "java/**/*.java", ":statsd_java_aidl", ":statslog-statsd-java-gen", ], } Loading
apex/statsd/framework/java/android/util/StatsLog.java +5 −5 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ import android.os.RemoteException; import android.os.ServiceManager; import android.util.proto.ProtoOutputStream; import com.android.internal.util.FrameworkStatsLog; import com.android.internal.util.StatsdStatsLog; /** * StatsLog provides an API for developers to send events to statsd. The events can be used to Loading Loading @@ -64,7 +64,7 @@ public final class StatsLog { return false; } service.sendAppBreadcrumbAtom(label, FrameworkStatsLog.APP_BREADCRUMB_REPORTED__STATE__START); StatsdStatsLog.APP_BREADCRUMB_REPORTED__STATE__START); return true; } catch (RemoteException e) { sService = null; Loading Loading @@ -93,7 +93,7 @@ public final class StatsLog { return false; } service.sendAppBreadcrumbAtom( label, FrameworkStatsLog.APP_BREADCRUMB_REPORTED__STATE__STOP); label, StatsdStatsLog.APP_BREADCRUMB_REPORTED__STATE__STOP); return true; } catch (RemoteException e) { sService = null; Loading Loading @@ -122,7 +122,7 @@ public final class StatsLog { return false; } service.sendAppBreadcrumbAtom( label, FrameworkStatsLog.APP_BREADCRUMB_REPORTED__STATE__UNSPECIFIED); label, StatsdStatsLog.APP_BREADCRUMB_REPORTED__STATE__UNSPECIFIED); return true; } catch (RemoteException e) { sService = null; Loading Loading @@ -162,7 +162,7 @@ public final class StatsLog { | EXPERIMENT_IDS_FIELD_ID, id); } FrameworkStatsLog.write(FrameworkStatsLog.BINARY_PUSH_STATE_CHANGED, StatsdStatsLog.write(StatsdStatsLog.BINARY_PUSH_STATE_CHANGED, trainName, trainVersionCode, (options & IStatsd.FLAG_REQUIRE_STAGING) > 0, Loading
cmds/statsd/src/atoms.proto +2 −2 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ message Atom { WallClockTimeShifted wall_clock_time_shifted = 45 [(module) = "framework"]; AnomalyDetected anomaly_detected = 46; AppBreadcrumbReported app_breadcrumb_reported = 47 [(allow_from_any_uid) = true, (module) = "framework"]; 47 [(allow_from_any_uid) = true, (module) = "statsd"]; AppStartOccurred app_start_occurred = 48 [(module) = "framework"]; AppStartCanceled app_start_canceled = 49 [(module) = "framework"]; AppStartFullyDrawn app_start_fully_drawn = 50 [(module) = "framework"]; Loading Loading @@ -188,7 +188,7 @@ message Atom { ServiceStateChanged service_state_changed = 99 [(module) = "framework"]; ServiceLaunchReported service_launch_reported = 100 [(module) = "framework"]; FlagFlipUpdateOccurred flag_flip_update_occurred = 101 [(module) = "framework"]; BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "framework"]; BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "statsd"]; DevicePolicyEvent device_policy_event = 103 [(module) = "framework"]; DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104 [(module) = "docsui"]; DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported = Loading