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

Commit 6a4d7b65 authored by Bonian Chen's avatar Bonian Chen Committed by Automerger Merge Worker
Browse files

Merge "[Settings] Support getSystemService(Class<T>)" am: 513da923 am: 5734490d am: 8cd695ef

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1639943

Change-Id: I905f9d1646a9d9ea70e42c4b5368ff983611bee3
parents 9e07eab0 8cd695ef
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -445,6 +445,13 @@ 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.
     */