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

Commit f0871870 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7821683 from d32c4e9c to tm-d1-release

Change-Id: Ia942c32a5884a76ade4e97e5496342046ff7c685
parents 9458bd54 d32c4e9c
Loading
Loading
Loading
Loading
+103 −15
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<issues format="5" by="lint 4.1.0" client="cli" variant="all" version="4.1.0">
<issues format="6" by="lint 7.1.0-dev" type="baseline" client="" dependencies="true" name="" variant="all" version="7.1.0-dev">

    <issue
        id="NewApi"
        message="Call requires API level 31 (current min is 21): `android.provider.ContactsContract.SimContacts#getSimAccounts`"
        message="Call requires API level S (current min is 21): `android.provider.ContactsContract.SimContacts#getSimAccounts`"
        errorLine1="                        ContactsContract.SimContacts.getSimAccounts(mContext.getContentResolver());"
        errorLine2="                                                     ~~~~~~~~~~~~~~">
        <location
@@ -14,7 +14,7 @@

    <issue
        id="NewApi"
        message="Call requires API level 31 (current min is 21): `android.provider.ContactsContract.SimAccount#getAccountName`"
        message="Call requires API level S (current min is 21): `android.provider.ContactsContract.SimAccount#getAccountName`"
        errorLine1="                    simAccountWithDataSets.add(new AccountWithDataSet(simAccount.getAccountName(),"
        errorLine2="                                                                                 ~~~~~~~~~~~~~~">
        <location
@@ -25,7 +25,7 @@

    <issue
        id="NewApi"
        message="Call requires API level 31 (current min is 21): `android.provider.ContactsContract.SimAccount#getAccountType`"
        message="Call requires API level S (current min is 21): `android.provider.ContactsContract.SimAccount#getAccountType`"
        errorLine1="                            simAccount.getAccountType(), null));"
        errorLine2="                                       ~~~~~~~~~~~~~~">
        <location
@@ -177,6 +177,17 @@
            column="46"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level 24 (current min is 21): `new android.icu.text.MessageFormat`"
        errorLine1="                MessageFormat msgFormat = new MessageFormat("
        errorLine2="                                          ~~~~~~~~~~~~~~~~~">
        <location
            file="packages/apps/Contacts/src/com/android/contacts/interactions/ContactDeletionInteraction.java"
            line="360"
            column="43"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level 23 (current min is 21): `android.widget.QuickContactBadge#setPrioritizedMimeType`"
@@ -190,7 +201,29 @@

    <issue
        id="NewApi"
        message="Call requires API level 31 (current min is 21): `android.provider.ContactsContract.SimContacts#getSimAccounts`"
        message="Call requires API level 24 (current min is 21): `new android.icu.text.MessageFormat`"
        errorLine1="            MessageFormat msgFormat = new MessageFormat("
        errorLine2="                                      ~~~~~~~~~~~~~~~~~">
        <location
            file="packages/apps/Contacts/src/com/android/contacts/ContactSaveService.java"
            line="1221"
            column="39"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level 24 (current min is 21): `new android.icu.text.MessageFormat`"
        errorLine1="            MessageFormat msgFormat = new MessageFormat("
        errorLine2="                                      ~~~~~~~~~~~~~~~~~">
        <location
            file="packages/apps/Contacts/src/com/android/contacts/list/DefaultContactBrowseListFragment.java"
            line="1129"
            column="39"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level S (current min is 21): `android.provider.ContactsContract.SimContacts#getSimAccounts`"
        errorLine1="                    ContactsContract.SimContacts.getSimAccounts("
        errorLine2="                                                 ~~~~~~~~~~~~~~">
        <location
@@ -201,7 +234,7 @@

    <issue
        id="NewApi"
        message="Call requires API level 31 (current min is 21): `android.provider.ContactsContract.SimAccount#getAccountType`"
        message="Call requires API level S (current min is 21): `android.provider.ContactsContract.SimAccount#getAccountType`"
        errorLine1="                        simAccount.getAccountType())) {"
        errorLine2="                                   ~~~~~~~~~~~~~~">
        <location
@@ -223,13 +256,13 @@

    <issue
        id="NewApi"
        message="Call requires API level 24 (current min is 21): `android.provider.BlockedNumberContract#canCurrentUserBlockNumbers`"
        errorLine1="                &amp;&amp; BlockedNumberContract.canCurrentUserBlockNumbers(getContext());"
        errorLine2="                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~">
        message="Call requires API level 24 (current min is 21): `new android.icu.text.MessageFormat`"
        errorLine1="                MessageFormat msgFormat = new MessageFormat("
        errorLine2="                                          ~~~~~~~~~~~~~~~~~">
        <location
            file="packages/apps/Contacts/src/com/android/contacts/preference/DisplayOptionsPreferenceFragment.java"
            line="300"
            column="42"/>
            line="436"
            column="43"/>
    </issue>

    <issue
@@ -243,6 +276,28 @@
            column="57"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level 24 (current min is 21): `new android.icu.text.MessageFormat`"
        errorLine1="                    MessageFormat msgFormat = new MessageFormat("
        errorLine2="                                              ~~~~~~~~~~~~~~~~~">
        <location
            file="packages/apps/Contacts/src/com/android/contacts/interactions/ImportDialogFragment.java"
            line="178"
            column="47"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level 24 (current min is 21): `new android.icu.text.MessageFormat`"
        errorLine1="                    MessageFormat msgFormat = new MessageFormat("
        errorLine2="                                              ~~~~~~~~~~~~~~~~~">
        <location
            file="packages/apps/Contacts/src/com/android/contacts/interactions/ImportDialogFragment.java"
            line="187"
            column="47"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level 26 (current min is 21): `android.graphics.drawable.AdaptiveIconDrawable#getExtraInsetFraction`"
@@ -254,6 +309,28 @@
            column="51"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level 24 (current min is 21): `new android.icu.text.MessageFormat`"
        errorLine1="            MessageFormat msgFormat = new MessageFormat("
        errorLine2="                                      ~~~~~~~~~~~~~~~~~">
        <location
            file="packages/apps/Contacts/src/com/android/contacts/list/MultiSelectContactsListFragment.java"
            line="357"
            column="39"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level 24 (current min is 21): `new android.icu.text.MessageFormat`"
        errorLine1="            MessageFormat msgFormat = new MessageFormat("
        errorLine2="                                      ~~~~~~~~~~~~~~~~~">
        <location
            file="packages/apps/Contacts/src/com/android/contacts/list/MultiSelectContactsListFragment.java"
            line="362"
            column="39"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level 23 (current min is 21): `android.telecom.PhoneAccount#getIcon`"
@@ -360,7 +437,7 @@
        errorLine2="                                                                          ~~~~~~~~~~~">
        <location
            file="packages/apps/Contacts/src/com/android/contacts/quickcontact/QuickContactActivity.java"
            line="652"
            line="654"
            column="75"/>
    </issue>

@@ -371,10 +448,21 @@
        errorLine2="                        ~~~~~~~~~~~">
        <location
            file="packages/apps/Contacts/src/com/android/contacts/quickcontact/QuickContactActivity.java"
            line="653"
            line="655"
            column="25"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level 24 (current min is 21): `new android.icu.text.MessageFormat`"
        errorLine1="        MessageFormat msgFormat = new MessageFormat("
        errorLine2="                                  ~~~~~~~~~~~~~~~~~">
        <location
            file="packages/apps/Contacts/src/com/android/contacts/quickcontact/QuickContactActivity.java"
            line="2226"
            column="35"/>
    </issue>

    <issue
        id="NewApi"
        message="Class requires API level 23 (current min is 21): `android.telecom.PhoneAccountHandle`"
@@ -454,7 +542,7 @@

    <issue
        id="NewApi"
        message="Call requires API level R (current min is 21): `android.telephony.TelephonyManager#getSubscriptionId`"
        message="Call requires API level 30 (current min is 21): `android.telephony.TelephonyManager#getSubscriptionId`"
        errorLine1="            return new SimCard(telephony.getSimSerialNumber(), telephony.getSubscriptionId(),"
        errorLine2="                                                                         ~~~~~~~~~~~~~~~~~">
        <location
@@ -465,7 +553,7 @@

    <issue
        id="NewApi"
        message="Call requires API level 31 (current min is 21): `android.provider.SimPhonebookContract.SimRecords#getContentUri`"
        message="Call requires API level S (current min is 21): `android.provider.SimPhonebookContract.SimRecords#getContentUri`"
        errorLine1="                SimRecords.getContentUri("
        errorLine2="                           ~~~~~~~~~~~~~">
        <location
+28 −30
Original line number Diff line number Diff line
@@ -169,22 +169,22 @@
    <string name="contacts_deleted_many_named_toast"><xliff:g id="name">%1$s</xliff:g>, <xliff:g id="name">%2$s</xliff:g>, <xliff:g id="name">%3$s</xliff:g>\u2026 deleted</string>

    <!-- Toast shown after contacts that the user has selected are deleted by a user action. [CHAR LIMIT=30] -->
    <plurals name="contacts_deleted_toast">
        <item quantity="one">Contact deleted</item>
        <item quantity="other">Contacts deleted</item>
    </plurals>
    <string name="contacts_deleted_toast"> {count, plural,
        =1    {Contact deleted}
        other {Contacts deleted}
    }</string>

    <!-- List header indicating the number of contacts in the list [CHAR LIMIT=30] -->
    <plurals name="contacts_count">
        <item quantity="one"><xliff:g id="count">%d</xliff:g> contact</item>
        <item quantity="other"><xliff:g id="count">%d</xliff:g> contacts</item>
    </plurals>
    <string name="contacts_count"> {count, plural,
        =1    {# contact}
        other {# contacts}
    }</string>

    <!-- List header indicating the number of contacts and account name in the list [CHAR LIMIT=30] -->
    <plurals name="contacts_count_with_account">
        <item quantity="one"><xliff:g id="count">%1$d</xliff:g> contact · <xliff:g id="account">%2$s</xliff:g></item>
        <item quantity="other"><xliff:g id="count">%1$d</xliff:g> contacts · <xliff:g id="account">%2$s</xliff:g></item>
    </plurals>
    <string name="contacts_count_with_account"> {count, plural,
        =1    {# contact · {account}}
        other {# contacts · {account}}
    }</string>

    <!-- Activity title indicating contacts are from a Google account [CHAR LIMIT=30] -->
    <string name="title_from_google">From Google</string>
@@ -373,10 +373,10 @@
    <string name="menu_add_contacts">Add</string>

    <!-- Dialog title when picking the application to share one or multiple contacts with. [CHAR LIMIT=40] -->
    <plurals name="title_share_via">
        <item quantity="one">Share contact via</item>
        <item quantity="other">Share contacts via</item>
    </plurals>
    <string name="title_share_via"> {count, plural,
        =1    {Share contact via}
        other {Share contacts via}
    }</string>

    <!-- Title for the disambiguation dialog that requests the user choose an account for the new label to be created under [CHAR LIMIT=NONE] -->
    <string name="dialog_new_group_account">Choose account</string>
@@ -1101,21 +1101,19 @@
    <!-- Secondary string showing the number of SIM contacts for the SIM card on the action for
         importing from that SIM. Only shown if there is no phone number available for the SIM card
         [CHAR LIMIT=25] -->
    <plurals name="import_from_sim_secondary_contact_count_fmt">
        <item quantity="one">1 contact</item>
        <item quantity="other">%1$d contacts</item>
    </plurals>
    <string name="import_from_sim_secondary_contact_count_fmt"> {count, plural,
        =1    {# contact}
        other {# contacts}
    }</string>

    <!-- Secondary string showing the number of SIM contacts and phone number for the SIM card
         on the action for importing that SIM. Note that the bullet character is purely a visual
         separator between the contact count and phone number; it has no grammatical meaning in
         this string [CHAR LIMIT=35]-->
    <plurals name="import_from_sim_secondary_template">
        <item quantity="one"><xliff:g id="count">^1</xliff:g> contact • <xliff:g id="phone_number">^2</xliff:g></item>
        <item quantity="other"><xliff:g id="count">^1</xliff:g> contacts • <xliff:g id="phone_number">^2</xliff:g></item>
    </plurals>


    <string name="import_from_sim_secondary_template"> {count, plural,
        =1    {# contact • <xliff:g id="phone_number">^1</xliff:g>}
        other {# contacts • <xliff:g id="phone_number">^1</xliff:g>}
    }</string>

    <!-- Action string for selecting a .vcf file to import contacts from [CHAR LIMIT=30] -->
    <string name="import_from_vcf_file">.vcf file</string>
@@ -1484,10 +1482,10 @@
    <string name="sim_import_contact_exists_toast">Contact already exists in your list</string>

    <!-- Toast shown on settings screen when importing from SIM completes successfully -->
    <plurals name="sim_import_success_toast_fmt">
        <item quantity="one">1 SIM contact imported</item>
        <item quantity="other"><xliff:g id="count">%d</xliff:g> SIM contacts imported</item>
    </plurals>
    <string name="sim_import_success_toast_fmt"> {count, plural,
        =1    {# SIM contact imported}
        other {# SIM contacts imported}
    }</string>

    <!-- Toast shown on settings screen when importing from SIM completes with an error -->
    <string name="sim_import_failed_toast">Failed to import SIM contacts</string>
+10 −2
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.content.Intent;
import android.content.OperationApplicationException;
import android.database.Cursor;
import android.database.DatabaseUtils;
import android.icu.text.MessageFormat;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
@@ -75,8 +76,11 @@ import com.google.common.collect.Sets;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;

/**
@@ -1214,8 +1218,12 @@ public class ContactSaveService extends IntentService {
                ContactSaveService.EXTRA_DISPLAY_NAME_ARRAY);
        final String deleteToastMessage;
        if (contactIds.length != names.length || names.length == 0) {
            deleteToastMessage = getResources().getQuantityString(
                    R.plurals.contacts_deleted_toast, contactIds.length);
            MessageFormat msgFormat = new MessageFormat(
                getResources().getString(R.string.contacts_deleted_toast),
                Locale.getDefault());
            Map<String, Object> arguments = new HashMap<>();
            arguments.put("count", contactIds.length);
            deleteToastMessage = msgFormat.format(arguments);
        } else if (names.length == 1) {
            deleteToastMessage = getResources().getString(
                    R.string.contacts_deleted_one_named_toast, (Object[]) names);
+10 −2
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.content.DialogInterface;
import android.content.DialogInterface.OnDismissListener;
import android.content.Loader;
import android.database.Cursor;
import android.icu.text.MessageFormat;
import android.net.Uri;
import android.os.Bundle;
import android.provider.ContactsContract.Contacts;
@@ -46,7 +47,10 @@ import com.android.contacts.util.ContactDisplayUtils;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Sets;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;

/**
 * An interaction invoked to delete a contact.
@@ -353,8 +357,12 @@ public class ContactDeletionInteraction extends Fragment
            final String name = ContactDisplayUtils.getPreferredDisplayName(mDisplayName,
                    mDisplayNameAlt, new ContactsPreferences(mContext));
            if (TextUtils.isEmpty(name)) {
                deleteToastMessage = getResources().getQuantityString(
                        R.plurals.contacts_deleted_toast, /* quantity */ 1);
                MessageFormat msgFormat = new MessageFormat(
                    getResources().getString(R.string.contacts_deleted_toast),
                    Locale.getDefault());
                Map<String, Object> arguments = new HashMap<>();
                arguments.put("count", 1);
                deleteToastMessage = msgFormat.format(arguments);
            } else {
                deleteToastMessage = getResources().getString(
                        R.string.contacts_deleted_one_named_toast, name);
+17 −8
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.icu.text.MessageFormat;
import android.os.Bundle;
import androidx.core.text.BidiFormatter;
import androidx.core.text.TextDirectionHeuristicsCompat;
@@ -50,7 +51,10 @@ import com.android.contacts.model.account.AccountWithDataSet;
import com.android.contacts.util.AccountSelectionUtil;
import com.google.common.util.concurrent.Futures;

import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.Future;

/**
@@ -171,17 +175,22 @@ public class ImportDialogFragment extends DialogFragment {

                if (count != -1 && phone != null) {
                    // We use a template instead of format string so that the TTS span is preserved
                    final CharSequence template = getResources()
                            .getQuantityString(R.plurals.import_from_sim_secondary_template, count);
                    return TextUtils.expandTemplate(template, String.valueOf(count), phone);
                    MessageFormat msgFormat = new MessageFormat(
                        getResources().getString(R.string.import_from_sim_secondary_template),
                        Locale.getDefault());
                    Map<String, Object> arguments = new HashMap<>();
                    arguments.put("count", count);
                    return TextUtils.expandTemplate(msgFormat.format(arguments), phone);
                } else if (phone != null) {
                    return phone;
                } else if (count != -1) {
                    // count != -1
                    return getResources()
                            .getQuantityString(
                                    R.plurals.import_from_sim_secondary_contact_count_fmt, count,
                                    count);
                    MessageFormat msgFormat = new MessageFormat(
                        getResources()
                            .getString(R.string.import_from_sim_secondary_contact_count_fmt),
                        Locale.getDefault());
                    Map<String, Object> arguments = new HashMap<>();
                    arguments.put("count", count);
                    return msgFormat.format(arguments);
                } else {
                    return null;
                }
Loading