Loading telephony/java/android/telephony/CarrierConfigManager.java +29 −1 Original line number Original line Diff line number Diff line Loading @@ -3913,6 +3913,34 @@ public class CarrierConfigManager { @SystemApi @SystemApi @TestApi @TestApi public void overrideConfig(int subscriptionId, @Nullable PersistableBundle overrideValues) { 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 { try { ICarrierConfigLoader loader = getICarrierConfigLoader(); ICarrierConfigLoader loader = getICarrierConfigLoader(); if (loader == null) { if (loader == null) { Loading @@ -3920,7 +3948,7 @@ public class CarrierConfigManager { + " ICarrierConfigLoader is null"); + " ICarrierConfigLoader is null"); return; return; } } loader.overrideConfig(subscriptionId, overrideValues); loader.overrideConfig(subscriptionId, overrideValues, persistent); } catch (RemoteException ex) { } catch (RemoteException ex) { Rlog.e(TAG, "Error setting config for subId " + subscriptionId + ": " Rlog.e(TAG, "Error setting config for subId " + subscriptionId + ": " + ex.toString()); + ex.toString()); Loading telephony/java/com/android/internal/telephony/ICarrierConfigLoader.aidl +1 −1 Original line number Original line Diff line number Diff line Loading @@ -30,7 +30,7 @@ interface ICarrierConfigLoader { PersistableBundle getConfigForSubIdWithFeature(int subId, String callingPackage, PersistableBundle getConfigForSubIdWithFeature(int subId, String callingPackage, String callingFeatureId); String callingFeatureId); void overrideConfig(int subId, in PersistableBundle overrides); void overrideConfig(int subId, in PersistableBundle overrides, boolean persistent); void notifyConfigChangedForSubId(int subId); void notifyConfigChangedForSubId(int subId); Loading Loading
telephony/java/android/telephony/CarrierConfigManager.java +29 −1 Original line number Original line Diff line number Diff line Loading @@ -3913,6 +3913,34 @@ public class CarrierConfigManager { @SystemApi @SystemApi @TestApi @TestApi public void overrideConfig(int subscriptionId, @Nullable PersistableBundle overrideValues) { 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 { try { ICarrierConfigLoader loader = getICarrierConfigLoader(); ICarrierConfigLoader loader = getICarrierConfigLoader(); if (loader == null) { if (loader == null) { Loading @@ -3920,7 +3948,7 @@ public class CarrierConfigManager { + " ICarrierConfigLoader is null"); + " ICarrierConfigLoader is null"); return; return; } } loader.overrideConfig(subscriptionId, overrideValues); loader.overrideConfig(subscriptionId, overrideValues, persistent); } catch (RemoteException ex) { } catch (RemoteException ex) { Rlog.e(TAG, "Error setting config for subId " + subscriptionId + ": " Rlog.e(TAG, "Error setting config for subId " + subscriptionId + ": " + ex.toString()); + ex.toString()); Loading
telephony/java/com/android/internal/telephony/ICarrierConfigLoader.aidl +1 −1 Original line number Original line Diff line number Diff line Loading @@ -30,7 +30,7 @@ interface ICarrierConfigLoader { PersistableBundle getConfigForSubIdWithFeature(int subId, String callingPackage, PersistableBundle getConfigForSubIdWithFeature(int subId, String callingPackage, String callingFeatureId); String callingFeatureId); void overrideConfig(int subId, in PersistableBundle overrides); void overrideConfig(int subId, in PersistableBundle overrides, boolean persistent); void notifyConfigChangedForSubId(int subId); void notifyConfigChangedForSubId(int subId); Loading