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

Commit 9779f967 authored by Eric Erfanian's avatar Eric Erfanian
Browse files

Update AOSP Dialer source from internal google3 repository at

cl/151342913.

Test: make, treehugger

This CL updates the AOSP Dialer source with all the changes that have
gone into the private google3 repository. This includes all the
changes from cl/151128062 (3/24/2017) to cl/151342913 (3/27/2017).

This goal of these drops is to keep the AOSP source in sync with the
internal google3 repository. Currently these sync are done by hand
with very minor modifications to the internal source code.
See the Android.mk file for list of modifications.
Our current goal is to do frequent drops (daily if possible) and
eventually switched to an automated process.

Change-Id: I8d4855628b62e9067e71f32ed40317617a1e3b02
parent 9050823c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@
    <string name="sms_mobile" msgid="8883045857887736518">"मोबाईलवर मजकूर पाठवा"</string>
    <string name="sms_work" msgid="4158595439553450966">"कार्यस्थानी मजकूर पाठवा"</string>
    <string name="sms_fax_work" msgid="5483726627718055248">"कार्य फॅक्सवर मजकूर पाठवा"</string>
    <string name="sms_fax_home" msgid="9219265155770746077">"निवासस्थान फॅक्सवर मजकूर पाठवा"</string>
    <string name="sms_fax_home" msgid="9219265155770746077">"घर फॅक्सवर मजकूर पाठवा"</string>
    <string name="sms_pager" msgid="4901085068525193933">"पेजरवर मजकूर पाठवा"</string>
    <string name="sms_other" msgid="1742702947993285933">"मजकूर"</string>
    <string name="sms_callback" msgid="5833483630377538308">"कॉलबॅक वर मजकूर पाठवा"</string>
+16 −3
Original line number Diff line number Diff line
@@ -58,9 +58,9 @@ import com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry;
import com.android.dialer.calllogutils.PhoneAccountUtils;
import com.android.dialer.calllogutils.PhoneCallDetails;
import com.android.dialer.common.Assert;
import com.android.dialer.common.AsyncTaskExecutor;
import com.android.dialer.common.AsyncTaskExecutors;
import com.android.dialer.common.LogUtil;
import com.android.dialer.common.concurrent.AsyncTaskExecutor;
import com.android.dialer.common.concurrent.AsyncTaskExecutors;
import com.android.dialer.enrichedcall.EnrichedCallCapabilities;
import com.android.dialer.enrichedcall.EnrichedCallComponent;
import com.android.dialer.enrichedcall.EnrichedCallManager;
@@ -457,6 +457,7 @@ public class CallLogAdapter extends GroupingListAdapter
      final long rowId,
      final PhoneCallDetails details,
      final CallDetailsEntries callDetailsEntries) {
    LogUtil.d("CallLogAdapter.loadAndRender", "position: %d", views.getAdapterPosition());
    // Reset block and spam information since this view could be reused which may contain
    // outdated data.
    views.isSpam = false;
@@ -667,12 +668,13 @@ public class CallLogAdapter extends GroupingListAdapter
        && !isVoicemailNumber) {
      // Lookup contacts with this number
      // Only do remote lookup in first 5 rows.
      int position = views.getAdapterPosition();
      info =
          mContactInfoCache.getValue(
              details.number + details.postDialDigits,
              details.countryIso,
              details.cachedContactInfo,
              rowId
              position
                  < Bindings.get(mActivity)
                      .getConfigProvider()
                      .getLong("number_of_call_to_do_remote_lookup", 5L));
@@ -699,6 +701,17 @@ public class CallLogAdapter extends GroupingListAdapter
      details.objectId = info.objectId;
      details.contactUserType = info.userType;
    }
    LogUtil.d(
        "CallLogAdapter.loadData",
        "position:%d, update geo info: %s, cequint caller id geo: %s, photo uri: %s <- %s",
        views.getAdapterPosition(),
        details.geocode,
        info.geoDescription,
        details.photoUri,
        info.photoUri);
    if (!TextUtils.isEmpty(info.geoDescription)) {
      details.geocode = info.geoDescription;
    }

    views.info = info;
    views.numberType =
+2 −2
Original line number Diff line number Diff line
@@ -28,8 +28,8 @@ import android.provider.VoicemailContract.Voicemails;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import com.android.dialer.common.AsyncTaskExecutor;
import com.android.dialer.common.AsyncTaskExecutors;
import com.android.dialer.common.concurrent.AsyncTaskExecutor;
import com.android.dialer.common.concurrent.AsyncTaskExecutors;
import com.android.dialer.util.PermissionsUtil;
import com.android.voicemail.VoicemailClient;

+18 −16
Original line number Diff line number Diff line
@@ -18,9 +18,11 @@ package com.android.dialer.app.contactinfo;

import android.os.Handler;
import android.os.Message;
import android.os.SystemClock;
import android.support.annotation.NonNull;
import android.support.annotation.VisibleForTesting;
import android.text.TextUtils;
import com.android.dialer.common.LogUtil;
import com.android.dialer.phonenumbercache.ContactInfo;
import com.android.dialer.phonenumbercache.ContactInfoHelper;
import com.android.dialer.util.ExpirableCache;
@@ -97,39 +99,29 @@ public class ContactInfoCache {
    NumberWithCountryIso numberCountryIso = new NumberWithCountryIso(number, countryIso);
    ExpirableCache.CachedValue<ContactInfo> cachedInfo = mCache.getCachedValue(numberCountryIso);
    ContactInfo info = cachedInfo == null ? null : cachedInfo.getValue();
    int requestType =
        remoteLookupIfNotFoundLocally
            ? ContactInfoRequest.TYPE_LOCAL_AND_REMOTE
            : ContactInfoRequest.TYPE_LOCAL;
    if (cachedInfo == null) {
      mCache.put(numberCountryIso, ContactInfo.EMPTY);
      // Use the cached contact info from the call log.
      info = callLogContactInfo;
      // The db request should happen on a non-UI thread.
      // Request the contact details immediately since they are currently missing.
      int requestType =
          remoteLookupIfNotFoundLocally
              ? ContactInfoRequest.TYPE_LOCAL_AND_REMOTE
              : ContactInfoRequest.TYPE_LOCAL;
      enqueueRequest(number, countryIso, callLogContactInfo, /* immediate */ true, requestType);
      // We will format the phone number when we make the background request.
    } else {
      if (cachedInfo.isExpired()) {
        // The contact info is no longer up to date, we should request it. However, we
        // do not need to request them immediately.
        enqueueRequest(
            number,
            countryIso,
            callLogContactInfo, /* immediate */
            false,
            ContactInfoRequest.TYPE_LOCAL);
        enqueueRequest(number, countryIso, callLogContactInfo, /* immediate */ false, requestType);
      } else if (!callLogInfoMatches(callLogContactInfo, info)) {
        // The call log information does not match the one we have, look it up again.
        // We could simply update the call log directly, but that needs to be done in a
        // background thread, so it is easier to simply request a new lookup, which will, as
        // a side-effect, update the call log.
        enqueueRequest(
            number,
            countryIso,
            callLogContactInfo, /* immediate */
            false,
            ContactInfoRequest.TYPE_LOCAL);
        enqueueRequest(number, countryIso, callLogContactInfo, /* immediate */ false, requestType);
      }

      if (info == ContactInfo.EMPTY) {
@@ -152,9 +144,19 @@ public class ContactInfoCache {
   * to update its content.
   */
  private boolean queryContactInfo(ContactInfoRequest request) {
    LogUtil.d(
        "ContactInfoCache.queryContactInfo",
        "request number: %s, type: %d",
        LogUtil.sanitizePhoneNumber(request.number),
        request.type);
    ContactInfo info;
    if (request.isLocalRequest()) {
      info = mContactInfoHelper.lookupNumber(request.number, request.countryIso);
      // TODO: Maybe skip look up if it's already available in cached number lookup service.
      long start = SystemClock.uptimeMillis();
      mContactInfoHelper.updateFromCequintCallerId(info, request.number);
      long time = SystemClock.uptimeMillis() - start;
      LogUtil.d("ContactInfoCache.queryContactInfo", "Cequint Caller Id look up takes %d ms", time);
      if (request.type == ContactInfoRequest.TYPE_LOCAL_AND_REMOTE) {
        if (!mContactInfoHelper.hasName(info)) {
          enqueueRequest(
+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@
    <string name="manage_blocked_numbers_label" msgid="16823761991832273">"कल रोक्दै"</string>
    <string name="voicemail_settings_label" msgid="4594299554519920570">"भ्वाइस मेल"</string>
    <string name="blocked_numbers_disabled_emergency_header_label" msgid="6936696532562923971">"कल अवरुद्ध अस्थायी रुपमा निष्क्रिय"</string>
    <string name="blocked_numbers_disabled_emergency_desc" msgid="5484785225285297040">"कल अवरुद्ध अस्थायी रुपमा असक्षम गरिएको छ किनभने तपाईँले अन्तिम ४८ घ्टा भित्र यस फोनबाट आपत्कालीन सेवाहरू सम्पर्क गर्नुभयो। एकपटक ४८ घ्टा अवधि समाप्त भएपछि यो स्वचालित रूपले पुनः सक्रिय हुनेछ।"</string>
    <string name="blocked_numbers_disabled_emergency_desc" msgid="5484785225285297040">"कल अवरुद्ध अस्थायी रुपमा असक्षम गरिएको छ किनभने तपाईँले अन्तिम ४८ घ्टा भित्र यस फोनबाट आपत्कालीन सेवाहरू सम्पर्क गर्नुभयो। एकपटक ४८ घ्टा अवधि समाप्त भएपछि यो स्वचालित रूपले पुनः सक्रिय हुनेछ।"</string>
    <string name="import_send_to_voicemail_numbers_label" msgid="7821890095264297681">"नम्बरहरू आयात गर्नुहोस्"</string>
    <string name="blocked_call_settings_import_description" msgid="1819412052545228965">"तपाईँले पहिल्यै केही कल गर्ने व्यक्तिहरूलाई अन्य अनुप्रयोगहरू मार्फत स्वत: रूपमा भ्वाइस मेल पठाउन नै चिन्ह लगाउनु भएको थियो।"</string>
    <string name="blocked_call_settings_view_numbers_button" msgid="3332727948554356704">"नम्बरहरू हेर्नुहोस्"</string>
Loading