API change: SetOperatorBrandOverride should not take iccId as a param.

Taking ICCID as a parameter is not scure since a carrier can override the
brand for other carriers. We should override only the current ICCID.

Bug: 17390144

Change-Id: I9be2cb5c5fa15367fcb3b548b6e601a294e84dbc
This commit is contained in:
Shishir Agrawal
2014-09-04 13:23:53 -07:00
parent a0c9962388
commit d2cfa92146
3 changed files with 8 additions and 11 deletions

View File

@@ -29049,7 +29049,7 @@ package android.telephony {
method public boolean setCdmaSubscription(int);
method public void setLine1NumberForDisplay(java.lang.String, java.lang.String);
method public void setLine1NumberForDisplay(long, java.lang.String, java.lang.String);
method public boolean setOperatorBrandOverride(java.lang.String, java.lang.String);
method public boolean setOperatorBrandOverride(java.lang.String);
method public boolean setPreferredNetworkType(int);
field public static final java.lang.String ACTION_PHONE_STATE_CHANGED = "android.intent.action.PHONE_STATE";
field public static final java.lang.String ACTION_RESPOND_VIA_MESSAGE = "android.intent.action.RESPOND_VIA_MESSAGE";

View File

@@ -3023,9 +3023,9 @@ public class TelephonyManager {
}
/**
* Override the branding for the input ICCID.
* Override the branding for the current ICCID.
*
* Once set, whenever the ICCID is inserted into the device, the service
* Once set, whenever the SIM is present in the device, the service
* provider name (SPN) and the operator name will both be replaced by the
* brand value input. To unset the value, the same function should be
* called with a null brand value.
@@ -3034,14 +3034,12 @@ public class TelephonyManager {
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
* or has to be carrier app - see #hasCarrierPrivileges.
*
* @param iccId The ICCID of that the branding applies to.
* @param brand The brand name to display/set.
* @return true if the operation was executed correctly.
*/
public boolean setOperatorBrandOverride(String iccId, String brand) {
// TODO: Validate ICCID format.
public boolean setOperatorBrandOverride(String brand) {
try {
return getITelephony().setOperatorBrandOverride(iccId, brand);
return getITelephony().setOperatorBrandOverride(brand);
} catch (RemoteException ex) {
Rlog.e(TAG, "setOperatorBrandOverride RemoteException", ex);
} catch (NullPointerException ex) {

View File

@@ -766,9 +766,9 @@ interface ITelephony {
String getLine1AlphaTagForDisplay(long subId);
/**
* Override the operator branding for the input ICCID.
* Override the operator branding for the current ICCID.
*
* Once set, whenever the ICCID is inserted into the device, the service
* Once set, whenever the SIM is present in the device, the service
* provider name (SPN) and the operator name will both be replaced by the
* brand value input. To unset the value, the same function should be
* called with a null brand value.
@@ -777,11 +777,10 @@ interface ITelephony {
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
* or has to be carrier app - see #hasCarrierPrivileges.
*
* @param iccid The ICCID of that the branding applies to.
* @param brand The brand name to display/set.
* @return true if the operation was executed correctly.
*/
boolean setOperatorBrandOverride(String iccId, String brand);
boolean setOperatorBrandOverride(String brand);
/**
* Returns the result and response from RIL for oem request