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

Commit 9a6afa3a authored by Eric Erfanian's avatar Eric Erfanian
Browse files

Update oc-dr1-dev to v11.1 RC06

This moves the branch forward from v11 RC17.

This release contains fixes for the following bugs:

Bug: 63584851 63803282 63917358 64099380
64101648 64105912 64119808 64122858
64125770 64300111

Test: TH, on device
Merged-In: I858e3665253139b8aab4e4c063bfc4c419f33cc9
Merged-In: Ifc146f2fec24fd2f8a51cd32feb3699bb1c07136
Change-Id: I48296c56fb1d275a06b7c314f5380266c1195ef2
parent ff2ad7ff
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.CommonDataKinds.SipAddress;
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Directory;
import android.support.annotation.VisibleForTesting;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
@@ -357,7 +358,8 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter {
    bindPhoneNumber(view, cursor, directory.isDisplayNumber(), position);
  }

  protected void bindPhoneNumber(
  @VisibleForTesting(otherwise = VisibleForTesting.PROTECTED)
  public void bindPhoneNumber(
      ContactListItemView view, Cursor cursor, boolean displayNumber, int position) {
    CharSequence label = null;
    if (displayNumber && !cursor.isNull(PhoneQuery.PHONE_TYPE)) {
@@ -397,7 +399,8 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter {
      }
    }

    if (LightbringerComponent.get(mContext).getLightbringer().isReachable(mContext, number)) {
    if (action == ContactListItemView.NONE
        && LightbringerComponent.get(mContext).getLightbringer().isReachable(mContext, number)) {
      action = ContactListItemView.LIGHTBRINGER;
    }

+6 −14
Original line number Diff line number Diff line
@@ -551,12 +551,15 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
  private void bindActionButtons() {
    boolean canPlaceCallToNumber = PhoneNumberHelper.canPlaceCallsTo(number, numberPresentation);

    // Hide the call buttons by default. We then set it to be visible when appropriate below.
    // This saves us having to remember to set it to GONE in multiple places.
    callButtonView.setVisibility(View.GONE);
    videoCallButtonView.setVisibility(View.GONE);

    if (isFullyUndialableVoicemail()) {
      // Sometimes the voicemail server will report the message is from some non phone number
      // source. If the number does not contains any dialable digit treat it as it is from a unknown
      // number, remove all action buttons but still show the voicemail playback layout.
      callButtonView.setVisibility(View.GONE);
      videoCallButtonView.setVisibility(View.GONE);
      detailsButtonView.setVisibility(View.GONE);
      createNewContactButtonView.setVisibility(View.GONE);
      addToExistingContactButtonView.setVisibility(View.GONE);
@@ -582,11 +585,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
    }

    if (canPlaceCallToNumber) {
      // Set up the call button but hide it by default (the primary action is to call so it is
      // redundant). We then set it to be visible when appropriate below. This saves us having to
      // remember to set it to GONE in multiple places.
      callButtonView.setTag(IntentProvider.getReturnCallIntentProvider(number));
      callButtonView.setVisibility(View.GONE);
    }

    if (!TextUtils.isEmpty(voicemailUri) && canPlaceCallToNumber) {
@@ -616,8 +615,6 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
    } else if (lightbringerReady) {
      videoCallButtonView.setTag(IntentProvider.getLightbringerIntentProvider(number));
      videoCallButtonView.setVisibility(View.VISIBLE);
    } else {
      videoCallButtonView.setVisibility(View.GONE);
    }

    // For voicemail calls, show the voicemail playback layout; hide otherwise.
@@ -944,12 +941,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
    String accountLabel = mCallLogCache.getAccountLabel(accountHandle);
    if (!TextUtils.isEmpty(accountLabel)) {
      SimDetails.Builder simDetails = SimDetails.newBuilder().setNetwork(accountLabel);
      int color = mCallLogCache.getAccountColor(accountHandle);
      if (color == PhoneAccount.NO_HIGHLIGHT_COLOR) {
        simDetails.setColor(R.color.secondary_text_color);
      } else {
        simDetails.setColor(color);
      }
      simDetails.setColor(mCallLogCache.getAccountColor(accountHandle));
      contact.setSimDetails(simDetails.build());
    }
    return contact.build();
+1 −3
Original line number Diff line number Diff line
@@ -75,7 +75,6 @@ public class ListsFragment extends Fragment implements OnPageChangeListener, Lis
  private SharedPreferences mPrefs;
  private boolean mHasFetchedVoicemailStatus;
  private boolean mShowVoicemailTabAfterVoicemailStatusIsFetched;
  private VoicemailStatusHelper mVoicemailStatusHelper;
  private final ArrayList<OnPageChangeListener> mOnPageChangeListeners = new ArrayList<>();
  /** The position of the currently selected tab. */
  private int mTabIndex = TAB_INDEX_SPEED_DIAL;
@@ -99,7 +98,6 @@ public class ListsFragment extends Fragment implements OnPageChangeListener, Lis
    LogUtil.d("ListsFragment.onCreate", null);
    Trace.beginSection(TAG + " onCreate");
    super.onCreate(savedInstanceState);
    mVoicemailStatusHelper = new VoicemailStatusHelper();
    mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
    Trace.endSection();
  }
@@ -294,7 +292,7 @@ public class ListsFragment extends Fragment implements OnPageChangeListener, Lis

    // Update hasActiveVoicemailProvider, which controls the number of tabs displayed.
    boolean hasActiveVoicemailProvider =
        mVoicemailStatusHelper.getNumberActivityVoicemailSources(statusCursor) > 0;
        VoicemailStatusHelper.getNumberActivityVoicemailSources(statusCursor) > 0;
    if (hasActiveVoicemailProvider != mAdapter.hasActiveVoicemailProvider()) {
      mAdapter.setHasActiveVoicemailProvider(hasActiveVoicemailProvider);
      mAdapter.notifyDataSetChanged();
+6 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ import com.android.dialer.constants.Constants;
import com.android.dialer.logging.DialerImpression;
import com.android.dialer.logging.Logger;
import com.android.dialer.phonenumbercache.CallLogQuery;
import com.android.dialer.telecom.TelecomUtil;
import com.android.dialer.util.PermissionsUtil;
import com.google.common.io.ByteStreams;
import java.io.File;
@@ -515,6 +516,11 @@ public class VoicemailPlaybackPresenter
    mView.disableUiElements();
    mIsPrepared = false;

    if (mContext != null && TelecomUtil.isInCall(mContext)) {
      handleError(new IllegalStateException("Cannot play voicemail when call is in progress"));
      return;
    }

    try {
      mMediaPlayer = new MediaPlayer();
      mMediaPlayer.setOnPreparedListener(this);
+4 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.dialer.calldetails;
import android.content.Context;
import android.net.Uri;
import android.support.v7.widget.RecyclerView;
import android.telecom.PhoneAccount;
import android.text.TextUtils;
import android.view.View;
import android.view.View.OnClickListener;
@@ -93,7 +94,9 @@ public class CallDetailsHeaderViewHolder extends RecyclerView.ViewHolder
    if (!TextUtils.isEmpty(contact.getSimDetails().getNetwork())) {
      networkView.setVisibility(View.VISIBLE);
      networkView.setText(contact.getSimDetails().getNetwork());
      networkView.setTextColor(context.getResources().getColor(contact.getSimDetails().getColor()));
      if (contact.getSimDetails().getColor() != PhoneAccount.NO_HIGHLIGHT_COLOR) {
        networkView.setTextColor(contact.getSimDetails().getColor());
      }
    }

    if (TextUtils.isEmpty(contact.getNumber())) {
Loading