Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e6eca16 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Dialer: fix the runtime exception issue for smartsearch."

parents d944ea77 412ad2cc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1161,4 +1161,6 @@ e mode.</string>
    <string name="alert_call_over_wifi">Calls will be made over Wi-Fi.</string>
    <string name="alert_call_no_cellular_coverage">No cellular network available. Connect to available Wi-Fi to make calls.</string>
    <string name="alert_user_connect_to_wifi_for_call">Connect to Wi-Fi to make calls.</string>
    <string name="missing_account_type">(No type)</string>
    <string name="missing_account_name">(No name)</string>
</resources>
+18 −4
Original line number Diff line number Diff line
@@ -943,10 +943,24 @@ public class DialerDatabaseHelper extends SQLiteOpenHelper {
                insert.bindLong(12, updatedContactCursor.getInt(PhoneQuery.PHONE_IS_PRIMARY));
                insert.bindLong(13, updatedContactCursor.getInt(PhoneQuery.PHONE_CARRIER_PRESENCE));
                insert.bindLong(14, currentMillis);
                insert.bindString(15, updatedContactCursor
                        .getString(PhoneQuery.PHONE_ACCOUNT_TYPE));
                insert.bindString(16, updatedContactCursor
                        .getString(PhoneQuery.PHONE_ACCOUNT_NAME));

                final String accountType = updatedContactCursor.getString(
                        PhoneQuery.PHONE_ACCOUNT_TYPE);
                if (accountType == null) {
                    insert.bindString(15, mContext.getResources().getString(
                            R.string.missing_account_type));
                } else {
                    insert.bindString(15, accountType);
                }

                final String accountName = updatedContactCursor.getString(
                        PhoneQuery.PHONE_ACCOUNT_NAME);
                if (accountName == null) {
                    insert.bindString(16, mContext.getResources().getString(
                            R.string.missing_account_name));
                } else {
                    insert.bindString(16, accountName);
                }
                insert.executeInsert();
                final String contactPhoneNumber =
                        updatedContactCursor.getString(PhoneQuery.PHONE_NUMBER);