1 /* 2 * Copyright (C) 2023 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.systemui.statusbar.connectivity 18 19 import com.android.systemui.qs.tileimpl.QSTileImpl 20 import com.android.systemui.qs.tiles.AirplaneModeTile 21 import com.android.systemui.qs.tiles.BluetoothTile 22 import com.android.systemui.qs.tiles.CastTile 23 import com.android.systemui.qs.tiles.DataSaverTile 24 import com.android.systemui.qs.tiles.HotspotTile 25 import com.android.systemui.qs.tiles.InternetTile 26 import com.android.systemui.qs.tiles.NfcTile 27 import dagger.Binds 28 import dagger.Module 29 import dagger.multibindings.IntoMap 30 import dagger.multibindings.StringKey 31 32 @Module 33 interface ConnectivityModule { 34 35 /** Inject InternetTile into tileMap in QSModule */ 36 @Binds 37 @IntoMap 38 @StringKey(InternetTile.TILE_SPEC) bindInternetTilenull39 fun bindInternetTile(internetTile: InternetTile): QSTileImpl<*> 40 41 /** Inject BluetoothTile into tileMap in QSModule */ 42 @Binds 43 @IntoMap 44 @StringKey(BluetoothTile.TILE_SPEC) 45 fun bindBluetoothTile(bluetoothTile: BluetoothTile): QSTileImpl<*> 46 47 /** Inject CastTile into tileMap in QSModule */ 48 @Binds 49 @IntoMap 50 @StringKey(CastTile.TILE_SPEC) 51 fun bindCastTile(castTile: CastTile): QSTileImpl<*> 52 53 /** Inject HotspotTile into tileMap in QSModule */ 54 @Binds 55 @IntoMap 56 @StringKey(HotspotTile.TILE_SPEC) 57 fun bindHotspotTile(hotspotTile: HotspotTile): QSTileImpl<*> 58 59 /** Inject AirplaneModeTile into tileMap in QSModule */ 60 @Binds 61 @IntoMap 62 @StringKey(AirplaneModeTile.TILE_SPEC) 63 fun bindAirplaneModeTile(airplaneModeTile: AirplaneModeTile): QSTileImpl<*> 64 65 /** Inject DataSaverTile into tileMap in QSModule */ 66 @Binds 67 @IntoMap 68 @StringKey(DataSaverTile.TILE_SPEC) 69 fun bindDataSaverTile(dataSaverTile: DataSaverTile): QSTileImpl<*> 70 71 /** Inject NfcTile into tileMap in QSModule */ 72 @Binds @IntoMap @StringKey(NfcTile.TILE_SPEC) fun bindNfcTile(nfcTile: NfcTile): QSTileImpl<*> 73 } 74