Revert "[Settings] Support getSystemService(Class<T>)"
This reverts commit d5ccde31a8
.
Reason for revert: failure on test cases
Change-Id: I0a179a6ebb5ef1dec566ce6e8facd5f3b82d7c8a
This commit is contained in:
@@ -42,7 +42,7 @@ public class AddDevicePreferenceController2 extends BasePreferenceController {
|
||||
public AddDevicePreferenceController2(Context context) {
|
||||
super(context, KEY_ADD_DEVICE);
|
||||
|
||||
mWifiManager = context.getSystemService(WifiManager.class);
|
||||
mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
|
||||
}
|
||||
|
||||
public void setWifiEntry(WifiEntry wifiEntry) {
|
||||
|
@@ -143,8 +143,8 @@ public class WifiNetworkDetailsFragment2 extends DashboardFragment implements
|
||||
if (admin == null) {
|
||||
final DevicePolicyManager dpm = (DevicePolicyManager)
|
||||
getContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
|
||||
final UserManager um =
|
||||
getContext().getSystemService(UserManager.class);
|
||||
final UserManager um = (UserManager)
|
||||
getContext().getSystemService(Context.USER_SERVICE);
|
||||
final int profileOwnerUserId = Utils.getManagedProfileId(
|
||||
um, UserHandle.myUserId());
|
||||
if (profileOwnerUserId != UserHandle.USER_NULL) {
|
||||
|
@@ -45,7 +45,7 @@ public class WifiPrivacyPreferenceController2 extends BasePreferenceController i
|
||||
public WifiPrivacyPreferenceController2(Context context) {
|
||||
super(context, KEY_WIFI_PRIVACY);
|
||||
|
||||
mWifiManager = context.getSystemService(WifiManager.class);
|
||||
mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
|
||||
}
|
||||
|
||||
public void setWifiEntry(WifiEntry wifiEntry) {
|
||||
|
Reference in New Issue
Block a user