Merge "Fix WifiTetherSettingsTest failed" into sc-dev
This commit is contained in:
@@ -83,7 +83,7 @@ public class WifiTetherSettingsTest {
|
|||||||
.when(mContext).getSystemService(ConnectivityManager.class);
|
.when(mContext).getSystemService(ConnectivityManager.class);
|
||||||
doReturn(mTetheringManager).when(mContext).getSystemService(TetheringManager.class);
|
doReturn(mTetheringManager).when(mContext).getSystemService(TetheringManager.class);
|
||||||
doReturn(WIFI_REGEXS).when(mTetheringManager).getTetherableWifiRegexs();
|
doReturn(WIFI_REGEXS).when(mTetheringManager).getTetherableWifiRegexs();
|
||||||
doReturn(mUserManager).when(mContext).getSystemService(UserManager.class);
|
doReturn(mUserManager).when(mContext).getSystemService(Context.USER_SERVICE);
|
||||||
|
|
||||||
mWifiTetherSettings = new WifiTetherSettings();
|
mWifiTetherSettings = new WifiTetherSettings();
|
||||||
}
|
}
|
||||||
@@ -133,7 +133,7 @@ public class WifiTetherSettingsTest {
|
|||||||
when(settings.getContext()).thenReturn(mContext);
|
when(settings.getContext()).thenReturn(mContext);
|
||||||
final Resources.Theme theme = mContext.getTheme();
|
final Resources.Theme theme = mContext.getTheme();
|
||||||
when(activity.getTheme()).thenReturn(theme);
|
when(activity.getTheme()).thenReturn(theme);
|
||||||
when(activity.getSystemService(UserManager.class)).thenReturn(mUserManager);
|
when(activity.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
|
||||||
doNothing().when(settings)
|
doNothing().when(settings)
|
||||||
.onCreatePreferences(any(Bundle.class), nullable(String.class));
|
.onCreatePreferences(any(Bundle.class), nullable(String.class));
|
||||||
final FakeFeatureFactory fakeFeatureFactory = FakeFeatureFactory.setupForTest();
|
final FakeFeatureFactory fakeFeatureFactory = FakeFeatureFactory.setupForTest();
|
||||||
|
Reference in New Issue
Block a user