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

Commit 63d59d1f authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4632767 from f2874ff7 to pi-release

Change-Id: I0f473726a9ab6e894c265e50224ac64bde8bcabe
parents 51178662 f2874ff7
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2018 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24.0"
    android:viewportHeight="24.0"
    android:tint="?attr/colorControlNormal">
  <path
      android:fillColor="@android:color/white"
      android:pathData="M20,15.5c-1.25,0 -2.45,-0.2 -3.57,-0.57 -0.35,-0.11 -0.74,-0.03 -1.02,0.24l-2.2,2.2c-2.83,-1.44 -5.15,-3.75 -6.59,-6.59l2.2,-2.21c0.28,-0.26 0.36,-0.65 0.25,-1C8.7,6.45 8.5,5.25 8.5,4c0,-0.55 -0.45,-1 -1,-1H4c-0.55,0 -1,0.45 -1,1 0,9.39 7.61,17 17,17 0.55,0 1,-0.45 1,-1v-3.5c0,-0.55 -0.45,-1 -1,-1zM21,6h-3V3h-2v3h-3v2h3v3h2V8h3z"/>
</vector>
 No newline at end of file
+25 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2018 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24.0"
    android:viewportHeight="24.0"
    android:tint="?attr/colorControlNormal">
  <path
      android:fillColor="@android:color/white"
      android:pathData="M12,19c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM6,1c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM6,7c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM6,13c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,5c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,13c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,13c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,7c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,7c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,1c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
</vector>
 No newline at end of file
+25 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2018 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24.0"
    android:viewportHeight="24.0"
    android:tint="?attr/colorControlNormal">
  <path
      android:fillColor="@android:color/white"
      android:pathData="M9.03,3l-1.11,7.07h2.62l0.7,-4.5h2.58L11.8,18.43L9.47,18.43L9.06,21h7.27l0.4,-2.57h-2.35l2,-12.86h2.58l-0.71,4.5h2.65L22,3L9.03,3zM8,5L4,5l-0.31,2h4L8,5zM7.39,9h-4l-0.31,2h4l0.31,-2zM8.31,17h-6L2,19h6l0.31,-2zM8.93,13h-6l-0.31,2h6.01l0.3,-2z"/>
</vector>
 No newline at end of file
+0 −46
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.contacts.common.compat;

import android.telephony.PhoneNumberUtils;
import android.text.style.TtsSpan;

/**
 * This class contains static utility methods extracted from PhoneNumberUtils, and the methods were
 * added in API level 23. In this way, we could enable the corresponding functionality for pre-M
 * devices. We need maintain this class and keep it synced with PhoneNumberUtils. Another thing to
 * keep in mind is that we use com.google.i18n rather than com.android.i18n in here, so we need make
 * sure the application behavior is preserved.
 */
public class PhoneNumberUtilsCompat {

  /** Not instantiable. */
  private PhoneNumberUtilsCompat() {}

  public static String formatNumber(
      String phoneNumber, String phoneNumberE164, String defaultCountryIso) {
      return PhoneNumberUtils.formatNumber(phoneNumber, phoneNumberE164, defaultCountryIso);
  }

  public static CharSequence createTtsSpannable(CharSequence phoneNumber) {
    return PhoneNumberUtils.createTtsSpannable(phoneNumber);
  }

  public static TtsSpan createTtsSpan(String phoneNumber) {
    return PhoneNumberUtils.createTtsSpan(phoneNumber);
  }
}
+3 −4
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.provider.ContactsContract.SearchSnippets;
import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.telephony.PhoneNumberUtils;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextUtils;
@@ -50,7 +51,6 @@ import android.widget.TextView;
import com.android.contacts.common.ContactPresenceIconUtil;
import com.android.contacts.common.ContactStatusUtil;
import com.android.contacts.common.R;
import com.android.contacts.common.compat.PhoneNumberUtilsCompat;
import com.android.contacts.common.format.TextHighlighter;
import com.android.contacts.common.list.PhoneNumberListAdapter.Listener;
import com.android.contacts.common.util.ContactDisplayUtils;
@@ -1111,7 +1111,7 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj
      mSnippetView.setVisibility(VISIBLE);
      if (ContactDisplayUtils.isPossiblePhoneNumber(text)) {
        // Give the text-to-speech engine a hint that it's a phone number
        mSnippetView.setContentDescription(PhoneNumberUtilsCompat.createTtsSpannable(text));
        mSnippetView.setContentDescription(PhoneNumberUtils.createTtsSpannable(text));
      } else {
        mSnippetView.setContentDescription(null);
      }
@@ -1232,8 +1232,7 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj
    if (ContactDisplayUtils.isPossiblePhoneNumber(name)) {
      // Give the text-to-speech engine a hint that it's a phone number
      mNameTextView.setTextDirection(View.TEXT_DIRECTION_LTR);
      mNameTextView.setContentDescription(
          PhoneNumberUtilsCompat.createTtsSpannable(name.toString()));
      mNameTextView.setContentDescription(PhoneNumberUtils.createTtsSpannable(name.toString()));
    } else {
      // Remove span tags of highlighting for talkback to avoid reading highlighting and rest
      // of the name into two separate parts.
Loading