diff options
author | yueg <yueg@google.com> | 2018-03-06 15:16:25 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-06 15:24:26 -0800 |
commit | 1221ed57328714d85bb53d1b9a5351cc6519943e (patch) | |
tree | c23486da15d55a393e6670e0d3f0dbfeab83f3bd | |
parent | abd0dcd67ce2f448dab26cbb11de6263ba40e1cf (diff) |
Make user able to set default sim when there is no account.
Test: CallingAccountSelectorTest, manual
PiperOrigin-RevId: 188089149
Change-Id: Id1be88124e243e46ac9b0277f40de142af6bb5a9
-rw-r--r-- | java/com/android/dialer/precall/impl/CallingAccountSelector.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/java/com/android/dialer/precall/impl/CallingAccountSelector.java b/java/com/android/dialer/precall/impl/CallingAccountSelector.java index 43f668084..afc1eadf1 100644 --- a/java/com/android/dialer/precall/impl/CallingAccountSelector.java +++ b/java/com/android/dialer/precall/impl/CallingAccountSelector.java @@ -355,7 +355,8 @@ public class CallingAccountSelector implements PreCallAction { while (cursor.moveToNext()) { Optional<String> accountType = getAccountType(context.getContentResolver(), cursor.getLong(0)); - if (!accountType.isPresent() || !validAccountTypes.contains(accountType.get())) { + if (accountType.isPresent() && !validAccountTypes.contains(accountType.get())) { + // Empty accountType is treated as writable LogUtil.i("CallingAccountSelector.getDataId", "ignoring non-writable " + accountType); continue; } |