From 8833bb61d2c097ef48755d7b0bb2cc4d336308a3 Mon Sep 17 00:00:00 2001 From: timhypeng Date: Fri, 3 Aug 2018 16:53:26 +0800 Subject: [PATCH] remove unnecessary mock in BluetoothDeviceUpdaterTest Bug: 111848213 Test: make -j50 RunSettingsRoboTests Change-Id: If1c46614ec6e40c66eb121cc48caa1fbc9c39871 --- .../settings/bluetooth/BluetoothDeviceUpdaterTest.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tests/robotests/src/com/android/settings/bluetooth/BluetoothDeviceUpdaterTest.java b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDeviceUpdaterTest.java index a5422e71ce..9f81711c88 100644 --- a/tests/robotests/src/com/android/settings/bluetooth/BluetoothDeviceUpdaterTest.java +++ b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDeviceUpdaterTest.java @@ -30,11 +30,8 @@ import com.android.settings.SettingsActivity; import com.android.settings.connecteddevice.DevicePreferenceCallback; import com.android.settings.dashboard.DashboardFragment; import com.android.settings.testutils.SettingsRobolectricTestRunner; -import com.android.settingslib.bluetooth.A2dpProfile; import com.android.settingslib.bluetooth.CachedBluetoothDevice; -import com.android.settingslib.bluetooth.HeadsetProfile; import com.android.settingslib.bluetooth.LocalBluetoothManager; -import com.android.settingslib.bluetooth.LocalBluetoothProfileManager; import org.junit.Before; import org.junit.Test; @@ -61,12 +58,6 @@ public class BluetoothDeviceUpdaterTest { private SettingsActivity mSettingsActivity; @Mock private LocalBluetoothManager mLocalManager; - @Mock - private LocalBluetoothProfileManager mLocalBluetoothProfileManager; - @Mock - private HeadsetProfile mHeadsetProfile; - @Mock - private A2dpProfile mA2dpProfile; private Context mContext; private BluetoothDeviceUpdater mBluetoothDeviceUpdater; @@ -79,9 +70,6 @@ public class BluetoothDeviceUpdaterTest { mContext = RuntimeEnvironment.application; doReturn(mContext).when(mDashboardFragment).getContext(); when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); - when(mLocalManager.getProfileManager()).thenReturn(mLocalBluetoothProfileManager); - when(mLocalBluetoothProfileManager.getHeadsetProfile()).thenReturn(mHeadsetProfile); - when(mLocalBluetoothProfileManager.getA2dpProfile()).thenReturn(mA2dpProfile); mPreference = new BluetoothDevicePreference(mContext, mCachedBluetoothDevice, false); mBluetoothDeviceUpdater = -- 2.11.0