mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 830164 - Part 4: Update GPS. r=dougt
This commit is contained in:
parent
ccdb765e1e
commit
db6d7bb3c1
@ -408,21 +408,23 @@ GonkGPSGeolocationProvider::RequestSetID(uint32_t flags)
|
|||||||
mRIL->GetRilContext(getter_AddRefs(rilCtx));
|
mRIL->GetRilContext(getter_AddRefs(rilCtx));
|
||||||
|
|
||||||
if (rilCtx) {
|
if (rilCtx) {
|
||||||
nsCOMPtr<nsIICCRecords> icc;
|
nsAutoString id;
|
||||||
rilCtx->GetIcc(getter_AddRefs(icc));
|
if (flags & AGPS_RIL_REQUEST_SETID_IMSI) {
|
||||||
if (icc) {
|
type = AGPS_SETID_TYPE_IMSI;
|
||||||
nsAutoString id;
|
rilCtx->GetImsi(id);
|
||||||
if (flags & AGPS_RIL_REQUEST_SETID_IMSI) {
|
|
||||||
type = AGPS_SETID_TYPE_IMSI;
|
|
||||||
icc->GetImsi(id);
|
|
||||||
}
|
|
||||||
if (flags & AGPS_RIL_REQUEST_SETID_MSISDN) {
|
|
||||||
type = AGPS_SETID_TYPE_MSISDN;
|
|
||||||
icc->GetMsisdn(id);
|
|
||||||
}
|
|
||||||
NS_ConvertUTF16toUTF8 idBytes(id);
|
|
||||||
mAGpsRilInterface->set_set_id(type, idBytes.get());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (flags & AGPS_RIL_REQUEST_SETID_MSISDN) {
|
||||||
|
nsCOMPtr<nsIDOMMozMobileICCInfo> iccInfo;
|
||||||
|
rilCtx->GetIccInfo(getter_AddRefs(iccInfo));
|
||||||
|
if (iccInfo) {
|
||||||
|
type = AGPS_SETID_TYPE_MSISDN;
|
||||||
|
iccInfo->GetMsisdn(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NS_ConvertUTF16toUTF8 idBytes(id);
|
||||||
|
mAGpsRilInterface->set_set_id(type, idBytes.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -444,11 +446,11 @@ GonkGPSGeolocationProvider::SetReferenceLocation()
|
|||||||
location.type = AGPS_REF_LOCATION_TYPE_UMTS_CELLID;
|
location.type = AGPS_REF_LOCATION_TYPE_UMTS_CELLID;
|
||||||
|
|
||||||
if (rilCtx) {
|
if (rilCtx) {
|
||||||
nsCOMPtr<nsIICCRecords> icc;
|
nsCOMPtr<nsIDOMMozMobileICCInfo> iccInfo;
|
||||||
rilCtx->GetIcc(getter_AddRefs(icc));
|
rilCtx->GetIccInfo(getter_AddRefs(iccInfo));
|
||||||
if (icc) {
|
if (iccInfo) {
|
||||||
icc->GetMcc(&location.u.cellID.mcc);
|
iccInfo->GetMcc(&location.u.cellID.mcc);
|
||||||
icc->GetMnc(&location.u.cellID.mnc);
|
iccInfo->GetMnc(&location.u.cellID.mnc);
|
||||||
}
|
}
|
||||||
nsCOMPtr<nsIDOMMozMobileConnectionInfo> voice;
|
nsCOMPtr<nsIDOMMozMobileConnectionInfo> voice;
|
||||||
rilCtx->GetVoice(getter_AddRefs(voice));
|
rilCtx->GetVoice(getter_AddRefs(voice));
|
||||||
|
Loading…
Reference in New Issue
Block a user