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

Commit 194af563 authored by Bonian Chen's avatar Bonian Chen Committed by Gerrit Code Review
Browse files

Merge changes from topic "revert-1645152-getSystemService(Class<T>)-KMFSZZGDPU"

* changes:
  Revert "[Settings] Support getSystemService(Class<T>)"
  Revert "[Settings] Convert to getSystemService(Class<T>)"
parents 2cd0b0aa 2b195b43
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -438,13 +438,6 @@ public abstract class SettingsPreferenceFragment extends InstrumentedPreferenceF
        return getActivity().getSystemService(name);
    }

    /**
     * Returns the specified system service from the owning Activity.
     */
    protected <T> T getSystemService(final Class<T> serviceClass) {
        return getActivity().getSystemService(serviceClass);
    }

    /**
     * Returns the PackageManager from the owning Activity.
     */
+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 = context.getSystemService(WifiManager.class);
        mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
        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 = getSystemService(StorageManager.class);
            StorageManager sm = (StorageManager) getSystemService(STORAGE_SERVICE);

            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 = getActivity().getSystemService(
                    UserManager.class);
            final UserManager userManager = (UserManager) getActivity().getSystemService(
                    Context.USER_SERVICE);
            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 = mContext.getSystemService(UserManager.class);
        mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
        initializeAdminPermissions();
    }

Loading