Closed Bug 1084076 Opened 10 years ago Closed 9 years ago

[Usage][Notification Tray] Cost Control widget inaccurately displays 'No SIM' when deactivating Airplane mode.

Categories

(Firefox OS Graveyard :: Gaia::Cost Control, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v2.1 affected, b2g-v2.2 affected)

RESOLVED FIXED
Tracking Status
b2g-v2.1 --- affected
b2g-v2.2 --- affected

People

(Reporter: Marty, Assigned: mai)

References

()

Details

(Whiteboard: [2.1-Daily-Testing])

Attachments

(2 files)

Attached file Airplane_log.txt
Description:
When the user deactivates Airplane mode, the Cost Control widget inaccurately displays 'No SIM inserted. Insert a SIM to enable Usage.'  This happens both before and after the user runs through the initial Usage app set up for a given SIM.
   
Repro Steps:
1) Update a Flame device to BuildID: 20141016001201
2) Pull down the Notification Tray.
3) Press the Airplane icon to enable Airplane mode.
4) Press the Airplane icon again to disable Airplane mode.
5) Observe the Cost Control widget.
  
Actual:
Cost Control widget inaccurately displays 'No SIM' when deactivating Airplane mode.
  
Expected: 
Cost Control accurately displays either 'New SIM' message, or Usage data.
  
Environmental Variables:
Device: Flame 2.1 (319MB)
BuildID: 20141016001201 (Full Flash)
Gaia: 477a9e61c3edf12f32a62a19d329cd277202cc6b
Gecko: 67573e422a0f
Gonk: 52c909e821d107d414f851e267dedcd7aae2cebf
Version: 34.0 (2.1)
Firmware: V180
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0
  
Repro frequency: 5/5
See attached: video clip (URL), logcat

---------------------------

This issue DOES occur on Flame 2.2.
Cost Control widget inaccurately displays 'No SIM' when deactivating Airplane mode.

Environmental Variables:
Device: Flame 2.2 Master (319MB)
BuildID: 20141016040204 (Full Flash)
Gaia: 841d0d7d1b879f0ff4b5a8727f5dd23c7b0000a9
Gecko: a280a03c9f3c
Gonk: 52c909e821d107d414f851e267dedcd7aae2cebf
Version: 36.0a1 (2.2 Master)
Firmware: V180
User Agent: Mozilla/5.0 (Mobile; rv:36.0) Gecko/36.0 Firefox/36.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(pbylenga)
Additional note:  The cost control widget displays the inaccurate message as long as the notification tray is open.  If the tray is closed and then reopened, the widget will display properly. Tapping the widget when displaying the inaccurate message will open the Usage app without issue.
Not going to nominate to block, only a graphical issue, widget still launches Data Usage app.
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(pbylenga)
Assignee: nobody → marina.rodrigueziglesias
This bug is related with "Bug 1087847 - mozIccManager reports 0 SIMs, but mozMobileConnection does"

The root causes of this issue are explained on:
https://groups.google.com/forum/?hl=zh-TW#!topic/mozilla.dev.gaia/RHSqyuzoTxE
Depends on: 1087847
Hi Marina,

Thanks for your patch in bug 1087847 comment #7.
But with the patch, the widget still shows 'no sim' after disabling airplane mode (I can see widget received 'iccdetected' event). :(

I found that the widget seems still uses the old icc object which becomes invalid already, so widget is unable to get correct icc status after disabling airplane mode.

Once the icc is undetected, the icc object is no longer valid. Retrieving icc object again is required to get the valid one after receiving `iccdetected` event.
So I did some modification based on your patch (replacing https://github.com/gitmai/gaia/blob/2d377bc1d44d7eeecaa51f145d3a537c6f2c6948/apps/costcontrol/js/sim_manager.js#L84 by |_requestServiceSIMIcc(serviceId, onsuccess, onerror);|) and the widget works good.

Hope this help. :)
Hi Edgar,
I cannot make that change because of it breaks the caching of the icc value and it introduces a delay in a lot of methods. But, I'm going to test if I can force an icc reload marking it as dirty when the airplanemode is enabled or maybe when it is disabled (I don't know if it'll always work)

When I talk with Hsinyi about this topic, she told me that the icc object is no longer valid only on qc device. For this reason the iccdetected event is not fired on devices like madai or flame. I'm going to make new tests.

Are you testing this with a flame device? 

Best Regards
Flags: needinfo?(echen)
(In reply to Marina Rodríguez [:mai] from comment #6)
> Hi Edgar,
> I cannot make that change because of it breaks the caching of the icc value
> and it introduces a delay in a lot of methods. But, I'm going to test if I
> can force an icc reload marking it as dirty when the airplanemode is enabled
> or maybe when it is disabled (I don't know if it'll always work)
The changes I made might not a good solution, it's just for testing purpose.

> 
> When I talk with Hsinyi about this topic, she told me that the icc object is
> no longer valid only on qc device. For this reason the iccdetected event is
> not fired on devices like madai or flame. I'm going to make new tests.
> 
> Are you testing this with a flame device? 

Yes, I am testing this with flame. AFAIK, madai and flame are qc device.

> 
> Best Regards
Flags: needinfo?(echen)
Attached file patch v1.0
Hi Salva,
would you mind reviewing the patch?
Regards
Attachment #8542272 - Flags: review?(salva)
Comment on attachment 8542272 [details] [review]
patch v1.0

The patch is working and the solution looks great to me but let's tweak the modified test a little bit and add a new one [1].

Ask for my review again when you're done.
Thank you!

[1] https://github.com/mozilla-b2g/gaia/pull/27046/files#r22651490
Attachment #8542272 - Flags: review?(salva)
Comment on attachment 8542272 [details] [review]
patch v1.0

Updated the PR with your comments.
Attachment #8542272 - Flags: review?(salva)
Comment on attachment 8542272 [details] [review]
patch v1.0

LGTM, thank you very much!
Attachment #8542272 - Flags: review?(salva) → review+
Master: 727eb7ae9223df03047f094e1da5b083fa9a6780
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: