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 android.car.user; 18 19 /** 20 * Defines status for common result objects. 21 */ 22 final class CommonResults { 23 24 /** 25 * Operation was is successful for both HAL and Android. 26 */ 27 public static final int STATUS_SUCCESSFUL = 1; 28 29 /** 30 * Operation failed on Android. 31 */ 32 public static final int STATUS_ANDROID_FAILURE = 2; 33 34 /** 35 * Operation failed on HAL. 36 */ 37 public static final int STATUS_HAL_FAILURE = 3; 38 39 /** 40 * Operation failed due to an error communication with HAL (like timeout). 41 */ 42 public static final int STATUS_HAL_INTERNAL_FAILURE = 4; 43 44 /** 45 * Operation failed due to invalid request. 46 */ 47 public static final int STATUS_INVALID_REQUEST = 5; 48 49 /** 50 * Operation failed because of driving safety UX restrictions. 51 */ 52 public static final int STATUS_UX_RESTRICTION_FAILURE = 6; 53 54 /** 55 * Reference for common status - anything higher than this can be used for custom status 56 */ 57 static final int LAST_COMMON_STATUS = 100; 58 CommonResults()59 private CommonResults() { 60 throw new UnsupportedOperationException(); 61 } 62 } 63