• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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.bluetooth.btservice;
18 
19 import com.android.bluetooth.a2dp.A2dpService;
20 import com.android.bluetooth.avrcp.AvrcpTargetService;
21 import com.android.bluetooth.bas.BatteryService;
22 import com.android.bluetooth.bass_client.BassClientService;
23 import com.android.bluetooth.csip.CsipSetCoordinatorService;
24 import com.android.bluetooth.hap.HapClientService;
25 import com.android.bluetooth.hearingaid.HearingAidService;
26 import com.android.bluetooth.hfp.HeadsetService;
27 import com.android.bluetooth.hid.HidDeviceService;
28 import com.android.bluetooth.hid.HidHostService;
29 import com.android.bluetooth.le_audio.LeAudioService;
30 import com.android.bluetooth.mcp.McpService;
31 import com.android.bluetooth.pan.PanService;
32 import com.android.bluetooth.vc.VolumeControlService;
33 
34 // Factory class to create instances of static services. Useful in mocking the service objects.
35 public class ServiceFactory {
getA2dpService()36     public A2dpService getA2dpService() {
37         return A2dpService.getA2dpService();
38     }
39 
getCsipSetCoordinatorService()40     public CsipSetCoordinatorService getCsipSetCoordinatorService() {
41         return CsipSetCoordinatorService.getCsipSetCoordinatorService();
42     }
43 
getHeadsetService()44     public HeadsetService getHeadsetService() {
45         return HeadsetService.getHeadsetService();
46     }
47 
getHidHostService()48     public HidHostService getHidHostService() {
49         return HidHostService.getHidHostService();
50     }
51 
getHidDeviceService()52     public HidDeviceService getHidDeviceService() {
53         return HidDeviceService.getHidDeviceService();
54     }
55 
getPanService()56     public PanService getPanService() {
57         return PanService.getPanService();
58     }
59 
getHearingAidService()60     public HearingAidService getHearingAidService() {
61         return HearingAidService.getHearingAidService();
62     }
63 
getLeAudioService()64     public LeAudioService getLeAudioService() {
65         return LeAudioService.getLeAudioService();
66     }
67 
getAvrcpTargetService()68     public AvrcpTargetService getAvrcpTargetService() {
69         return AvrcpTargetService.get();
70     }
71 
getMcpService()72     public McpService getMcpService() {
73         return McpService.getMcpService();
74     }
75 
getVolumeControlService()76     public VolumeControlService getVolumeControlService() {
77         return VolumeControlService.getVolumeControlService();
78     }
79 
getHapClientService()80     public HapClientService getHapClientService() {
81         return HapClientService.getHapClientService();
82     }
83 
getBassClientService()84     public BassClientService getBassClientService() {
85         return BassClientService.getBassClientService();
86     }
87 
getBatteryService()88     public BatteryService getBatteryService() {
89         return BatteryService.getBatteryService();
90     }
91 }
92