From db5a8c1a2546b68c8e663b00ed2e75c5df6716e3 Mon Sep 17 00:00:00 2001 From: calderwoodra Date: Mon, 14 May 2018 12:12:45 -0700 Subject: Don't crash when cp2 returns a null label. Bug: 79260760 Test: n/a PiperOrigin-RevId: 196547205 Change-Id: Ic3c39a920ea759e5fc2b03f5022c5f2cc7ed3f8c --- .../android/dialer/speeddial/database/SpeedDialEntryDatabaseHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java') diff --git a/java/com/android/dialer/speeddial/database/SpeedDialEntryDatabaseHelper.java b/java/com/android/dialer/speeddial/database/SpeedDialEntryDatabaseHelper.java index 1416a203d..211af86ad 100644 --- a/java/com/android/dialer/speeddial/database/SpeedDialEntryDatabaseHelper.java +++ b/java/com/android/dialer/speeddial/database/SpeedDialEntryDatabaseHelper.java @@ -125,7 +125,7 @@ public final class SpeedDialEntryDatabaseHelper extends SQLiteOpenHelper Channel.builder() .setNumber(number) .setPhoneType(cursor.getInt(POSITION_PHONE_TYPE)) - .setLabel(cursor.getString(POSITION_PHONE_LABEL)) + .setLabel(Optional.of(cursor.getString(POSITION_PHONE_LABEL)).or("")) .setTechnology(cursor.getInt(POSITION_PHONE_TECHNOLOGY)) .build(); } -- cgit v1.2.3