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

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

Merge "Dialer: Show "Emergency number" in call log when dial emergency number"

parents 429008ef 283c3e9f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -42,4 +42,6 @@

    <bool name="config_incoming_call_show_one_way_video_options">true</bool>

    <bool name="mark_emergency_call_in_call_log">false</bool>

</resources>
+14 −3
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.net.Uri;
import android.provider.CallLog.Calls;
import android.provider.ContactsContract.PhoneLookup;
import android.telecom.PhoneAccountHandle;
import android.telephony.PhoneNumberUtils;
import android.telephony.SubscriptionManager;
import android.text.TextUtils;
import android.view.LayoutInflater;
@@ -441,9 +442,19 @@ public class CallLogAdapter extends GroupingListAdapter
        expandOrCollapseActions(callLogItemView, isExpanded(rowId));

        if (TextUtils.isEmpty(name)) {
            if (mContext.getResources().getBoolean(R.bool.mark_emergency_call_in_call_log) &&
                    PhoneNumberUtils.isLocalEmergencyNumber(mContext, number)) {
                String emergencyName = mContext.getString(
                        com.android.internal.R.string.emergency_call_dialog_number_for_display);
                details = new PhoneCallDetails(number, numberPresentation,
                    formattedNumber, countryIso, geocode, callTypes, date, duration, null,
                    accountIcon, features, dataUsage, transcription, subId, operator);
                        formattedNumber, countryIso, geocode, callTypes, date, duration,
                        emergencyName, 0, "", null, null, 0, null, accountIcon, features,
                        dataUsage, transcription, Calls.DURATION_TYPE_ACTIVE, subId, operator);
            } else {
                details = new PhoneCallDetails(number, numberPresentation,
                        formattedNumber, countryIso, geocode, callTypes, date, duration,
                        null, accountIcon, features, dataUsage, transcription, subId, operator);
            }
        } else {
            details = new PhoneCallDetails(number, numberPresentation,
                    formattedNumber, countryIso, geocode, callTypes, date,