diff options
author | twyen <twyen@google.com> | 2018-02-06 14:43:28 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-02-06 14:57:50 -0800 |
commit | de9dde6a0b9362187a9b44c0c2603bf968017064 (patch) | |
tree | 2c66fbd543a3d59d7baa9fd2feb924b7ee22739c /java/com/android/dialer/precall/impl/CallingAccountSelector.java | |
parent | 325a50b527debd7dfe109b21d90c5b5ccd657d40 (diff) |
Fix NPE when querying preferred without an account
Bug: 72986691
Test: Unit tests
PiperOrigin-RevId: 184743227
Change-Id: I2e37c2916ce05a72324f68c4530b7f6f3daf23eb
Diffstat (limited to 'java/com/android/dialer/precall/impl/CallingAccountSelector.java')
-rw-r--r-- | java/com/android/dialer/precall/impl/CallingAccountSelector.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/com/android/dialer/precall/impl/CallingAccountSelector.java b/java/com/android/dialer/precall/impl/CallingAccountSelector.java index f014b270b..43f668084 100644 --- a/java/com/android/dialer/precall/impl/CallingAccountSelector.java +++ b/java/com/android/dialer/precall/impl/CallingAccountSelector.java @@ -388,7 +388,7 @@ public class CallingAccountSelector implements PreCallAction { if (cursor == null || !cursor.moveToFirst()) { return Optional.absent(); } - return Optional.of(cursor.getString(0)); + return Optional.fromNullable(cursor.getString(0)); } } |