1 /*
2  * Copyright (C) 2021 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.car.cts.powerpolicy;
18 
19 public final class PowerPolicyConstants {
20     public static final int VHAL_POWER_STATE_REQ_PROPERTY_ID = 289475072;
21     public static final int VHAL_POWER_STATE_REP_PROPERTY_ID = 289475073;
22 
PowerPolicyConstants()23     private PowerPolicyConstants() { }
24 
25     public static final class CarPowerState {
26         public static final int INVALID = 0;
27         public static final int WAIT_FOR_VHAL = 1;
28         public static final int SUSPEND_ENTER = 2;
29         public static final int SUSPEND_EXIT = 3;
30         public static final int SHUTDOWN_ENTER = 5;
31         public static final int ON = 6;
32         public static final int SHUTDOWN_PREPARE = 7;
33         public static final int SHUTDOWN_CANCELLED = 8;
34 
CarPowerState()35         private CarPowerState() { }
36     }
37 
38     public static final class VhalPowerStateReq {
39         public static final int ON = 0;
40         public static final int SHUTDOWN_PREPARE = 1;
41         public static final int CANCEL_SHUTDOWN = 2;
42         public static final int FINISHED = 3;
43 
VhalPowerStateReq()44         private VhalPowerStateReq() { }
45     }
46 
47     public static final class ShutdownParam {
48         public static final int NOT_USED = 0;
49         public static final int SHUTDOWN_IMMEDIATELY = 1;
50         public static final int CAN_SLEEP = 2;
51         public static final int SHUTDOWN_ONLY = 3;
52         public static final int SLEEP_IMMEDIATELY = 4;
53 
ShutdownParam()54         private ShutdownParam() { }
55     }
56 }
57