Fix a NPE when displaying device detail page.
Bug: 68956750 Test: robotests Change-Id: I1eed4e07ad723ee787a333ae88cd2ced62b3d34f
This commit is contained in:
@@ -37,7 +37,7 @@ import org.mockito.MockitoAnnotations;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
|
||||
public class BluetoothDetailsControllerTestBase {
|
||||
protected Context mContext = RuntimeEnvironment.application;
|
||||
protected Context mContext;
|
||||
protected Lifecycle mLifecycle;
|
||||
protected DeviceConfig mDeviceConfig;
|
||||
protected BluetoothDevice mDevice;
|
||||
@@ -58,6 +58,7 @@ public class BluetoothDetailsControllerTestBase {
|
||||
@Before
|
||||
public void setUp() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
mContext = RuntimeEnvironment.application;
|
||||
mPreferenceManager = new PreferenceManager(mContext);
|
||||
mScreen = mPreferenceManager.createPreferenceScreen(mContext);
|
||||
mDeviceConfig = makeDefaultDeviceConfig();
|
||||
|
Reference in New Issue
Block a user