From d238b8a75933bca6cec39f5c34c2e6735b25a7d8 Mon Sep 17 00:00:00 2001 From: Sarah Chin Date: Thu, 12 Mar 2020 22:39:31 +0000 Subject: Revert "Expose hidden resources used in telephony/common" This reverts commit a63e69cf94e5c6ea9de5eb312d36c96818711a2d. Reason for revert: Remove mainline API for R Test: build Bug: 148174114 Change-Id: I712958984254ca6f16a9604d2aab532500dc1ca9 --- api/system-current.txt | 4 ---- api/system-lint-baseline.txt | 6 ------ core/res/res/values/public.xml | 8 -------- .../common/com/android/internal/telephony/CarrierAppUtils.java | 3 ++- .../common/com/android/internal/telephony/GsmAlphabet.java | 10 +++++----- .../common/com/google/android/mms/util/SqliteWrapper.java | 3 ++- 6 files changed, 9 insertions(+), 25 deletions(-) diff --git a/api/system-current.txt b/api/system-current.txt index bfdb0529fe7a..266629b0aacd 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -249,9 +249,6 @@ package android { public static final class R.array { field public static final int config_keySystemUuidMapping = 17235973; // 0x1070005 - field public static final int config_restrictedPreinstalledCarrierApps = 17235975; // 0x1070007 - field public static final int config_sms_enabled_locking_shift_tables = 17235977; // 0x1070009 - field public static final int config_sms_enabled_single_shift_tables = 17235976; // 0x1070008 field public static final int simColors = 17235974; // 0x1070006 } @@ -304,7 +301,6 @@ package android { field public static final int config_helpPackageNameKey = 17039387; // 0x104001b field public static final int config_helpPackageNameValue = 17039388; // 0x104001c field public static final int config_systemGallery = 17039402; // 0x104002a - field public static final int low_memory = 17039403; // 0x104002b } public static final class R.style { diff --git a/api/system-lint-baseline.txt b/api/system-lint-baseline.txt index 55333cf06ffc..10c96a330bf4 100644 --- a/api/system-lint-baseline.txt +++ b/api/system-lint-baseline.txt @@ -246,12 +246,6 @@ ProtectedMember: android.service.notification.NotificationAssistantService#attac -ResourceValueFieldName: android.R.array#config_sms_enabled_locking_shift_tables: - Expected resource name in `android.R.array` to be in the `fooBarBaz` style, was `config_sms_enabled_locking_shift_tables` -ResourceValueFieldName: android.R.array#config_sms_enabled_single_shift_tables: - Expected resource name in `android.R.array` to be in the `fooBarBaz` style, was `config_sms_enabled_single_shift_tables` - - SamShouldBeLast: android.accounts.AccountManager#addAccount(String, String, String[], android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback, android.os.Handler): SamShouldBeLast: android.accounts.AccountManager#addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean): diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 39e81975fce6..6d0e670e3109 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -3040,8 +3040,6 @@ - - @@ -3069,12 +3067,6 @@ - - - - - - diff --git a/telephony/common/com/android/internal/telephony/CarrierAppUtils.java b/telephony/common/com/android/internal/telephony/CarrierAppUtils.java index d9ae48f6b833..b3d7c0d36763 100644 --- a/telephony/common/com/android/internal/telephony/CarrierAppUtils.java +++ b/telephony/common/com/android/internal/telephony/CarrierAppUtils.java @@ -30,6 +30,7 @@ import android.telephony.TelephonyManager; import android.util.ArrayMap; import android.util.Log; +import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.util.ArrayUtils; @@ -162,7 +163,7 @@ public final class CarrierAppUtils { for (ApplicationInfo ai : candidates) { String packageName = ai.packageName; String[] restrictedCarrierApps = Resources.getSystem().getStringArray( - android.R.array.config_restrictedPreinstalledCarrierApps); + R.array.config_restrictedPreinstalledCarrierApps); boolean hasPrivileges = telephonyManager != null && telephonyManager.checkCarrierPrivilegesForPackageAnyPhone(packageName) == TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS diff --git a/telephony/common/com/android/internal/telephony/GsmAlphabet.java b/telephony/common/com/android/internal/telephony/GsmAlphabet.java index c62cec270440..5c53f7e5a4d0 100644 --- a/telephony/common/com/android/internal/telephony/GsmAlphabet.java +++ b/telephony/common/com/android/internal/telephony/GsmAlphabet.java @@ -19,10 +19,12 @@ package com.android.internal.telephony; import android.compat.annotation.UnsupportedAppUsage; import android.content.res.Resources; import android.os.Build; -import android.text.TextUtils; import android.util.Log; +import android.text.TextUtils; import android.util.SparseIntArray; +import com.android.internal.R; + import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.ArrayList; @@ -1087,10 +1089,8 @@ public class GsmAlphabet { private static void enableCountrySpecificEncodings() { Resources r = Resources.getSystem(); // See comments in frameworks/base/core/res/res/values/config.xml for allowed values - sEnabledSingleShiftTables = r.getIntArray( - android.R.array.config_sms_enabled_single_shift_tables); - sEnabledLockingShiftTables = r.getIntArray( - android.R.array.config_sms_enabled_locking_shift_tables); + sEnabledSingleShiftTables = r.getIntArray(R.array.config_sms_enabled_single_shift_tables); + sEnabledLockingShiftTables = r.getIntArray(R.array.config_sms_enabled_locking_shift_tables); if (sEnabledSingleShiftTables.length > 0) { sHighestEnabledSingleShiftCode = diff --git a/telephony/common/com/google/android/mms/util/SqliteWrapper.java b/telephony/common/com/google/android/mms/util/SqliteWrapper.java index 4871434ebc31..31fe4d7683d6 100644 --- a/telephony/common/com/google/android/mms/util/SqliteWrapper.java +++ b/telephony/common/com/google/android/mms/util/SqliteWrapper.java @@ -60,7 +60,8 @@ public final class SqliteWrapper { @UnsupportedAppUsage public static void checkSQLiteException(Context context, SQLiteException e) { if (isLowMemory(e)) { - Toast.makeText(context, android.R.string.low_memory, Toast.LENGTH_SHORT).show(); + Toast.makeText(context, com.android.internal.R.string.low_memory, + Toast.LENGTH_SHORT).show(); } else { throw e; } -- cgit v1.2.3-59-g8ed1b