Merge "[Settings] Support getSystemService(Class<T>)" am: 513da92357 am: 5734490d23 am: 8cd695efea am: 6a4d7b65d0
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1639943 Change-Id: I258f0eabc6f9ac714940e66aaf3d316386635000
This commit is contained in:
@@ -445,6 +445,13 @@ public abstract class SettingsPreferenceFragment extends InstrumentedPreferenceF
|
|||||||
return getActivity().getSystemService(name);
|
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.
|
* Returns the PackageManager from the owning Activity.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user