summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/postcall
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-05-31 08:53:10 -0700
committerEric Erfanian <erfanian@google.com>2017-05-31 08:53:10 -0700
commit83b20211c3be04a850de3674977deee8e448d17f (patch)
treea596b78feffa5d267b227762a2917da2e3eaf9c1 /java/com/android/dialer/postcall
parentd40e05b9e0d8331a01af64e37730d177b9b948d5 (diff)
Update Dialer to v10 RC45.
This release was created following the instructions at: go/dialer-aosp-release Subsequent dialer releases will follow as O bugs are fixed, until we reach our final RC. Version: 10 Candidate: RC45 Branch: dialer-android_release_branch/153304843.1 dialer-android_20170416.00/dialer-android_20170416.00_RC45 This release contains the following bug fixes since RC39: Bug: 38131932 38302993 38347350 38368993 38395481 62100344 Test: make, on device Change-Id: Ib4af5dcc58c684d51ea1f4628b301e40184b81b3
Diffstat (limited to 'java/com/android/dialer/postcall')
-rw-r--r--java/com/android/dialer/postcall/PostCall.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/java/com/android/dialer/postcall/PostCall.java b/java/com/android/dialer/postcall/PostCall.java
index edc07baf5..586b47395 100644
--- a/java/com/android/dialer/postcall/PostCall.java
+++ b/java/com/android/dialer/postcall/PostCall.java
@@ -20,7 +20,6 @@ import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
-import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import android.support.design.widget.BaseTransientBottomBar.BaseCallback;
import android.support.design.widget.Snackbar;
@@ -101,7 +100,7 @@ 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);
- PreferenceManager.getDefaultSharedPreferences(activity)
+ DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(activity)
.edit()
.remove(KEY_POST_CALL_CALL_DISCONNECT_TIME)
.apply();
@@ -138,14 +137,14 @@ public class PostCall {
activeSnackbar.show();
Logger.get(activity)
.logImpression(DialerImpression.Type.POST_CALL_PROMPT_USER_TO_VIEW_SENT_MESSAGE);
- PreferenceManager.getDefaultSharedPreferences(activity)
+ DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(activity)
.edit()
.remove(KEY_POST_CALL_MESSAGE_SENT)
.apply();
}
public static void onCallDisconnected(Context context, String number, long callConnectedMillis) {
- PreferenceManager.getDefaultSharedPreferences(context)
+ DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context)
.edit()
.putLong(KEY_POST_CALL_CALL_CONNECT_TIME, callConnectedMillis)
.putLong(KEY_POST_CALL_CALL_DISCONNECT_TIME, System.currentTimeMillis())
@@ -154,7 +153,7 @@ public class PostCall {
}
public static void onMessageSent(Context context, String number) {
- PreferenceManager.getDefaultSharedPreferences(context)
+ DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context)
.edit()
.putString(KEY_POST_CALL_CALL_NUMBER, number)
.putBoolean(KEY_POST_CALL_MESSAGE_SENT, true)
@@ -164,7 +163,7 @@ public class PostCall {
private static void clear(Context context) {
activeSnackbar = null;
- PreferenceManager.getDefaultSharedPreferences(context)
+ DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context)
.edit()
.remove(KEY_POST_CALL_CALL_DISCONNECT_TIME)
.remove(KEY_POST_CALL_CALL_NUMBER)
@@ -174,7 +173,8 @@ public class PostCall {
}
private static boolean shouldPromptUserToSendMessage(Context context) {
- SharedPreferences manager = PreferenceManager.getDefaultSharedPreferences(context);
+ SharedPreferences manager =
+ DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context);
long disconnectTimeMillis = manager.getLong(KEY_POST_CALL_CALL_DISCONNECT_TIME, -1);
long connectTimeMillis = manager.getLong(KEY_POST_CALL_CALL_CONNECT_TIME, -1);
@@ -192,13 +192,13 @@ public class PostCall {
}
private static boolean shouldPromptUserToViewSentMessage(Context context) {
- return PreferenceManager.getDefaultSharedPreferences(context)
+ return DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context)
.getBoolean(KEY_POST_CALL_MESSAGE_SENT, false);
}
@Nullable
private static String getPhoneNumber(Context context) {
- return PreferenceManager.getDefaultSharedPreferences(context)
+ return DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context)
.getString(KEY_POST_CALL_CALL_NUMBER, null);
}