1 /* 2 * Copyright (C) 2020 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 com.android.car.internal.common; 18 19 import static com.android.car.internal.ExcludeFromCodeCoverageGeneratedReport.BOILERPLATE_CODE; 20 21 import android.annotation.IntDef; 22 23 import com.android.car.internal.ExcludeFromCodeCoverageGeneratedReport; 24 25 import java.lang.annotation.Retention; 26 import java.lang.annotation.RetentionPolicy; 27 28 /** 29 * Provides common constants for Car library, Car Service, and System Server. 30 * 31 * @hide 32 */ 33 public final class CommonConstants { 34 35 @ExcludeFromCodeCoverageGeneratedReport(reason = BOILERPLATE_CODE) CommonConstants()36 private CommonConstants() { 37 throw new UnsupportedOperationException("contains only static constants"); 38 } 39 40 // CarUserManagerConstants 41 42 public static final int USER_LIFECYCLE_EVENT_TYPE_STARTING = 1; 43 public static final int USER_LIFECYCLE_EVENT_TYPE_SWITCHING = 2; 44 public static final int USER_LIFECYCLE_EVENT_TYPE_UNLOCKING = 3; 45 public static final int USER_LIFECYCLE_EVENT_TYPE_UNLOCKED = 4; 46 public static final int USER_LIFECYCLE_EVENT_TYPE_STOPPING = 5; 47 public static final int USER_LIFECYCLE_EVENT_TYPE_STOPPED = 6; 48 49 // CarService Constants 50 public static final String CAR_SERVICE_INTERFACE = "android.car.ICar"; 51 52 @IntDef(prefix = { "USER_LIFECYCLE_EVENT_TYPE_" }, value = { 53 USER_LIFECYCLE_EVENT_TYPE_STARTING, 54 USER_LIFECYCLE_EVENT_TYPE_SWITCHING, 55 USER_LIFECYCLE_EVENT_TYPE_UNLOCKING, 56 USER_LIFECYCLE_EVENT_TYPE_UNLOCKED, 57 USER_LIFECYCLE_EVENT_TYPE_STOPPING, 58 USER_LIFECYCLE_EVENT_TYPE_STOPPED, 59 }) 60 @Retention(RetentionPolicy.SOURCE) 61 public @interface UserLifecycleEventType{} 62 } 63