blob: 1e17895746760516240db4ec8b8540b82119eb41 [file] [log] [blame]
/*
* Copyright (C) 2017 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";
option optimize_for = LITE_RUNTIME;
package android.os.statsd;
option java_package = "com.android.os";
option java_outer_classname = "StatsEventProto";
message StatsEvent {
oneof event {
// Screen state change.
ScreenStateChange screen_state_change = 2;
// Process state change.
ProcessStateChange process_state_change = 1112;
}
}
// Logs changes in screen state. This event is logged in
// frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
message ScreenStateChange {
// Screen state enums follow the values defined in below file.
// frameworks/base/core/java/android/view/Display.java
enum State {
STATE_UNKNOWN = 0;
STATE_OFF = 1;
STATE_ON = 2;
STATE_DOZE = 3;
STATE_DOZE_SUSPEND = 4;
STATE_VR = 5;
}
// New screen state.
optional State display_state = 1;
}
// Logs changes in process state. This event is logged in
// frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
message ProcessStateChange {
// Type of process event.
enum State {
START = 1;
CRASH = 2;
}
optional State state = 1;
// UID associated with the package.
optional int32 uid = 2;
}