From 3d8361cc8979a55bc823c94e407d7c40e5566221 Mon Sep 17 00:00:00 2001 From: Trevor Terris Date: Tue, 4 May 2021 11:25:34 -0400 Subject: [PATCH] Reduce visibility of Util method --- .../inputmethod/latin/utils/DeviceProtectedUtils.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/dslul/openboard/inputmethod/latin/utils/DeviceProtectedUtils.java b/app/src/main/java/org/dslul/openboard/inputmethod/latin/utils/DeviceProtectedUtils.java index fad38fdb6..1f531b72b 100644 --- a/app/src/main/java/org/dslul/openboard/inputmethod/latin/utils/DeviceProtectedUtils.java +++ b/app/src/main/java/org/dslul/openboard/inputmethod/latin/utils/DeviceProtectedUtils.java @@ -24,7 +24,11 @@ public final class DeviceProtectedUtils { 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) { return deviceProtectedContext; } @@ -33,10 +37,6 @@ public final class DeviceProtectedUtils { return deviceProtectedContext; } - public static SharedPreferences getSharedPreferences(final Context context) { - return PreferenceManager.getDefaultSharedPreferences(getContext(context)); - } - private DeviceProtectedUtils() { // This utility class is not publicly instantiable. }