Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13fb77c6 authored by Bonian Chen's avatar Bonian Chen Committed by Gerrit Code Review
Browse files

Merge "[Settings] Convert to getSystemService(Class<T>)"

parents 513da923 db6c4775
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ public class DeviceNamePreferenceController extends BasePreferenceController
    public DeviceNamePreferenceController(Context context, String key) {
        super(context, key);

        mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
        mWifiManager = context.getSystemService(WifiManager.class);
        mWifiDeviceNameTextValidator = new WifiDeviceNameTextValidator();
        mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();

+1 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ public class StorageWizardMigrateConfirm extends StorageWizardBase {
        try {
            moveId = getPackageManager().movePrimaryStorage(mVolume);
        } catch (IllegalArgumentException e) {
            StorageManager sm = (StorageManager) getSystemService(STORAGE_SERVICE);
            StorageManager sm = getSystemService(StorageManager.class);

            if (Objects.equals(mVolume.getFsUuid(), sm.getPrimaryStorageVolume().getUuid())) {
                final Intent intent = new Intent(this, StorageWizardReady.class);
+2 −2
Original line number Diff line number Diff line
@@ -146,8 +146,8 @@ public class MyDeviceInfoFragment extends DashboardFragment
        // TODO: There may be an avatar setting action we can use here.
        final int iconId = bundle.getInt("icon_id", 0);
        if (iconId == 0) {
            final UserManager userManager = (UserManager) getActivity().getSystemService(
                    Context.USER_SERVICE);
            final UserManager userManager = getActivity().getSystemService(
                    UserManager.class);
            final UserInfo info = Utils.getExistingUser(userManager,
                    android.os.Process.myUserHandle());
            controller.setLabel(info.name);
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ public class FirmwareVersionDetailPreferenceController extends BasePreferenceCon

    public FirmwareVersionDetailPreferenceController(Context context, String key) {
        super(context, key);
        mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
        mUserManager = mContext.getSystemService(UserManager.class);
        initializeAdminPermissions();
    }

+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ public class ImeiInfoPreferenceController extends BasePreferenceController {

    public ImeiInfoPreferenceController(Context context, String key) {
        super(context, key);
        mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
        mTelephonyManager = context.getSystemService(TelephonyManager.class);
        mIsMultiSim = mTelephonyManager.getPhoneCount() > 1;
    }

Loading