1 /* 2 * Copyright (C) 2018 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.settings; 18 19 import android.car.Car; 20 import android.car.CarManagerBase; 21 import android.os.IBinder; 22 import android.os.RemoteException; 23 24 /** 25 * Manager that exposes car configuration values that are stored on the system. 26 * 27 * @deprecated The {@code CarConfigurationManager} is no longer supported and will be removed. 28 */ 29 @Deprecated 30 public class CarConfigurationManager extends CarManagerBase { 31 private static final String TAG = "CarConfigurationManager"; 32 33 private final ICarConfigurationManager mConfigurationService; 34 35 /** @hide */ CarConfigurationManager(Car car, IBinder service)36 public CarConfigurationManager(Car car, IBinder service) { 37 super(car); 38 mConfigurationService = ICarConfigurationManager.Stub.asInterface(service); 39 } 40 41 /** 42 * Returns a configuration for Speed Bump that will determine when it kicks in. 43 * 44 * @return A {@link SpeedBumpConfiguration} that contains the configuration values. 45 */ getSpeedBumpConfiguration()46 public SpeedBumpConfiguration getSpeedBumpConfiguration() { 47 try { 48 return mConfigurationService.getSpeedBumpConfiguration(); 49 } catch (RemoteException e) { 50 return handleRemoteExceptionFromCarService(e, null); 51 } 52 } 53 54 /** @hide */ 55 @Override onCarDisconnected()56 public void onCarDisconnected() { 57 // Nothing to release. 58 } 59 } 60