blob: adcc754687e62f3187b7d5f2dbb14a40fc00efad [file] [log] [blame]
Pavel Maltsev634e1ff2016-07-14 15:41:26 -07001/*
2 * Copyright (C) 2016 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
17package com.android.car.hal;
18
19import com.android.car.vehiclenetwork.VehiclePropValueUtil;
20
21/**
22 * Implementation of {@link HalServiceBase} that responsible for custom properties that were defined
23 * by OEMs.
24 */
25/*package*/ class VendorExtensionHalService extends PropertyHalServiceBase {
26
27 private final static String TAG = VendorExtensionHalService.class.getSimpleName();
Vitalii Tomkiv1b1247b2016-09-30 11:27:19 -070028 private final static boolean DEBUG = false;
Pavel Maltsev634e1ff2016-07-14 15:41:26 -070029
30 VendorExtensionHalService(VehicleHal vehicleHal) {
31 super(vehicleHal, TAG, DEBUG);
32 }
33
34 @Override
35 protected int managerToHalPropId(int managerPropId) {
36 return VehiclePropValueUtil.isCustomProperty(managerPropId)
37 ? managerPropId : NOT_SUPPORTED_PROPERTY;
38 }
39
40 @Override
41 protected int halToManagerPropId(int halPropId) {
42 return VehiclePropValueUtil.isCustomProperty(halPropId)
43 ? halPropId : NOT_SUPPORTED_PROPERTY;
44 }
45}