[RIL] Use RIL_REQUEST_DEVICE_IDENTITY to get IMEI, IMEISV

RESOLVED FIXED in Firefox 45, Firefox OS v2.2r

Status

RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: hsinyi, Assigned: bevis)

Tracking

unspecified
2.6 S1 - 11/20
x86_64
Linux
Dependency tree / graph

Firefox Tracking Flags

(feature-b2g:2.2r+, firefox45 fixed, b2g-v2.5 wontfix, b2g-v2.2r fixed, b2g-master affected)

Details

(Whiteboard: [good first bug])

Attachments

(4 attachments, 2 obsolete attachments)

(Reporter)

Description

4 years ago
RIL_REQUEST_GET_IMEI and RIL_REQUEST_GET_IMEISV have been deprecated since ics. RIL_REQUEST_DEVICE_IDENTITY is suggested to be used instead.

Updated

3 years ago
See Also: → bug 816843
(Assignee)

Comment 1

3 years ago
I'd like to take this bug to verify the parcel of RIL_REQUEST_DEVICE_IDENTITY to be added in bug 1222920.
Then, we could have better test coverage for bug 1222870.
(Assignee)

Updated

3 years ago
Assignee: nobody → btseng
(Assignee)

Comment 3

3 years ago
Created attachment 8685771 [details] [diff] [review]
Part 1: IDL Interface Changes.

Hi Edgar,

May I have your review for this change?

Thanks!
Attachment #8685771 - Flags: review?(echen)
(Assignee)

Comment 4

3 years ago
Created attachment 8685772 [details] [diff] [review]
(v1) Part 2: Implementation Changes.

Hi Edgar,

May I have your review for this change?

Thanks!
Attachment #8685772 - Flags: review?(echen)

Updated

3 years ago
Depends on: 1222920

Comment 7

3 years ago
Comment on attachment 8685771 [details] [diff] [review]
Part 1: IDL Interface Changes.

Review of attachment 8685771 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/mobileconnection/interfaces/nsIMobileConnectionService.idl
@@ +323,5 @@
>  
>    /**
> +   * Device Identities, including IMEI, IMEISV, ESN and MEID.
> +   */
> +  readonly attribute nsIMobileDeviceIdentities deviceIdentities;

Per offline discussion, please also add a listener to notify the identities is updated. Thank you.

::: dom/mobileconnection/interfaces/nsIMobileDeviceIdentities.idl
@@ +21,5 @@
> +   * Device IMEISV, which should be 2-decimal digits.
> +   *
> +   * Valid if GSM subscription is available.
> +   *
> +   * Note: The value might be dummy like "000..." from modem

Please revise the commit, IMEISV should be 2-decimal digits.
Attachment #8685771 - Flags: review?(echen)
(Assignee)

Updated

3 years ago
Blocks: 1222870
(Assignee)

Comment 8

3 years ago
Set NI for 2.2r+ in feature-b2g.
Flags: needinfo?(whuang)
(Assignee)

Comment 9

3 years ago
Comment on attachment 8685771 [details] [diff] [review]
Part 1: IDL Interface Changes.

Review of attachment 8685771 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/mobileconnection/interfaces/nsIMobileConnectionService.idl
@@ +323,5 @@
>  
>    /**
> +   * Device Identities, including IMEI, IMEISV, ESN and MEID.
> +   */
> +  readonly attribute nsIMobileDeviceIdentities deviceIdentities;

will do

::: dom/mobileconnection/interfaces/nsIMobileDeviceIdentities.idl
@@ +21,5 @@
> +   * Device IMEISV, which should be 2-decimal digits.
> +   *
> +   * Valid if GSM subscription is available.
> +   *
> +   * Note: The value might be dummy like "000..." from modem

How about "Device IMEI, [presented|formed] in 2-decimal digits"?
Attachment #8685771 - Flags: feedback?(echen)
Comment on attachment 8685771 [details] [diff] [review]
Part 1: IDL Interface Changes.

Review of attachment 8685771 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/mobileconnection/interfaces/nsIMobileDeviceIdentities.idl
@@ +21,5 @@
> +   * Device IMEISV, which should be 2-decimal digits.
> +   *
> +   * Valid if GSM subscription is available.
> +   *
> +   * Note: The value might be dummy like "000..." from modem

Sorry, I misunderstood the line you suggest to revise.
it shall line#25 "Note: The value might be dummy like "000..." from modem" instead.
Attachment #8685771 - Flags: feedback?(echen)

Comment 11

3 years ago
Comment on attachment 8685772 [details] [diff] [review]
(v1) Part 2: Implementation Changes.

Review of attachment 8685772 [details] [diff] [review]:
-----------------------------------------------------------------

Thank you.

::: dom/mobileconnection/gonk/MobileConnectionService.js
@@ +1721,5 @@
>  
> +  notifyDeviceIdentitiesChanged: function(aClientId, aImei, aImeisv,
> +                                          aEsn, aMeid) {
> +    this.getItemByServiceId(aClientId).notifyDeviceIdentitiesChanged(
> +      new MobileDeviceIdentities(aImei, aImeisv, aEsn, aMeid));

I'd prefer that we create MobileDeviceIdentities in MobileConnectionProvide.

::: dom/system/gonk/ril_worker.js
@@ +4772,5 @@
> +    meid: result[3] || null,
> +  };
> +
> +  this.sendChromeMessage({
> +    rilMessageType: "deviceidentities",

s/deviceidentities/deviceidentitieschange/
Attachment #8685772 - Flags: review?(echen) → review+
(Assignee)

Updated

3 years ago
status-b2g-v2.2r: --- → affected
status-b2g-v2.5: --- → wontfix
status-b2g-master: --- → affected
feature-b2g: --- → 2.2r+
Flags: needinfo?(whuang)
Created attachment 8686527 [details] [diff] [review]
(v2) Part 1: IDL Interface Changes. r=echen

Hi Edgar,

May I have your review again for this change?

Thanks!
Attachment #8685771 - Attachment is obsolete: true
Attachment #8686527 - Flags: review?(echen)
Created attachment 8686533 [details] [diff] [review]
(v2) Part 2: Implementation Changes. r=echen
Attachment #8685772 - Attachment is obsolete: true
Attachment #8686533 - Flags: review+
Created attachment 8686535 [details] [diff] [review]
(v2) Part 3: Bluetooth Changes. r=btian

Hi Ben,

May I have your review for this change?

Thanks!
Attachment #8686535 - Flags: review?(btian)

Updated

3 years ago
Attachment #8686527 - Flags: review?(echen) → review+

Comment 16

3 years ago
Comment on attachment 8686535 [details] [diff] [review]
(v2) Part 3: Bluetooth Changes. r=btian

Review of attachment 8686535 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM
Attachment #8686535 - Flags: review?(btian) → review+
Comment on attachment 8686535 [details] [diff] [review]
(v2) Part 3: Bluetooth Changes. r=btian

># HG changeset patch
># User Bevis Tseng <btseng@mozilla.com>
># Date 1447319040 -28800
>#      四 11月 12 17:04:00 2015 +0800
># Node ID 85cba98b0b03f12dcad4946c653a57df825c8566
># Parent  975961db253cde0ddd111bad81c2ae377d874c8b
>Bug 1110619 - Part 3: Bluetooth Changes. r=btian
>
>diff --git a/dom/bluetooth/common/BluetoothRilListener.cpp b/dom/bluetooth/common/BluetoothRilListener.cpp
>--- a/dom/bluetooth/common/BluetoothRilListener.cpp
>+++ b/dom/bluetooth/common/BluetoothRilListener.cpp
>@@ -160,16 +160,22 @@ MobileConnectionListener::NotifyLastKnow
> }
> 
> NS_IMETHODIMP
> MobileConnectionListener::NotifyNetworkSelectionModeChanged()
> {
>   return NS_OK;
> }
> 
>+NS_IMETHODIMP
>+MobileConnectionListener::NotifyDeviceIdentitiesChanged()
>+{
>+  return NS_OK;
>+}
>+
> bool
> MobileConnectionListener::Listen(bool aStart)
> {
>   nsCOMPtr<nsIMobileConnectionService> service =
>     do_GetService(NS_MOBILE_CONNECTION_SERVICE_CONTRACTID);
>   NS_ENSURE_TRUE(service, false);
> 
>   nsCOMPtr<nsIMobileConnection> connection;
Attachment #8686535 - Attachment description: (v2) Part 3: Bluetooth Changes. → (v2) Part 3: Bluetooth Changes. r=btian
Created attachment 8687810 [details] [diff] [review]
(2.2r) Use RIL_REQUEST_DEVICE_IDENTITY to get IMEI, IMEISV.r=echen,btian,a=2.2r+

update patch for v2.2r
Attachment #8687810 - Flags: review+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
and for 2.2r https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/8c712917dc6f
status-b2g-v2.2r: affected → fixed

Comment 23

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/11cc5726cc2d
https://hg.mozilla.org/mozilla-central/rev/8d957f94e34c
https://hg.mozilla.org/mozilla-central/rev/d308e79cbdbe
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox45: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 2.6 S1 - 11/20
(Assignee)

Updated

3 years ago
Attachment #8686527 - Attachment description: (v2) Part 1: IDL Interface Changes. → (v2) Part 1: IDL Interface Changes. r=echen
(Assignee)

Updated

3 years ago
Attachment #8687810 - Attachment description: Use RIL_REQUEST_DEVICE_IDENTITY to get IMEI, IMEISV.r=echen,btian,a=2.2r+ → (2.2r) Use RIL_REQUEST_DEVICE_IDENTITY to get IMEI, IMEISV.r=echen,btian,a=2.2r+
You need to log in before you can comment on or make changes to this bug.