Loading telephony/java/android/telephony/CarrierConfigManager.java +29 −1 Original line number Diff line number Diff line Loading @@ -3810,6 +3810,34 @@ public class CarrierConfigManager { @SystemApi @TestApi public void overrideConfig(int subscriptionId, @Nullable PersistableBundle overrideValues) { overrideConfig(subscriptionId, overrideValues, false); } /** * Overrides the carrier config of the provided subscription ID with the provided values. * * Any further queries to carrier config from any process will return the overridden values * after this method returns. The overrides are effective until the user passes in {@code null} * for {@code overrideValues}. This removes all previous overrides and sets the carrier config * back to production values. * * The overrides is stored persistently and will survive a reboot if {@code persistent} is true. * * May throw an {@link IllegalArgumentException} if {@code overrideValues} contains invalid * values for the specified config keys. * * NOTE: This API is meant for testing purposes only. * * @param subscriptionId The subscription ID for which the override should be done. * @param overrideValues Key-value pairs of the values that are to be overridden. If set to * {@code null}, this will remove all previous overrides and set the * carrier configuration back to production values. * @param persistent Determines whether the override should be persistent. * @hide */ @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE) public void overrideConfig(int subscriptionId, @Nullable PersistableBundle overrideValues, boolean persistent) { try { ICarrierConfigLoader loader = getICarrierConfigLoader(); if (loader == null) { Loading @@ -3817,7 +3845,7 @@ public class CarrierConfigManager { + " ICarrierConfigLoader is null"); return; } loader.overrideConfig(subscriptionId, overrideValues); loader.overrideConfig(subscriptionId, overrideValues, persistent); } catch (RemoteException ex) { Rlog.e(TAG, "Error setting config for subId " + subscriptionId + ": " + ex.toString()); Loading telephony/java/com/android/internal/telephony/ICarrierConfigLoader.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ interface ICarrierConfigLoader { @UnsupportedAppUsage PersistableBundle getConfigForSubId(int subId, String callingPackage); void overrideConfig(int subId, in PersistableBundle overrides); void overrideConfig(int subId, in PersistableBundle overrides, boolean persistent); void notifyConfigChangedForSubId(int subId); Loading Loading
telephony/java/android/telephony/CarrierConfigManager.java +29 −1 Original line number Diff line number Diff line Loading @@ -3810,6 +3810,34 @@ public class CarrierConfigManager { @SystemApi @TestApi public void overrideConfig(int subscriptionId, @Nullable PersistableBundle overrideValues) { overrideConfig(subscriptionId, overrideValues, false); } /** * Overrides the carrier config of the provided subscription ID with the provided values. * * Any further queries to carrier config from any process will return the overridden values * after this method returns. The overrides are effective until the user passes in {@code null} * for {@code overrideValues}. This removes all previous overrides and sets the carrier config * back to production values. * * The overrides is stored persistently and will survive a reboot if {@code persistent} is true. * * May throw an {@link IllegalArgumentException} if {@code overrideValues} contains invalid * values for the specified config keys. * * NOTE: This API is meant for testing purposes only. * * @param subscriptionId The subscription ID for which the override should be done. * @param overrideValues Key-value pairs of the values that are to be overridden. If set to * {@code null}, this will remove all previous overrides and set the * carrier configuration back to production values. * @param persistent Determines whether the override should be persistent. * @hide */ @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE) public void overrideConfig(int subscriptionId, @Nullable PersistableBundle overrideValues, boolean persistent) { try { ICarrierConfigLoader loader = getICarrierConfigLoader(); if (loader == null) { Loading @@ -3817,7 +3845,7 @@ public class CarrierConfigManager { + " ICarrierConfigLoader is null"); return; } loader.overrideConfig(subscriptionId, overrideValues); loader.overrideConfig(subscriptionId, overrideValues, persistent); } catch (RemoteException ex) { Rlog.e(TAG, "Error setting config for subId " + subscriptionId + ": " + ex.toString()); Loading
telephony/java/com/android/internal/telephony/ICarrierConfigLoader.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ interface ICarrierConfigLoader { @UnsupportedAppUsage PersistableBundle getConfigForSubId(int subId, String callingPackage); void overrideConfig(int subId, in PersistableBundle overrides); void overrideConfig(int subId, in PersistableBundle overrides, boolean persistent); void notifyConfigChangedForSubId(int subId); Loading