maos: grant carrier privileges to communicate regardless of UICC rules
- Commit
3e6b06cf4a14757b77b27ff99ef582044148d7da- Author
- Vayun Mathur <[email protected]>
- When
- 2026-09-27 18:11 UTC (2 months ago)
- Parents
c1ea88f
Diff
build-maos.sh
diff --git a/build-maos.sh b/build-maos.shindex 6124dd8..aabc9b6 100755--- a/build-maos.sh+++ b/build-maos.sh@@ -254,6 +254,7 @@ apply_maos_patches() { local spec repo patch for spec in "build/make:platform_build.patch" "vendor/adevtool:adevtool.patch" \ "frameworks/base:frameworks_base.patch" \+ "frameworks/opt/telephony:frameworks_opt_telephony.patch" \ "frameworks/libs/systemui:frameworks_libs_systemui.patch" \ "build/release:build_release.patch" \ "packages/apps/Settings:settings.patch" \
patches/frameworks_opt_telephony.patch
diff --git a/patches/frameworks_opt_telephony.patch b/patches/frameworks_opt_telephony.patchnew file mode 100644index 0000000..d2ce176--- /dev/null+++ b/patches/frameworks_opt_telephony.patch@@ -0,0 +1,20 @@+diff --git a/src/java/com/android/internal/telephony/uicc/UiccCarrierPrivilegeRules.java b/src/java/com/android/internal/telephony/uicc/UiccCarrierPrivilegeRules.java+index 66ac2cbaa1..e892890fe1 100644+--- a/src/java/com/android/internal/telephony/uicc/UiccCarrierPrivilegeRules.java++++ b/src/java/com/android/internal/telephony/uicc/UiccCarrierPrivilegeRules.java+@@ -361,6 +361,15 @@ public class UiccCarrierPrivilegeRules extends Handler {+ return accessStatus;+ }+ }++ // MAOS: grant carrier privileges to the bundled Communicate app++ // (com.vayunmathur.communicate) regardless of UICC access rules, so++ // single-registration RCS works on carriers whose profiles carry no++ // rules (e.g. Jibe-backed MVNOs). Real UICC grants still take++ // precedence - this only fires when they say NO_ACCESS.++ if (packageInfo != null++ && "com.vayunmathur.communicate".equals(packageInfo.packageName)) {++ return TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;++ }+ return TelephonyManager.CARRIER_PRIVILEGE_STATUS_NO_ACCESS;+ }+