Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a4a9989 authored by Mark Tabry's avatar Mark Tabry
Browse files

Define new atoms for Vehicle Maps Service.

Bug: 140889664
Test: N/A
Change-Id: I6bf37ed236e81fbcca50046b5a9b649685affb4a
Merged-In: I6bf37ed236e81fbcca50046b5a9b649685affb4a
(cherry picked from commit a824a64b)
parent e666b2ae
Loading
Loading
Loading
Loading
+57 −0
Original line number Diff line number Diff line
@@ -324,6 +324,7 @@ message Atom {

        AppCompatibilityChangeReported app_compatibility_change_reported =
            228 [(allow_from_any_uid) = true];
        VmsClientConnectionStateChanged vms_client_connection_state_changed = 230;
    }

    // Pulled events will start at field 10000.
@@ -391,6 +392,7 @@ message Atom {
        CoolingDevice cooling_device = 10059;
        AppOps app_ops = 10060;
        ProcessSystemIonHeapSize process_system_ion_heap_size = 10061;
        VmsClientStats vms_client_stats = 10065;
    }

    // DO NOT USE field numbers above 100,000 in AOSP.
@@ -3711,6 +3713,33 @@ message RoleRequestResultReported {
    optional Result result = 9;
}

/**
 * Logs when a Vehicle Maps Service client's connection state has changed
 *
 * Logged from:
 *   packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java
 */
message VmsClientConnectionStateChanged {
    // The UID of the VMS client app
    optional int32 uid = 1 [(is_uid) = true];

    enum State {
        UNKNOWN = 0;
        // Attempting to connect to the client
        CONNECTING = 1;
        // Client connection established
        CONNECTED = 2;
        // Client connection closed unexpectedly
        DISCONNECTED = 3;
        // Client connection closed by VMS
        TERMINATED = 4;
        // Error establishing the client connection
        CONNECTION_ERROR = 5;
    }

    optional State state  = 2;
}

//////////////////////////////////////////////////////////////////////
// Pulled atoms below this line //
//////////////////////////////////////////////////////////////////////
@@ -6856,5 +6885,33 @@ message AppCompatibilityChangeReported {

    // Where it was logged from.
    optional Source source = 4;
}

/**
 * Pulls client metrics on data transferred via Vehicle Maps Service.
 * Metrics are keyed by uid + layer.
 *
 * Pulled from:
 *   packages/services/Car/service/src/com/android/car/stats/CarStatsService.java
 */
message VmsClientStats {
    // UID of the VMS client app
    optional int32 uid = 1 [(is_uid) = true];

    // VMS layer definition
    optional int32 layer_type = 2;
    optional int32 layer_channel = 3;
    optional int32 layer_version = 4;

    // Bytes and packets sent by the client for the layer
    optional int64 tx_bytes = 5;
    optional int64 tx_packets = 6;

    // Bytes and packets received by the client for the layer
    optional int64 rx_bytes = 7;
    optional int64 rx_packets = 8;

    // Bytes and packets dropped due to client error
    optional int64 dropped_bytes = 9;
    optional int64 dropped_packets = 10;
}