mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-16 15:02:48 +00:00
Reduce visibility of Util method
This commit is contained in:
parent
928519392f
commit
3d8361cc89
1 changed files with 5 additions and 5 deletions
|
@ -24,7 +24,11 @@ public final class DeviceProtectedUtils {
|
||||||
|
|
||||||
private static Context deviceProtectedContext;
|
private static Context deviceProtectedContext;
|
||||||
|
|
||||||
public static Context getContext(final Context context) {
|
public static SharedPreferences getSharedPreferences(final Context context) {
|
||||||
|
return PreferenceManager.getDefaultSharedPreferences(getDeviceProtectedContext(context));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Context getDeviceProtectedContext(final Context context) {
|
||||||
if (deviceProtectedContext != null) {
|
if (deviceProtectedContext != null) {
|
||||||
return deviceProtectedContext;
|
return deviceProtectedContext;
|
||||||
}
|
}
|
||||||
|
@ -33,10 +37,6 @@ public final class DeviceProtectedUtils {
|
||||||
return deviceProtectedContext;
|
return deviceProtectedContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SharedPreferences getSharedPreferences(final Context context) {
|
|
||||||
return PreferenceManager.getDefaultSharedPreferences(getContext(context));
|
|
||||||
}
|
|
||||||
|
|
||||||
private DeviceProtectedUtils() {
|
private DeviceProtectedUtils() {
|
||||||
// This utility class is not publicly instantiable.
|
// This utility class is not publicly instantiable.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue