diff options
| author | 2025-03-05 02:00:39 +0000 | |
|---|---|---|
| committer | 2025-03-12 03:34:38 +0000 | |
| commit | 8d686057b136581fa315978bec1604fb488dcb2d (patch) | |
| tree | edcbee0af4f35c0e9dbfb5795884476ddd7609f2 | |
| parent | 8238a656097130e19b0ccafeecbb51bbb1bc20f6 (diff) | |
Update notifyEmergencyNumberList() feature flag dependency
Given that notifyEmergencyNumberList() functionality is utilized by both
calling and messaging modules, and messaging can be enabled without
calling,the function's access control should be based on either
FEATURE_TELEPHONY_CALLING or FEATURE_TELEPHONY_MESSAGING.
Bug: 395178686
Flag: EXEMPT bug fix
Test: atest CtsTelephonyTestCases --no-bazel-mode
Change-Id: Ie6d24949add3dbcd41fcee449c30a96d2983e710
| -rw-r--r-- | services/core/java/com/android/server/TelephonyRegistry.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java index 9ae8ff869800..48e90f1b6535 100644 --- a/services/core/java/com/android/server/TelephonyRegistry.java +++ b/services/core/java/com/android/server/TelephonyRegistry.java @@ -2816,10 +2816,11 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { if (!checkNotifyPermission("notifyEmergencyNumberList()")) { return; } - if (!mContext.getPackageManager().hasSystemFeature( - PackageManager.FEATURE_TELEPHONY_CALLING)) { + if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY_CALLING) + && !mContext.getPackageManager() + .hasSystemFeature(PackageManager.FEATURE_TELEPHONY_MESSAGING)) { // TelephonyManager.getEmergencyNumberList() throws an exception if - // FEATURE_TELEPHONY_CALLING is not defined. + // FEATURE_TELEPHONY_CALLING or FEATURE_TELEPHONY_MESSAGING is not defined. return; } |