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/blocking/FilteredNumbersUtil.java | |
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/blocking/FilteredNumbersUtil.java')
-rw-r--r-- | java/com/android/dialer/blocking/FilteredNumbersUtil.java | 14 |
1 files changed, 9 insertions, 5 deletions
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(); |