Move GpsScanStateChanged atom out of atoms.proto
Bug: 258090042
Test: m
Merged-In: I45c6b4c935b6b0d239a29ca7cfb0ce20fef8da70
Change-Id: I45c6b4c935b6b0d239a29ca7cfb0ce20fef8da70
diff --git a/stats/Android.bp b/stats/Android.bp
index bb40416..bf3dcdf 100644
--- a/stats/Android.bp
+++ b/stats/Android.bp
@@ -73,9 +73,8 @@
cc_library_host_shared {
name: "libstats_proto_host",
srcs: [
- "atoms.proto",
"atom_field_options.proto",
- "attribution_node.proto",
+ ":libstats_atoms_proto",
":libstats_atom_message_protos",
] + enum_protos,
@@ -93,15 +92,15 @@
srcs: [
"atoms.proto",
"attribution_node.proto",
+ ":libstats_gps_atom_protos",
],
}
filegroup {
name: "libstats_internal_protos",
srcs: [
- "atoms.proto",
+ ":libstats_atoms_proto",
"atom_field_options.proto",
- "attribution_node.proto",
],
}
diff --git a/stats/atoms.proto b/stats/atoms.proto
index 7cb9e15..c40d681 100644
--- a/stats/atoms.proto
+++ b/stats/atoms.proto
@@ -23,6 +23,7 @@
option java_outer_classname = "AtomsProto";
import "frameworks/proto_logging/stats/attribution_node.proto";
+import "frameworks/proto_logging/stats/atoms/gps/gps_atoms.proto";
import "frameworks/proto_logging/stats/atom_field_options.proto";
import "frameworks/proto_logging/stats/enums/app/enums.proto";
import "frameworks/proto_logging/stats/enums/app/job/enums.proto";
@@ -109,7 +110,7 @@
BleScanResultReceived ble_scan_result_received = 4 [(module) = "bluetooth"];
SensorStateChanged sensor_state_changed =
5 [(module) = "framework", (module) = "statsdtest"];
- GpsScanStateChanged gps_scan_state_changed = 6 [(module) = "framework"];
+ gps.GpsScanStateChanged gps_scan_state_changed = 6 [(module) = "framework"];
SyncStateChanged sync_state_changed = 7 [(module) = "framework", (module) = "statsdtest"];
ScheduledJobStateChanged scheduled_job_state_changed =
8 [(module) = "framework", (module) = "statsdtest"];
@@ -1625,22 +1626,6 @@
}
/**
- * Logs when GPS state changes.
- *
- * Logged from:
- * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
- */
-message GpsScanStateChanged {
- repeated AttributionNode attribution_node = 1;
-
- enum State {
- OFF = 0;
- ON = 1;
- }
- optional State state = 2;
-}
-
-/**
* Logs when GPS signal quality.
*
* Logged from:
diff --git a/stats/atoms/gps/Android.bp b/stats/atoms/gps/Android.bp
new file mode 100644
index 0000000..d6981fe
--- /dev/null
+++ b/stats/atoms/gps/Android.bp
@@ -0,0 +1,23 @@
+// Copyright (C) 2022 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.
+//
+
+
+filegroup {
+ name: "libstats_gps_atom_protos",
+ srcs: [
+ "gps_atoms.proto",
+ ],
+}
+
diff --git a/stats/atoms/gps/gps_atoms.proto b/stats/atoms/gps/gps_atoms.proto
new file mode 100644
index 0000000..0232a11
--- /dev/null
+++ b/stats/atoms/gps/gps_atoms.proto
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2022 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.
+ */
+
+syntax = "proto2";
+
+package android.os.statsd.gps;
+
+import "frameworks/proto_logging/stats/attribution_node.proto";
+
+option java_package = "com.android.os.gps";
+option java_multiple_files = true;
+
+/**
+ * Logs when GPS state changes.
+ *
+ * Logged from:
+ * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
+ */
+message GpsScanStateChanged {
+ repeated AttributionNode attribution_node = 1;
+
+ enum State {
+ OFF = 0;
+ ON = 1;
+ }
+ optional State state = 2;
+}
+