• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 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 package android.car.oem;
17 
18 import android.annotation.NonNull;
19 
20 import java.io.PrintWriter;
21 
22 /**
23  * This code will be running as part of the OEM Service. This implements
24  * {@code IOemCarAudioVolumeService} as hidden class. It is exposed as IBinder from {@link
25  * OemCarService#getOemAudioVolumeService()}
26  *
27  * @hide
28  */
29 final class OemCarAudioVolumeServiceImpl extends IOemCarAudioVolumeService.Stub
30         implements OemCarServiceComponent {
31 
32     private final OemCarAudioVolumeService mOemCarAudioVolumeService;
33 
OemCarAudioVolumeServiceImpl( @onNull OemCarAudioVolumeService oemCarAudioVolumeService)34     OemCarAudioVolumeServiceImpl(
35             @NonNull OemCarAudioVolumeService oemCarAudioVolumeService) {
36         mOemCarAudioVolumeService = oemCarAudioVolumeService;
37     }
38 
39     @Override
40     @NonNull
getSuggestedGroupForVolumeChange( @onNull OemCarAudioVolumeRequest requestInfo, int volumeAdjustment)41     public OemCarVolumeChangeInfo getSuggestedGroupForVolumeChange(
42             @NonNull OemCarAudioVolumeRequest requestInfo, int volumeAdjustment) {
43         return mOemCarAudioVolumeService.getSuggestedGroupForVolumeChange(requestInfo,
44                 volumeAdjustment);
45     }
46 
47     @Override
init()48     public void init() {
49         mOemCarAudioVolumeService.init();
50     }
51 
52     @Override
release()53     public void release() {
54         mOemCarAudioVolumeService.release();
55     }
56 
57     @Override
dump(PrintWriter writer, String[] args)58     public void dump(PrintWriter writer, String[] args) {
59         mOemCarAudioVolumeService.dump(writer, args);
60     }
61 
62     @Override
onCarServiceReady()63     public void onCarServiceReady() {
64         mOemCarAudioVolumeService.onCarServiceReady();
65     }
66 }
67