From 541c2e5cac52f6e645d83fd6f97fa348a83d9160 Mon Sep 17 00:00:00 2001 From: twyen Date: Thu, 10 May 2018 14:54:55 -0700 Subject: Revert null check on dialpadHint This is caused by apps modifying dialer resources. TEST=TAP Bug: 79441501 Test: TAP PiperOrigin-RevId: 196175830 Change-Id: Ia42e8debe66adbaa2e4e7bdfea7bafe1ef7372bf --- .../android/dialer/configprovider/SharedPrefConfigProvider.java | 4 ++++ java/com/android/dialer/dialpadview/DialpadFragment.java | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/java/com/android/dialer/configprovider/SharedPrefConfigProvider.java b/java/com/android/dialer/configprovider/SharedPrefConfigProvider.java index 54e9c9aff..c68312f56 100644 --- a/java/com/android/dialer/configprovider/SharedPrefConfigProvider.java +++ b/java/com/android/dialer/configprovider/SharedPrefConfigProvider.java @@ -102,6 +102,10 @@ public class SharedPrefConfigProvider implements ConfigProvider { sharedPreferences.edit().putLong(PREF_PREFIX + key, value).apply(); } + public void putString(String key, String value) { + sharedPreferences.edit().putString(PREF_PREFIX + key, value).apply(); + } + @Override public String getString(String key, String defaultValue) { // Reading shared prefs on the main thread is generally safe since a single instance is cached. diff --git a/java/com/android/dialer/dialpadview/DialpadFragment.java b/java/com/android/dialer/dialpadview/DialpadFragment.java index d48870dfc..8fb7533f4 100644 --- a/java/com/android/dialer/dialpadview/DialpadFragment.java +++ b/java/com/android/dialer/dialpadview/DialpadFragment.java @@ -478,12 +478,7 @@ public class DialpadFragment extends Fragment } digits.setContentDescription(null); - // TOOD(77908301): Investigate why this is the case - // It's not clear why digitsHint would be null when digits is initialized as the time, so adding - // a todo to investigate why. - if (digitsHint != null) { - digitsHint.setVisibility(View.GONE); - } + digitsHint.setVisibility(View.GONE); } /** -- cgit v1.2.3