1syntax = "proto2"; 2 3option java_multiple_files = true; 4option java_package = "com.android.settings.fuelgauge.batteryusage"; 5option java_outer_classname = "BatteryUsageSlotProto"; 6 7message BatteryUsageSlot { 8 optional int64 start_timestamp = 1; 9 optional int64 end_timestamp = 2; 10 optional int32 start_battery_level = 3; 11 optional int32 end_battery_level = 4; 12 optional int64 screen_on_time = 5; 13 repeated BatteryUsageDiff app_usage = 6; 14 repeated BatteryUsageDiff system_usage = 7; 15} 16 17enum BatteryOptimizationMode { 18 MODE_UNKNOWN = 0; 19 MODE_RESTRICTED = 1; 20 MODE_UNRESTRICTED = 2; 21 MODE_OPTIMIZED = 3; 22} 23 24message BatteryUsageDiff { 25 optional int64 uid = 1; 26 optional int64 user_id = 2; 27 optional string package_name = 3; 28 optional string label = 4; 29 optional string key = 5; 30 optional bool is_hidden = 6; 31 optional int32 component_id = 7; 32 optional int32 consumer_type = 8; 33 optional double consume_power = 9; 34 optional double foreground_usage_consume_power = 10; 35 optional double background_usage_consume_power = 11; 36 optional double foreground_service_usage_consume_power = 12; 37 optional double cached_usage_consume_power = 13; 38 optional int64 foreground_usage_time = 14; 39 optional int64 background_usage_time = 15; 40 optional int64 screen_on_time = 16; 41 optional int64 foreground_service_usage_time = 17; 42 optional BatteryOptimizationMode app_optimization_mode = 18; 43} 44