diff options
Diffstat (limited to 'java/com/android/dialer')
13 files changed, 83 insertions, 87 deletions
diff --git a/java/com/android/dialer/app/DialtactsActivity.java b/java/com/android/dialer/app/DialtactsActivity.java index b5ec20246..1dd852487 100644 --- a/java/com/android/dialer/app/DialtactsActivity.java +++ b/java/com/android/dialer/app/DialtactsActivity.java @@ -129,6 +129,7 @@ import com.android.dialer.simulator.Simulator; import com.android.dialer.simulator.SimulatorComponent; import com.android.dialer.smartdial.SmartDialNameMatcher; import com.android.dialer.smartdial.SmartDialPrefix; +import com.android.dialer.storage.StorageComponent; import com.android.dialer.telecom.TelecomUtil; import com.android.dialer.util.DialerUtils; import com.android.dialer.util.PermissionsUtil; @@ -637,7 +638,8 @@ public class DialtactsActivity extends TransactionSafeActivity && !getSystemService(KeyguardManager.class).isKeyguardLocked()) { mListsFragment.markMissedCallsAsReadAndRemoveNotifications(); } - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(this) + StorageComponent.get(this) + .unencryptedSharedPrefs() .edit() .putInt(KEY_LAST_TAB, mListsFragment.getCurrentTabIndex()) .apply(); @@ -1117,7 +1119,8 @@ public class DialtactsActivity extends TransactionSafeActivity } else if (isLastTabEnabled) { @TabIndex int tabIndex = - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(this) + StorageComponent.get(this) + .unencryptedSharedPrefs() .getInt(KEY_LAST_TAB, DialtactsPagerAdapter.TAB_INDEX_SPEED_DIAL); // If voicemail tab is saved and its availability changes, we still move to the voicemail tab // but it is quickly removed and shown the contacts tab. diff --git a/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java b/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java index 0a6f2c156..3ce837b8c 100644 --- a/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java +++ b/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java @@ -33,7 +33,7 @@ import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.common.PerAccountSharedPreferences; import com.android.dialer.compat.telephony.TelephonyManagerCompat; -import com.android.dialer.util.DialerUtils; +import com.android.dialer.storage.StorageComponent; import com.android.voicemail.VoicemailClient; import com.android.voicemail.VoicemailComponent; @@ -140,8 +140,6 @@ public class LegacyVoicemailNotificationReceiver extends BroadcastReceiver { static PerAccountSharedPreferences getSharedPreferences( Context context, PhoneAccountHandle phoneAccountHandle) { return new PerAccountSharedPreferences( - context, - phoneAccountHandle, - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context)); + context, phoneAccountHandle, StorageComponent.get(context).unencryptedSharedPrefs()); } } diff --git a/java/com/android/dialer/blocking/FilteredNumbersUtil.java b/java/com/android/dialer/blocking/FilteredNumbersUtil.java index fba3b86db..6433355fd 100644 --- a/java/com/android/dialer/blocking/FilteredNumbersUtil.java +++ b/java/com/android/dialer/blocking/FilteredNumbersUtil.java @@ -37,7 +37,7 @@ import com.android.dialer.logging.InteractionEvent; import com.android.dialer.logging.Logger; import com.android.dialer.notification.DialerNotificationManager; import com.android.dialer.notification.NotificationChannelId; -import com.android.dialer.util.DialerUtils; +import com.android.dialer.storage.StorageComponent; import com.android.dialer.util.PermissionsUtil; import java.util.concurrent.TimeUnit; @@ -187,7 +187,8 @@ public class FilteredNumbersUtil { } public static long getLastEmergencyCallTimeMillis(Context context) { - return DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context) + return StorageComponent.get(context) + .unencryptedSharedPrefs() .getLong(LAST_EMERGENCY_CALL_MS_PREF_KEY, 0); } @@ -210,7 +211,8 @@ public class FilteredNumbersUtil { return; } - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context) + StorageComponent.get(context) + .unencryptedSharedPrefs() .edit() .putLong(LAST_EMERGENCY_CALL_MS_PREF_KEY, System.currentTimeMillis()) .putBoolean(NOTIFIED_CALL_BLOCKING_DISABLED_BY_EMERGENCY_CALL_PREF_KEY, false) @@ -227,7 +229,8 @@ public class FilteredNumbersUtil { return; } // Skip if the user has already received a notification for the most recent emergency call. - if (DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context) + if (StorageComponent.get(context) + .unencryptedSharedPrefs() .getBoolean(NOTIFIED_CALL_BLOCKING_DISABLED_BY_EMERGENCY_CALL_PREF_KEY, false)) { return; } @@ -268,7 +271,8 @@ public class FilteredNumbersUtil { builder.build()); // Record that the user has been notified for this emergency call. - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context) + StorageComponent.get(context) + .unencryptedSharedPrefs() .edit() .putBoolean(NOTIFIED_CALL_BLOCKING_DISABLED_BY_EMERGENCY_CALL_PREF_KEY, true) .apply(); diff --git a/java/com/android/dialer/callcomposer/CallComposerActivity.java b/java/com/android/dialer/callcomposer/CallComposerActivity.java index bad5d7f54..eedf0735c 100644 --- a/java/com/android/dialer/callcomposer/CallComposerActivity.java +++ b/java/com/android/dialer/callcomposer/CallComposerActivity.java @@ -73,8 +73,8 @@ import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; import com.android.dialer.multimedia.MultimediaData; import com.android.dialer.protos.ProtoParsers; +import com.android.dialer.storage.StorageComponent; import com.android.dialer.telecom.TelecomUtil; -import com.android.dialer.util.DialerUtils; import com.android.dialer.util.UriUtils; import com.android.dialer.util.ViewUtil; import com.android.dialer.widget.DialerToolbar; @@ -459,8 +459,7 @@ public class CallComposerActivity extends AppCompatActivity } private void maybeShowPrivacyToast(MultimediaData data) { - SharedPreferences preferences = - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(this); + SharedPreferences preferences = StorageComponent.get(this).unencryptedSharedPrefs(); // Show a toast for privacy purposes if this is the first time a user uses call composer. if (preferences.getBoolean(KEY_IS_FIRST_CALL_COMPOSE, true)) { int privacyMessage = diff --git a/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java b/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java index a6a646655..9fd5bd970 100644 --- a/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java +++ b/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java @@ -32,36 +32,34 @@ class AnnotatedCallLogDatabaseHelper extends SQLiteOpenHelper { this.maxRows = maxRows; } - // TODO(uabdullah): Use concatenation to avoid klippy warnings private static final String CREATE_TABLE_SQL = - new StringBuilder() - .append("create table if not exists " + AnnotatedCallLog.TABLE + " (") - // Common columns. - .append(AnnotatedCallLog._ID + " integer primary key, ") - .append(AnnotatedCallLog.TIMESTAMP + " integer, ") - .append(AnnotatedCallLog.NAME + " string, ") - .append(AnnotatedCallLog.NUMBER + " blob, ") - .append(AnnotatedCallLog.FORMATTED_NUMBER + " string, ") - .append(AnnotatedCallLog.PHOTO_URI + " string, ") - .append(AnnotatedCallLog.PHOTO_ID + " integer, ") - .append(AnnotatedCallLog.LOOKUP_URI + " string, ") - .append(AnnotatedCallLog.DURATION + " integer, ") - .append(AnnotatedCallLog.NUMBER_TYPE_LABEL + " string, ") - .append(AnnotatedCallLog.IS_READ + " integer, ") - .append(AnnotatedCallLog.NEW + " integer, ") - .append(AnnotatedCallLog.GEOCODED_LOCATION + " string, ") - .append(AnnotatedCallLog.PHONE_ACCOUNT_COMPONENT_NAME + " string, ") - .append(AnnotatedCallLog.PHONE_ACCOUNT_ID + " string, ") - .append(AnnotatedCallLog.PHONE_ACCOUNT_LABEL + " string, ") - .append(AnnotatedCallLog.PHONE_ACCOUNT_COLOR + " integer, ") - .append(AnnotatedCallLog.FEATURES + " integer, ") - .append(AnnotatedCallLog.IS_BUSINESS + " integer, ") - .append(AnnotatedCallLog.IS_VOICEMAIL + " integer, ") - .append(AnnotatedCallLog.TRANSCRIPTION + " integer, ") - .append(AnnotatedCallLog.VOICEMAIL_URI + " string, ") - .append(AnnotatedCallLog.CALL_TYPE + " integer") - .append(");") - .toString(); + "create table if not exists " + + AnnotatedCallLog.TABLE + + " (" + + (AnnotatedCallLog._ID + " integer primary key, ") + + (AnnotatedCallLog.TIMESTAMP + " integer, ") + + (AnnotatedCallLog.NAME + " string, ") + + (AnnotatedCallLog.NUMBER + " blob, ") + + (AnnotatedCallLog.FORMATTED_NUMBER + " string, ") + + (AnnotatedCallLog.PHOTO_URI + " string, ") + + (AnnotatedCallLog.PHOTO_ID + " integer, ") + + (AnnotatedCallLog.LOOKUP_URI + " string, ") + + (AnnotatedCallLog.DURATION + " integer, ") + + (AnnotatedCallLog.NUMBER_TYPE_LABEL + " string, ") + + (AnnotatedCallLog.IS_READ + " integer, ") + + (AnnotatedCallLog.NEW + " integer, ") + + (AnnotatedCallLog.GEOCODED_LOCATION + " string, ") + + (AnnotatedCallLog.PHONE_ACCOUNT_COMPONENT_NAME + " string, ") + + (AnnotatedCallLog.PHONE_ACCOUNT_ID + " string, ") + + (AnnotatedCallLog.PHONE_ACCOUNT_LABEL + " string, ") + + (AnnotatedCallLog.PHONE_ACCOUNT_COLOR + " integer, ") + + (AnnotatedCallLog.FEATURES + " integer, ") + + (AnnotatedCallLog.IS_BUSINESS + " integer, ") + + (AnnotatedCallLog.IS_VOICEMAIL + " integer, ") + + (AnnotatedCallLog.TRANSCRIPTION + " integer, ") + + (AnnotatedCallLog.VOICEMAIL_URI + " string, ") + + (AnnotatedCallLog.CALL_TYPE + " integer") + + ");"; /** Deletes all but the first maxRows rows (by timestamp) to keep the table a manageable size. */ // TODO(zachh): Prevent voicemails from being garbage collected. diff --git a/java/com/android/dialer/configprovider/SharedPrefConfigProvider.java b/java/com/android/dialer/configprovider/SharedPrefConfigProvider.java index 53516987d..d700fb676 100644 --- a/java/com/android/dialer/configprovider/SharedPrefConfigProvider.java +++ b/java/com/android/dialer/configprovider/SharedPrefConfigProvider.java @@ -24,8 +24,8 @@ import android.support.annotation.Nullable; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.inject.ApplicationContext; +import com.android.dialer.storage.StorageComponent; import com.android.dialer.strictmode.StrictModeUtils; -import com.android.dialer.util.DialerUtils; import javax.inject.Inject; /** @@ -115,6 +115,6 @@ class SharedPrefConfigProvider implements ConfigProvider { } private static SharedPreferences getSharedPrefs(Context appContext) { - return DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(appContext); + return StorageComponent.get(appContext).unencryptedSharedPrefs(); } } diff --git a/java/com/android/dialer/postcall/PostCall.java b/java/com/android/dialer/postcall/PostCall.java index 011fbc985..341db3b09 100644 --- a/java/com/android/dialer/postcall/PostCall.java +++ b/java/com/android/dialer/postcall/PostCall.java @@ -36,6 +36,7 @@ import com.android.dialer.enrichedcall.EnrichedCallManager; import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; import com.android.dialer.performancereport.PerformanceReport; +import com.android.dialer.storage.StorageComponent; import com.android.dialer.util.DialerUtils; import com.android.dialer.util.IntentUtil; @@ -103,7 +104,8 @@ public class PostCall { activity.getResources().getColor(R.color.dialer_snackbar_action_text_color)); activeSnackbar.show(); Logger.get(activity).logImpression(DialerImpression.Type.POST_CALL_PROMPT_USER_TO_SEND_MESSAGE); - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(activity) + StorageComponent.get(activity) + .unencryptedSharedPrefs() .edit() .remove(KEY_POST_CALL_CALL_DISCONNECT_TIME) .apply(); @@ -141,21 +143,24 @@ public class PostCall { activeSnackbar.show(); Logger.get(activity) .logImpression(DialerImpression.Type.POST_CALL_PROMPT_USER_TO_VIEW_SENT_MESSAGE); - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(activity) + StorageComponent.get(activity) + .unencryptedSharedPrefs() .edit() .remove(KEY_POST_CALL_MESSAGE_SENT) .apply(); } public static void onDisconnectPressed(Context context) { - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context) + StorageComponent.get(context) + .unencryptedSharedPrefs() .edit() .putBoolean(KEY_POST_CALL_DISCONNECT_PRESSED, true) .apply(); } public static void onCallDisconnected(Context context, String number, long callConnectedMillis) { - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context) + StorageComponent.get(context) + .unencryptedSharedPrefs() .edit() .putLong(KEY_POST_CALL_CALL_CONNECT_TIME, callConnectedMillis) .putLong(KEY_POST_CALL_CALL_DISCONNECT_TIME, System.currentTimeMillis()) @@ -164,7 +169,8 @@ public class PostCall { } public static void onMessageSent(Context context, String number) { - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context) + StorageComponent.get(context) + .unencryptedSharedPrefs() .edit() .putString(KEY_POST_CALL_CALL_NUMBER, number) .putBoolean(KEY_POST_CALL_MESSAGE_SENT, true) @@ -177,7 +183,8 @@ public class PostCall { */ public static void restartPerformanceRecordingIfARecentCallExist(Context context) { long disconnectTimeMillis = - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context) + StorageComponent.get(context) + .unencryptedSharedPrefs() .getLong(PostCall.KEY_POST_CALL_CALL_DISCONNECT_TIME, -1); if (disconnectTimeMillis != -1 && PerformanceReport.isRecording()) { PerformanceReport.startRecording(); @@ -187,7 +194,8 @@ public class PostCall { private static void clear(Context context) { activeSnackbar = null; - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context) + StorageComponent.get(context) + .unencryptedSharedPrefs() .edit() .remove(KEY_POST_CALL_CALL_DISCONNECT_TIME) .remove(KEY_POST_CALL_CALL_NUMBER) @@ -198,8 +206,7 @@ public class PostCall { } private static boolean shouldPromptUserToSendMessage(Context context) { - SharedPreferences manager = - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context); + SharedPreferences manager = StorageComponent.get(context).unencryptedSharedPrefs(); long disconnectTimeMillis = manager.getLong(KEY_POST_CALL_CALL_DISCONNECT_TIME, -1); long connectTimeMillis = manager.getLong(KEY_POST_CALL_CALL_CONNECT_TIME, -1); @@ -220,13 +227,15 @@ public class PostCall { } private static boolean shouldPromptUserToViewSentMessage(Context context) { - return DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context) + return StorageComponent.get(context) + .unencryptedSharedPrefs() .getBoolean(KEY_POST_CALL_MESSAGE_SENT, false); } @Nullable private static String getPhoneNumber(Context context) { - return DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context) + return StorageComponent.get(context) + .unencryptedSharedPrefs() .getString(KEY_POST_CALL_CALL_NUMBER, null); } diff --git a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java index c200b946c..cd42a7476 100644 --- a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java +++ b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java @@ -68,6 +68,7 @@ import com.android.dialer.searchfragment.nearbyplaces.NearbyPlacesCursorLoader; import com.android.dialer.searchfragment.remote.RemoteContactsCursorLoader; import com.android.dialer.searchfragment.remote.RemoteDirectoriesCursorLoader; import com.android.dialer.searchfragment.remote.RemoteDirectoriesCursorLoader.Directory; +import com.android.dialer.storage.StorageComponent; import com.android.dialer.util.CallUtil; import com.android.dialer.util.DialerUtils; import com.android.dialer.util.PermissionsUtil; @@ -355,7 +356,8 @@ public final class NewSearchFragment extends Fragment // Should not be called before remote directories (not contacts) have finished loading. private void loadNearbyPlacesCursor() { if (!PermissionsUtil.hasLocationPermissions(getContext()) - && !DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(getContext()) + && !StorageComponent.get(getContext()) + .unencryptedSharedPrefs() .getBoolean(KEY_LOCATION_PROMPT_DISMISSED, false)) { if (adapter != null && isRegularSearch() && !hasBeenDismissed()) { adapter.showLocationPermissionRequest( diff --git a/java/com/android/dialer/storage/StorageComponent.java b/java/com/android/dialer/storage/StorageComponent.java index 51afea70b..067b99424 100644 --- a/java/com/android/dialer/storage/StorageComponent.java +++ b/java/com/android/dialer/storage/StorageComponent.java @@ -25,7 +25,11 @@ import dagger.Subcomponent; @Subcomponent public abstract class StorageComponent { - public abstract @DeviceProtected SharedPreferences deviceProtectedSharedPreferences(); + /** + * Returns unencrypted default shared preferences. This method should not be used for private + * data. + */ + public abstract SharedPreferences unencryptedSharedPrefs(); public static StorageComponent get(Context context) { return ((StorageComponent.HasComponent) diff --git a/java/com/android/dialer/storage/StorageModule.java b/java/com/android/dialer/storage/StorageModule.java index 8c97980c1..3ee72c8d8 100644 --- a/java/com/android/dialer/storage/StorageModule.java +++ b/java/com/android/dialer/storage/StorageModule.java @@ -30,9 +30,7 @@ public class StorageModule { @Provides @Singleton - @DeviceProtected - static SharedPreferences provideDeviceProtectedSharedPreferences( - @ApplicationContext Context appContext) { + static SharedPreferences provideUnencryptedSharedPrefs(@ApplicationContext Context appContext) { // #createDeviceProtectedStorageContext returns a new context each time, so we cache the shared // preferences object in order to avoid accessing disk for every operation. Context deviceProtectedContext = ContextCompat.createDeviceProtectedStorageContext(appContext); diff --git a/java/com/android/dialer/strictmode/StrictModeUtils.java b/java/com/android/dialer/strictmode/StrictModeUtils.java index 5ccd25d93..c07138f81 100644 --- a/java/com/android/dialer/strictmode/StrictModeUtils.java +++ b/java/com/android/dialer/strictmode/StrictModeUtils.java @@ -26,7 +26,7 @@ import android.support.annotation.AnyThread; import android.support.v4.os.UserManagerCompat; import com.android.dialer.buildtype.BuildType; import com.android.dialer.function.Supplier; -import com.android.dialer.util.DialerUtils; +import com.android.dialer.storage.StorageComponent; /** Utilities for enforcing strict-mode in an app. */ public final class StrictModeUtils { @@ -115,7 +115,7 @@ public final class StrictModeUtils { // /data/user_de/0/com.android.dialer/shared_prefs/ // <package_name>_preferences.xml - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(application); + StorageComponent.get(application).unencryptedSharedPrefs(); } private StrictModeUtils() {} diff --git a/java/com/android/dialer/util/DialerUtils.java b/java/com/android/dialer/util/DialerUtils.java index f38c650d3..7f7b9da74 100644 --- a/java/com/android/dialer/util/DialerUtils.java +++ b/java/com/android/dialer/util/DialerUtils.java @@ -21,14 +21,10 @@ import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.Intent; -import android.content.SharedPreferences; import android.graphics.Point; import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.os.Bundle; -import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; import android.telecom.TelecomManager; import android.telephony.TelephonyManager; import android.text.BidiFormatter; @@ -36,9 +32,7 @@ import android.text.TextDirectionHeuristics; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.Toast; -import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; -import com.android.dialer.storage.StorageComponent; import com.android.dialer.telecom.TelecomUtil; import java.io.File; import java.util.Iterator; @@ -223,20 +217,4 @@ public class DialerUtils { } return new File(parentDir, String.valueOf(fileId)); } - - /** - * Returns default preference for context accessing device protected storage. This is used when - * directBoot is enabled (before device unlocked after boot) since the default shared preference - * used normally is not available at this moment for N devices. Returns regular default shared - * preference for pre-N devices. - */ - @NonNull - public static SharedPreferences getDefaultSharedPreferenceForDeviceProtectedStorageContext( - @NonNull Context context) { - Assert.isNotNull(context); - if (ContextCompat.isDeviceProtectedStorage(context)) { - return PreferenceManager.getDefaultSharedPreferences(context); - } - return StorageComponent.get(context.getApplicationContext()).deviceProtectedSharedPreferences(); - } } diff --git a/java/com/android/dialer/util/PermissionsUtil.java b/java/com/android/dialer/util/PermissionsUtil.java index 02ea91093..012b83ff1 100644 --- a/java/com/android/dialer/util/PermissionsUtil.java +++ b/java/com/android/dialer/util/PermissionsUtil.java @@ -40,6 +40,7 @@ import android.support.v4.content.ContextCompat; import android.support.v4.content.LocalBroadcastManager; import android.widget.Toast; import com.android.dialer.common.LogUtil; +import com.android.dialer.storage.StorageComponent; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -221,7 +222,8 @@ public class PermissionsUtil { * @return true if we've already shown the camera privacy toast. */ public static boolean hasCameraPrivacyToastShown(@NonNull Context context) { - return DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context) + return StorageComponent.get(context) + .unencryptedSharedPrefs() .getBoolean(PREFERENCE_CAMERA_ALLOWED_BY_USER, false); } @@ -232,7 +234,8 @@ public class PermissionsUtil { } public static void setCameraPrivacyToastShown(@NonNull Context context) { - DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context) + StorageComponent.get(context) + .unencryptedSharedPrefs() .edit() .putBoolean(PREFERENCE_CAMERA_ALLOWED_BY_USER, true) .apply(); |