Bug 916000 - Part1: Add illegal sim state support in ril. r=yoshi

This commit is contained in:
Georgia Wang 2013-09-25 12:20:03 +08:00
parent 6aadb0d679
commit abd0c8cd26
3 changed files with 9 additions and 4 deletions

View File

@ -296,10 +296,11 @@ interface nsIDOMMozIccManager : nsIDOMEventTarget
/**
* Indicates the state of the device's ICC card.
*
* Possible values: null, 'unknown', 'absent', 'pinRequired', 'pukRequired',
* 'personalizationInProgress', 'networkLocked', 'corporateLocked',
* 'serviceProviderLocked', 'networkPukRequired', 'corporatePukRequired',
* 'serviceProviderPukRequired', 'personalizationReady', 'ready'.
* Possible values: null, 'illegal', 'unknown', 'absent', 'pinRequired',
* 'pukRequired', 'personalizationInProgress', 'networkLocked',
* 'corporateLocked', 'serviceProviderLocked', 'networkPukRequired',
* 'corporatePukRequired', 'serviceProviderPukRequired',
* 'personalizationReady', 'ready'.
*/
readonly attribute DOMString cardState;

View File

@ -2345,6 +2345,7 @@ this.GECKO_RADIOSTATE_OFF = "off";
this.GECKO_RADIOSTATE_READY = "ready";
this.GECKO_CARDSTATE_NOT_READY = null;
this.GECKO_CARDSTATE_ILLEGAL = "illegal";
this.GECKO_CARDSTATE_UNKNOWN = "unknown";
this.GECKO_CARDSTATE_ABSENT = "absent";
this.GECKO_CARDSTATE_PIN_REQUIRED = "pinRequired";

View File

@ -2977,6 +2977,9 @@ let RIL = {
this.appType = app.app_type;
switch (app.app_state) {
case CARD_APPSTATE_ILLEGAL:
newCardState = GECKO_CARDSTATE_ILLEGAL;
break;
case CARD_APPSTATE_PIN:
newCardState = GECKO_CARDSTATE_PIN_REQUIRED;
break;