mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 868934 - Support selecting authentication type for data call. r=hsinyi
This commit is contained in:
parent
8b954097d7
commit
615334542d
@ -312,6 +312,7 @@ function RadioInterfaceLayer() {
|
||||
lock.get("ril.data.apn", this);
|
||||
lock.get("ril.data.user", this);
|
||||
lock.get("ril.data.passwd", this);
|
||||
lock.get("ril.data.authtype", this);
|
||||
lock.get("ril.data.httpProxyHost", this);
|
||||
lock.get("ril.data.httpProxyPort", this);
|
||||
lock.get("ril.data.roaming_enabled", this);
|
||||
@ -321,6 +322,7 @@ function RadioInterfaceLayer() {
|
||||
"ril.data.apn",
|
||||
"ril.data.user",
|
||||
"ril.data.passwd",
|
||||
"ril.data.authtype",
|
||||
"ril.data.httpProxyHost",
|
||||
"ril.data.httpProxyPort"];
|
||||
|
||||
@ -328,6 +330,7 @@ function RadioInterfaceLayer() {
|
||||
lock.get("ril.mms.apn", this);
|
||||
lock.get("ril.mms.user", this);
|
||||
lock.get("ril.mms.passwd", this);
|
||||
lock.get("ril.mms.authtype", this);
|
||||
lock.get("ril.mms.httpProxyHost", this);
|
||||
lock.get("ril.mms.httpProxyPort", this);
|
||||
lock.get("ril.mms.mmsc", this);
|
||||
@ -336,6 +339,7 @@ function RadioInterfaceLayer() {
|
||||
lock.get("ril.supl.apn", this);
|
||||
lock.get("ril.supl.user", this);
|
||||
lock.get("ril.supl.passwd", this);
|
||||
lock.get("ril.supl.authtype", this);
|
||||
lock.get("ril.supl.httpProxyHost", this);
|
||||
lock.get("ril.supl.httpProxyPort", this);
|
||||
|
||||
@ -2076,6 +2080,7 @@ RadioInterfaceLayer.prototype = {
|
||||
case "ril.data.apn":
|
||||
case "ril.data.user":
|
||||
case "ril.data.passwd":
|
||||
case "ril.data.authtype":
|
||||
case "ril.data.httpProxyHost":
|
||||
case "ril.data.httpProxyPort":
|
||||
let key = aName.slice(9);
|
||||
@ -2090,6 +2095,7 @@ RadioInterfaceLayer.prototype = {
|
||||
case "ril.mms.apn":
|
||||
case "ril.mms.user":
|
||||
case "ril.mms.passwd":
|
||||
case "ril.mms.authtype":
|
||||
case "ril.mms.httpProxyHost":
|
||||
case "ril.mms.httpProxyPort":
|
||||
case "ril.mms.mmsc":
|
||||
@ -2101,6 +2107,7 @@ RadioInterfaceLayer.prototype = {
|
||||
case "ril.supl.apn":
|
||||
case "ril.supl.user":
|
||||
case "ril.supl.passwd":
|
||||
case "ril.supl.authtype":
|
||||
case "ril.supl.httpProxyHost":
|
||||
case "ril.supl.httpProxyPort":
|
||||
key = aName.slice(9);
|
||||
@ -3209,11 +3216,19 @@ RILNetworkInterface.prototype = {
|
||||
debug("Going to set up data connection with APN " + this.dataCallSettings.apn);
|
||||
let radioTechType = this.mRIL.rilContext.data.type;
|
||||
let radioTechnology = RIL.GECKO_RADIO_TECH.indexOf(radioTechType);
|
||||
let authType = RIL.RIL_DATACALL_AUTH_TO_GECKO.indexOf(this.dataCallSettings["authtype"]);
|
||||
// Use the default authType if the value in database is invalid.
|
||||
// For the case that user might not select the authentication type.
|
||||
if (authType == -1) {
|
||||
debug("Invalid authType " + this.dataCallSettings["authtype"]);
|
||||
authType = RIL.RIL_DATACALL_AUTH_TO_GECKO.indexOf(RIL.GECKO_DATACALL_AUTH_DEFAULT);
|
||||
}
|
||||
this.mRIL.setupDataCall(radioTechnology,
|
||||
this.dataCallSettings.apn,
|
||||
this.dataCallSettings.user,
|
||||
this.dataCallSettings.passwd,
|
||||
RIL.DATACALL_AUTH_PAP_OR_CHAP, "IP");
|
||||
authType,
|
||||
"IP");
|
||||
this.connecting = true;
|
||||
},
|
||||
|
||||
|
@ -2164,6 +2164,18 @@ this.DATACALL_AUTH_PAP = 1;
|
||||
this.DATACALL_AUTH_CHAP = 2;
|
||||
this.DATACALL_AUTH_PAP_OR_CHAP = 3;
|
||||
|
||||
this.GECKO_DATACALL_AUTH_NONE = "none";
|
||||
this.GECKO_DATACALL_AUTH_PAP = "pap";
|
||||
this.GECKO_DATACALL_AUTH_CHAP = "chap";
|
||||
this.GECKO_DATACALL_AUTH_PAP_OR_CHAP = "papOrChap";
|
||||
this.GECKO_DATACALL_AUTH_DEFAULT = GECKO_DATACALL_AUTH_PAP_OR_CHAP;
|
||||
this.RIL_DATACALL_AUTH_TO_GECKO = [
|
||||
GECKO_DATACALL_AUTH_NONE, // DATACALL_AUTH_NONE
|
||||
GECKO_DATACALL_AUTH_PAP, // DATACALL_AUTH_PAP
|
||||
GECKO_DATACALL_AUTH_CHAP, // DATACALL_AUTH_CHAP
|
||||
GECKO_DATACALL_AUTH_PAP_OR_CHAP // DATACALL_AUTH_PAP_OR_CHAP
|
||||
];
|
||||
|
||||
this.DATACALL_PROFILE_DEFAULT = 0;
|
||||
this.DATACALL_PROFILE_TETHERED = 1;
|
||||
this.DATACALL_PROFILE_OEM_BASE = 1000;
|
||||
|
Loading…
Reference in New Issue
Block a user