Merge "Remove context from BluetoothFeatureProviderImpl" into main
This commit is contained in:
@@ -18,7 +18,6 @@ package com.android.settings.bluetooth;
|
||||
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
|
||||
import com.android.settingslib.bluetooth.BluetoothUtils;
|
||||
@@ -30,8 +29,6 @@ import java.util.List;
|
||||
*/
|
||||
public class BluetoothFeatureProviderImpl implements BluetoothFeatureProvider {
|
||||
|
||||
public BluetoothFeatureProviderImpl(Context context) {}
|
||||
|
||||
@Override
|
||||
public Uri getBluetoothDeviceSettingsUri(BluetoothDevice bluetoothDevice) {
|
||||
final byte[] uriByte = bluetoothDevice.getMetadata(
|
||||
|
@@ -145,7 +145,7 @@ open class FeatureFactoryImpl : FeatureFactory() {
|
||||
override fun getContextualCardFeatureProvider(context: Context) = contextualCardFeatureProvider
|
||||
|
||||
override val bluetoothFeatureProvider: BluetoothFeatureProvider by lazy {
|
||||
BluetoothFeatureProviderImpl(appContext)
|
||||
BluetoothFeatureProviderImpl()
|
||||
}
|
||||
|
||||
override val faceFeatureProvider: FaceFeatureProvider by lazy { FaceFeatureProviderImpl() }
|
||||
|
@@ -28,7 +28,6 @@ import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class BluetoothFeatureProviderImplTest {
|
||||
@@ -47,8 +46,7 @@ public class BluetoothFeatureProviderImplTest {
|
||||
public void setUp() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
|
||||
mBluetoothFeatureProvider = new BluetoothFeatureProviderImpl(
|
||||
RuntimeEnvironment.application);
|
||||
mBluetoothFeatureProvider = new BluetoothFeatureProviderImpl();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user