- [Update] Save app optimizaiton mode set & expire events from turbo. - [Reset ] Restore optimization mode for expired events in Periodic job. - [Delete] Cancel expiration event if user updates mode in app usage page. Bug: 338965652 Test: atest + manual Change-Id: I3fb7311207da1bdb1146ea1ff041aca6adb66052
56 lines
1.3 KiB
Protocol Buffer
56 lines
1.3 KiB
Protocol Buffer
syntax = "proto2";
|
|
|
|
package com.android.settings.intelligence;
|
|
option java_multiple_files = true;
|
|
option java_package = "com.android.settings.fuelgauge";
|
|
option java_outer_classname = "FuelgaugeLogProto";
|
|
|
|
// Store history of setting optimize mode
|
|
message BatteryOptimizeHistoricalLog {
|
|
repeated BatteryOptimizeHistoricalLogEntry log_entry = 1;
|
|
}
|
|
|
|
message BatteryOptimizeHistoricalLogEntry {
|
|
// The action to set optimize mode
|
|
enum Action {
|
|
UNKNOWN = 0;
|
|
LEAVE = 1;
|
|
APPLY = 2;
|
|
RESET = 3;
|
|
RESTORE = 4;
|
|
BACKUP = 5;
|
|
FORCE_RESET = 6;
|
|
EXTERNAL_UPDATE = 7;
|
|
EXPIRATION_RESET = 8;
|
|
}
|
|
|
|
optional string package_name = 1;
|
|
optional Action action = 2;
|
|
optional string action_description = 3;
|
|
optional int64 timestamp = 4;
|
|
}
|
|
|
|
|
|
// Store history of battery usage periodic job
|
|
message BatteryUsageHistoricalLog {
|
|
repeated BatteryUsageHistoricalLogEntry log_entry = 1;
|
|
}
|
|
|
|
message BatteryUsageHistoricalLogEntry {
|
|
// The action to record battery usage job event
|
|
enum Action {
|
|
UNKNOWN = 0;
|
|
SCHEDULE_JOB = 1;
|
|
EXECUTE_JOB = 2;
|
|
RECHECK_JOB = 3;
|
|
FETCH_USAGE_DATA = 4;
|
|
INSERT_USAGE_DATA = 5;
|
|
TIME_UPDATED = 6;
|
|
TIMEZONE_UPDATED = 7;
|
|
}
|
|
|
|
optional int64 timestamp = 1;
|
|
optional Action action = 2;
|
|
optional string action_description = 3;
|
|
}
|