Use statsd constants instead of literals

Instead of writing StatsLog.write(StatsLog.NAME, 1), we replace the 1
with the appropriate StatsLog constant.

Bug: 72749863
Test: still compiles

Change-Id: I68c8206de49df7e77ee66333dd633e4b70c7b226
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 4e570a6..02c6c14 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -757,8 +757,8 @@
     // The tag used with the is_default for resetting sets of settings. This is generally null.
     optional string tag = 5;
 
-    // 1 indicates that this setting with tag should be resettable.
-    optional int32 is_default = 6;
+    // True if this setting with tag should be resettable.
+    optional bool is_default = 6;
 
     // The user ID associated. Defined in android/os/UserHandle.java
     optional int32 user = 7;
@@ -1105,9 +1105,12 @@
 
     optional int32 isolated_uid = 2;
 
-    // 1 denotes we're creating an isolated uid and 0 denotes removal. We expect an isolated uid to
-    // be removed before if it's used for another parent uid.
-    optional int32 is_create = 3;
+    // We expect an isolated uid to be removed before if it's used for another parent uid.
+    enum Event {
+        REMOVED = 0;
+        CREATED = 1;
+    }
+    optional Event event = 3;
 }
 
 /**