summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-03-07 00:51:21 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-03-07 00:51:21 +0000
commit43b6a3ffe8953ec4efba356f863aabbcddcc3b45 (patch)
treec23486da15d55a393e6670e0d3f0dbfeab83f3bd /java
parentabd0dcd67ce2f448dab26cbb11de6263ba40e1cf (diff)
parent1221ed57328714d85bb53d1b9a5351cc6519943e (diff)
Merge "Make user able to set default sim when there is no account."
Diffstat (limited to 'java')
-rw-r--r--java/com/android/dialer/precall/impl/CallingAccountSelector.java3
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;
}