Loading core/res/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -4143,6 +4143,10 @@ one bar higher than they actually are --> <bool name="config_inflateSignalStrength">false</bool> <!-- Contains a blacklist of apps that should not get pre-installed carrier app permission grants, even if the UICC claims that the app should be privileged. See b/138150105 --> <string-array name="config_restrictedPreinstalledCarrierApps" translatable="false"/> <!-- Sharesheet: define a max number of targets per application for new shortcuts-based direct share introduced in Q --> <integer name="config_maxShortcutTargetsPerApp">3</integer> </resources> core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3813,6 +3813,7 @@ <java-symbol type="string" name="config_defaultSupervisionProfileOwnerComponent" /> <java-symbol type="bool" name="config_inflateSignalStrength" /> <java-symbol type="array" name="config_restrictedPreinstalledCarrierApps" /> <java-symbol type="drawable" name="android_logotype" /> <java-symbol type="layout" name="platlogo_layout" /> Loading telephony/java/com/android/internal/telephony/CarrierAppUtils.java +9 −3 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.ContentResolver; import android.content.pm.ApplicationInfo; import android.content.pm.IPackageManager; import android.content.pm.PackageManager; import android.content.res.Resources; import android.os.RemoteException; import android.provider.Settings; import android.telephony.TelephonyManager; Loading @@ -28,7 +29,9 @@ import android.util.ArrayMap; import android.util.ArraySet; import android.util.Slog; import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.ArrayUtils; import com.android.server.SystemConfig; import java.util.ArrayList; Loading Loading @@ -140,9 +143,12 @@ public final class CarrierAppUtils { try { for (ApplicationInfo ai : candidates) { String packageName = ai.packageName; boolean hasPrivileges = telephonyManager != null && telephonyManager.checkCarrierPrivilegesForPackageAnyPhone(packageName) == TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS; String[] restrictedCarrierApps = Resources.getSystem().getStringArray( R.array.config_restrictedPreinstalledCarrierApps); boolean hasPrivileges = telephonyManager != null && telephonyManager.checkCarrierPrivilegesForPackageAnyPhone(packageName) == TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS && !ArrayUtils.contains(restrictedCarrierApps, packageName); // add hiddenUntilInstalled flag for carrier apps and associated apps packageManager.setSystemAppHiddenUntilInstalled(packageName, true); Loading Loading
core/res/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -4143,6 +4143,10 @@ one bar higher than they actually are --> <bool name="config_inflateSignalStrength">false</bool> <!-- Contains a blacklist of apps that should not get pre-installed carrier app permission grants, even if the UICC claims that the app should be privileged. See b/138150105 --> <string-array name="config_restrictedPreinstalledCarrierApps" translatable="false"/> <!-- Sharesheet: define a max number of targets per application for new shortcuts-based direct share introduced in Q --> <integer name="config_maxShortcutTargetsPerApp">3</integer> </resources>
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3813,6 +3813,7 @@ <java-symbol type="string" name="config_defaultSupervisionProfileOwnerComponent" /> <java-symbol type="bool" name="config_inflateSignalStrength" /> <java-symbol type="array" name="config_restrictedPreinstalledCarrierApps" /> <java-symbol type="drawable" name="android_logotype" /> <java-symbol type="layout" name="platlogo_layout" /> Loading
telephony/java/com/android/internal/telephony/CarrierAppUtils.java +9 −3 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.ContentResolver; import android.content.pm.ApplicationInfo; import android.content.pm.IPackageManager; import android.content.pm.PackageManager; import android.content.res.Resources; import android.os.RemoteException; import android.provider.Settings; import android.telephony.TelephonyManager; Loading @@ -28,7 +29,9 @@ import android.util.ArrayMap; import android.util.ArraySet; import android.util.Slog; import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.ArrayUtils; import com.android.server.SystemConfig; import java.util.ArrayList; Loading Loading @@ -140,9 +143,12 @@ public final class CarrierAppUtils { try { for (ApplicationInfo ai : candidates) { String packageName = ai.packageName; boolean hasPrivileges = telephonyManager != null && telephonyManager.checkCarrierPrivilegesForPackageAnyPhone(packageName) == TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS; String[] restrictedCarrierApps = Resources.getSystem().getStringArray( R.array.config_restrictedPreinstalledCarrierApps); boolean hasPrivileges = telephonyManager != null && telephonyManager.checkCarrierPrivilegesForPackageAnyPhone(packageName) == TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS && !ArrayUtils.contains(restrictedCarrierApps, packageName); // add hiddenUntilInstalled flag for carrier apps and associated apps packageManager.setSystemAppHiddenUntilInstalled(packageName, true); Loading