diff options
author | Sarah Chin <sarahchin@google.com> | 2020-01-22 15:41:53 -0800 |
---|---|---|
committer | Sarah Chin <sarahchin@google.com> | 2020-01-22 17:02:16 -0800 |
commit | a63e69cf94e5c6ea9de5eb312d36c96818711a2d (patch) | |
tree | 9b2ec1c1aa85badade31fcf2d7e3fe0e5b357fef | |
parent | 48bba35dc1f0b2ca4455e400d5fe87824b0a7eae (diff) |
Expose hidden resources used in telephony/common
Test: atest GsmAlphabetTest, CarrierAppUtilsTest
Bug: 148174114
Change-Id: Iff28c13e3470ea9b2e03cba33bf9489a089f8add
-rwxr-xr-x | api/system-current.txt | 4 | ||||
-rw-r--r-- | api/system-lint-baseline.txt | 6 | ||||
-rw-r--r-- | core/res/res/values/public.xml | 9 | ||||
-rw-r--r-- | telephony/common/com/android/internal/telephony/CarrierAppUtils.java | 3 | ||||
-rw-r--r-- | telephony/common/com/android/internal/telephony/GsmAlphabet.java | 10 | ||||
-rw-r--r-- | telephony/common/com/google/android/mms/util/SqliteWrapper.java | 3 |
6 files changed, 26 insertions, 9 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 48e5c27493a3..2aac908b3937 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -241,6 +241,9 @@ 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 } @@ -293,6 +296,7 @@ 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 fde6bb3424f7..cf1a34a5934b 100644 --- a/api/system-lint-baseline.txt +++ b/api/system-lint-baseline.txt @@ -243,6 +243,12 @@ 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.Bundle>, 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 c081354a7d3a..5d8d31debb54 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -3037,6 +3037,8 @@ <public name="config_defaultCallScreening" /> <!-- @hide @SystemApi @TestApi --> <public name="config_systemGallery" /> + <!-- @hide @SystemApi --> + <public name="low_memory" /> </public-group> <public-group type="bool" first-id="0x01110005"> @@ -3063,7 +3065,14 @@ <public-group type="array" first-id="0x01070006"> <!-- @hide @SystemApi --> <public name="simColors" /> + <!-- @hide @SystemApi --> + <public name="config_restrictedPreinstalledCarrierApps" /> + <!-- @hide @SystemApi --> + <public name="config_sms_enabled_single_shift_tables" /> + <!-- @hide @SystemApi --> + <public name="config_sms_enabled_locking_shift_tables" /> </public-group> + <!-- =============================================================== DO NOT ADD UN-GROUPED ITEMS HERE diff --git a/telephony/common/com/android/internal/telephony/CarrierAppUtils.java b/telephony/common/com/android/internal/telephony/CarrierAppUtils.java index 9bc534c2877a..56c342ee72ca 100644 --- a/telephony/common/com/android/internal/telephony/CarrierAppUtils.java +++ b/telephony/common/com/android/internal/telephony/CarrierAppUtils.java @@ -32,7 +32,6 @@ import android.util.ArrayMap; import android.util.ArraySet; import android.util.Log; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.util.ArrayUtils; import com.android.server.SystemConfig; @@ -160,7 +159,7 @@ public final class CarrierAppUtils { for (ApplicationInfo ai : candidates) { String packageName = ai.packageName; String[] restrictedCarrierApps = Resources.getSystem().getStringArray( - R.array.config_restrictedPreinstalledCarrierApps); + android.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 5c53f7e5a4d0..c62cec270440 100644 --- a/telephony/common/com/android/internal/telephony/GsmAlphabet.java +++ b/telephony/common/com/android/internal/telephony/GsmAlphabet.java @@ -19,12 +19,10 @@ package com.android.internal.telephony; import android.compat.annotation.UnsupportedAppUsage; import android.content.res.Resources; import android.os.Build; -import android.util.Log; import android.text.TextUtils; +import android.util.Log; import android.util.SparseIntArray; -import com.android.internal.R; - import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.ArrayList; @@ -1089,8 +1087,10 @@ 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(R.array.config_sms_enabled_single_shift_tables); - sEnabledLockingShiftTables = r.getIntArray(R.array.config_sms_enabled_locking_shift_tables); + sEnabledSingleShiftTables = r.getIntArray( + android.R.array.config_sms_enabled_single_shift_tables); + sEnabledLockingShiftTables = r.getIntArray( + android.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 2dd1dc11c2a9..d030246ed32a 100644 --- a/telephony/common/com/google/android/mms/util/SqliteWrapper.java +++ b/telephony/common/com/google/android/mms/util/SqliteWrapper.java @@ -61,8 +61,7 @@ public final class SqliteWrapper { @UnsupportedAppUsage public static void checkSQLiteException(Context context, SQLiteException e) { if (isLowMemory(e)) { - Toast.makeText(context, com.android.internal.R.string.low_memory, - Toast.LENGTH_SHORT).show(); + Toast.makeText(context, android.R.string.low_memory, Toast.LENGTH_SHORT).show(); } else { throw e; } |