diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-10-27 17:21:27 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-10-27 17:21:27 +0000 |
commit | 4499718cc171a6c79e03fc53e139efaf4d8ba6f8 (patch) | |
tree | c830e73232470fc7498ffe3853c0428274e2194f /java/com/android/dialer/storage | |
parent | f60c5384f34660ae03ae3c15183980dfb8219ba9 (diff) | |
parent | 5d8ed9309625302dee3407b320a52f2b7f30227f (diff) |
Merge changes I6e17c1cc,If00f7e91,Ia89d5d85
* changes:
Fix HOLD option not displayed in voice calls in CDMA + GSM.
Use string concatenation for CREATE_TABLE_SQL instead of StringBuilder()
Move the functionality of DialerUtils#getDefaultSharedPreferenceForDeviceProtectedStorageContext(Context) to StorageComponent.
Diffstat (limited to 'java/com/android/dialer/storage')
-rw-r--r-- | java/com/android/dialer/storage/StorageComponent.java | 6 | ||||
-rw-r--r-- | java/com/android/dialer/storage/StorageModule.java | 4 |
2 files changed, 6 insertions, 4 deletions
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); |