Loading cmds/statsd/src/atoms.proto +3 −14 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ option java_outer_classname = "AtomsProto"; import "frameworks/base/core/proto/android/app/enums.proto"; import "frameworks/base/core/proto/android/os/enums.proto"; import "frameworks/base/core/proto/android/server/enums.proto"; import "frameworks/base/core/proto/android/telephony/enums.proto"; import "frameworks/base/core/proto/android/view/enums.proto"; Loading Loading @@ -463,13 +464,7 @@ message BatterySaverModeStateChanged { * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message DeviceIdleModeStateChanged { // TODO: Use the enum matching BatteryStats.DEVICE_IDLE_MODE_. enum State { DEVICE_IDLE_MODE_OFF = 0; DEVICE_IDLE_MODE_LIGHT = 1; DEVICE_IDLE_MODE_DEEP = 2; } optional State state = 1; optional android.server.DeviceIdleModeEnum state = 1; } Loading @@ -480,13 +475,7 @@ message DeviceIdleModeStateChanged { * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message DeviceIdlingModeStateChanged { // TODO: Use the enum matching BatteryStats.DEVICE_IDLE_MODE_. enum State { DEVICE_IDLE_MODE_OFF = 0; DEVICE_IDLE_MODE_LIGHT = 1; DEVICE_IDLE_MODE_DEEP = 2; } optional State state = 1; optional android.server.DeviceIdleModeEnum state = 1; } /** Loading core/java/android/os/BatteryStats.java +4 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.app.ActivityManager; import android.app.job.JobParameters; import android.content.Context; import android.content.pm.ApplicationInfo; import android.server.ServerProtoEnums; import android.service.batterystats.BatteryStatsServiceDumpProto; import android.telephony.SignalStrength; import android.text.format.DateFormat; Loading Loading @@ -2054,17 +2055,17 @@ public abstract class BatteryStats implements Parcelable { /** * Constant for device idle mode: not active. */ public static final int DEVICE_IDLE_MODE_OFF = 0; public static final int DEVICE_IDLE_MODE_OFF = ServerProtoEnums.DEVICE_IDLE_MODE_OFF; // 0 /** * Constant for device idle mode: active in lightweight mode. */ public static final int DEVICE_IDLE_MODE_LIGHT = 1; public static final int DEVICE_IDLE_MODE_LIGHT = ServerProtoEnums.DEVICE_IDLE_MODE_LIGHT; // 1 /** * Constant for device idle mode: active in full mode. */ public static final int DEVICE_IDLE_MODE_DEEP = 2; public static final int DEVICE_IDLE_MODE_DEEP = ServerProtoEnums.DEVICE_IDLE_MODE_DEEP; // 2 /** * Returns the time in microseconds that device has been in idle mode while Loading core/proto/android/server/enums.proto 0 → 100644 +30 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 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"; package android.server; option java_outer_classname = "ServerProtoEnums"; option java_multiple_files = true; enum DeviceIdleModeEnum { // Device idle mode - not active. DEVICE_IDLE_MODE_OFF = 0; // Device idle mode - active in lightweight mode. DEVICE_IDLE_MODE_LIGHT = 1; // Device idle mode - active in full mode. DEVICE_IDLE_MODE_DEEP = 2; } Loading
cmds/statsd/src/atoms.proto +3 −14 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ option java_outer_classname = "AtomsProto"; import "frameworks/base/core/proto/android/app/enums.proto"; import "frameworks/base/core/proto/android/os/enums.proto"; import "frameworks/base/core/proto/android/server/enums.proto"; import "frameworks/base/core/proto/android/telephony/enums.proto"; import "frameworks/base/core/proto/android/view/enums.proto"; Loading Loading @@ -463,13 +464,7 @@ message BatterySaverModeStateChanged { * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message DeviceIdleModeStateChanged { // TODO: Use the enum matching BatteryStats.DEVICE_IDLE_MODE_. enum State { DEVICE_IDLE_MODE_OFF = 0; DEVICE_IDLE_MODE_LIGHT = 1; DEVICE_IDLE_MODE_DEEP = 2; } optional State state = 1; optional android.server.DeviceIdleModeEnum state = 1; } Loading @@ -480,13 +475,7 @@ message DeviceIdleModeStateChanged { * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message DeviceIdlingModeStateChanged { // TODO: Use the enum matching BatteryStats.DEVICE_IDLE_MODE_. enum State { DEVICE_IDLE_MODE_OFF = 0; DEVICE_IDLE_MODE_LIGHT = 1; DEVICE_IDLE_MODE_DEEP = 2; } optional State state = 1; optional android.server.DeviceIdleModeEnum state = 1; } /** Loading
core/java/android/os/BatteryStats.java +4 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.app.ActivityManager; import android.app.job.JobParameters; import android.content.Context; import android.content.pm.ApplicationInfo; import android.server.ServerProtoEnums; import android.service.batterystats.BatteryStatsServiceDumpProto; import android.telephony.SignalStrength; import android.text.format.DateFormat; Loading Loading @@ -2054,17 +2055,17 @@ public abstract class BatteryStats implements Parcelable { /** * Constant for device idle mode: not active. */ public static final int DEVICE_IDLE_MODE_OFF = 0; public static final int DEVICE_IDLE_MODE_OFF = ServerProtoEnums.DEVICE_IDLE_MODE_OFF; // 0 /** * Constant for device idle mode: active in lightweight mode. */ public static final int DEVICE_IDLE_MODE_LIGHT = 1; public static final int DEVICE_IDLE_MODE_LIGHT = ServerProtoEnums.DEVICE_IDLE_MODE_LIGHT; // 1 /** * Constant for device idle mode: active in full mode. */ public static final int DEVICE_IDLE_MODE_DEEP = 2; public static final int DEVICE_IDLE_MODE_DEEP = ServerProtoEnums.DEVICE_IDLE_MODE_DEEP; // 2 /** * Returns the time in microseconds that device has been in idle mode while Loading
core/proto/android/server/enums.proto 0 → 100644 +30 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 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"; package android.server; option java_outer_classname = "ServerProtoEnums"; option java_multiple_files = true; enum DeviceIdleModeEnum { // Device idle mode - not active. DEVICE_IDLE_MODE_OFF = 0; // Device idle mode - active in lightweight mode. DEVICE_IDLE_MODE_LIGHT = 1; // Device idle mode - active in full mode. DEVICE_IDLE_MODE_DEEP = 2; }