mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 02:25:34 +00:00
Bug 772357 - B2G RIL: Support network depersonalization. r=philikon
This commit is contained in:
parent
6b50650db5
commit
952e98bb47
@ -119,7 +119,12 @@ interface nsIDOMMozMobileConnection : nsIDOMEventTarget
|
||||
* unlockCardLock({lockType: "pin",
|
||||
* pin: "..."});
|
||||
*
|
||||
* (2) Unlocking the PUK and supplying a new PIN:
|
||||
* (2) Network depersonalization. Unlocking the network control key (NCK).
|
||||
*
|
||||
* unlockCardLock({lockType: "nck",
|
||||
* pin: "..."});
|
||||
*
|
||||
* (3) Unlocking the PUK and supplying a new PIN:
|
||||
*
|
||||
* unlockCardLock({lockType: "puk",
|
||||
* puk: "...",
|
||||
|
@ -28,7 +28,7 @@ const REQUEST_ENTER_SIM_PIN2 = 4;
|
||||
const REQUEST_ENTER_SIM_PUK2 = 5;
|
||||
const REQUEST_CHANGE_SIM_PIN = 6;
|
||||
const REQUEST_CHANGE_SIM_PIN2 = 7;
|
||||
const REQUEST_ENTER_NETWORK_DEPERSONALIZATION = 8;
|
||||
const REQUEST_ENTER_NETWORK_DEPERSONALIZATION_CODE = 8;
|
||||
const REQUEST_GET_CURRENT_CALLS = 9;
|
||||
const REQUEST_DIAL = 10;
|
||||
const REQUEST_GET_IMSI = 11;
|
||||
|
@ -812,6 +812,10 @@ let RIL = {
|
||||
case "puk2":
|
||||
this.enterICCPUK2(options);
|
||||
break;
|
||||
case "nck":
|
||||
options.type = CARD_PERSOSUBSTATE_SIM_NETWORK;
|
||||
this.enterDepersonalization(options);
|
||||
break;
|
||||
default:
|
||||
options.errorMsg = "Unsupported Card Lock.";
|
||||
options.success = false;
|
||||
@ -855,6 +859,21 @@ let RIL = {
|
||||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
/**
|
||||
* Requests a network personalization be deactivated.
|
||||
*
|
||||
* @param type
|
||||
* Integer indicating the network personalization be deactivated.
|
||||
* @param pin
|
||||
* String containing the pin.
|
||||
*/
|
||||
enterDepersonalization: function enterDepersonalization(options) {
|
||||
Buf.newParcel(REQUEST_ENTER_NETWORK_DEPERSONALIZATION_CODE, options);
|
||||
Buf.writeUint32(options.type);
|
||||
Buf.writeString(options.pin);
|
||||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper function for changing ICC locks.
|
||||
*/
|
||||
@ -3699,7 +3718,10 @@ RIL[REQUEST_CHANGE_SIM_PIN] = function REQUEST_CHANGE_SIM_PIN(length, options) {
|
||||
RIL[REQUEST_CHANGE_SIM_PIN2] = function REQUEST_CHANGE_SIM_PIN2(length, options) {
|
||||
this._processEnterAndChangeICCResponses(length, options);
|
||||
};
|
||||
RIL[REQUEST_ENTER_NETWORK_DEPERSONALIZATION] = null;
|
||||
RIL[REQUEST_ENTER_NETWORK_DEPERSONALIZATION_CODE] =
|
||||
function REQUEST_ENTER_NETWORK_DEPERSONALIZATION_CODE(length, options) {
|
||||
this._processEnterAndChangeICCResponses(length, options);
|
||||
};
|
||||
RIL[REQUEST_GET_CURRENT_CALLS] = function REQUEST_GET_CURRENT_CALLS(length, options) {
|
||||
if (options.rilRequestError) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user