Closed Bug 1126691 Opened 10 years ago Closed 10 years ago

[FFOS2.0][Woodduck][STK]Setup Event unnecessary envelope of language select.

Categories

(Firefox OS Graveyard :: General, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(b2g-v2.0 wontfix, b2g-v2.0M fixed, b2g-v2.1 fixed, b2g-v2.1S fixed, b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
2.2 S5 (6feb)
Tracking Status
b2g-v2.0 --- wontfix
b2g-v2.0M --- fixed
b2g-v2.1 --- fixed
b2g-v2.1S --- fixed
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: pengfei.huang.hz, Assigned: selee)

References

Details

Attachments

(9 files, 2 obsolete files)

Attached file Duplicate_envelope_of_language.zip (deleted) —
DEFECT DESCRIPTION:[GCF][STK]EVENT DOWNLOAD:event list can not remove by empty event list. REPRODUCING PROCEDURES: 1. Load a simcard to the phone which can send "event list"; 2. Execute "Setup Event->SAT15005->Init Event",event list setted up by this action: event list: MT call; call connected; call disconnected; language selection; ... 3.Execute "Setup Event->SAT15005->Normal Removal",event list setted up by this action, and withnothing in the event list. 4. Change language, envelop will received by this action--ko; EXPECTED BEHAVIOUR: 4. Change language, envelop should not received by this action because of step3. PS: This issue infection GCF.
Dear Mozilla, There are two problem
Summary: [FFOS2.0][Woodduck][STK]Setup Event duplicate envelope of language select. → [FFOS2.0][Woodduck][STK]Setup Event unnecessary envelope of language select.
Dear Mozilla, There are two problems we need to focus. One is duplicate envelopes of language selection. Test steps: 1.register events. MT call; call connected; ... language selection; ... 2.change language. 3.receive duplicate envelopes. As the log shows: AT> AT+STKENV="D3 07 82 020181900101"----->menuSelection AT> AT+STKENV="D6 0B 82 02 82 81 99 01 07 2D02656E" AT> AT+STKENV="D6 0B 82 02 82 81 99 01 07 2D02656E" The other is the bug description. when we clear the eventlist by executing test case, we still can receive envelope. This problem's log not attach yet. As we known, we needn't remove the observer of 'language.current'. So I guess the two problem are the same issue we don't remove the unnecessary envelopes.
Hi Sean, Could you please help to check the problem? Thanks!
Flags: needinfo?(selee)
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Attached patch bug1126691_master.diff (obsolete) (deleted) — Splinter Review
Hi Pengfei, I think the incorrect behavior should happen in both STK_EVENT_TYPE_USER_ACTIVITY and STK_EVENT_TYPE_LANGUAGE_SELECTION events, so I fix them together in the patch. Please help to try it. Thank you!
Assignee: nobody → selee
Status: NEW → ASSIGNED
Flags: needinfo?(selee) → needinfo?(pengfei.huang.hz)
Dear Sean, We get an exception: [JavaScript Error: "stkUserActivity is not defined" {file: "app://system.gaiamobile.org /js/icc_events.js" line: 177}]' when calling method: [nsIDOMSystemMessageCallback::handleMessage]" {file: "null" line: 0}] If we need to declare stkUserActivity as function or something else?
Flags: needinfo?(pengfei.huang.hz)
Attached patch bug1126691_master.diff (obsolete) (deleted) — Splinter Review
Hi Pengfei, Sorry for this mistake. I should add this as its context. Please try it again. Thank you very much.
Attachment #8555740 - Attachment is obsolete: true
Attached file mtklog_envelops_registers_v1.zip (deleted) —
Hi Sean, I'm sorry I was not find the root reason yesterday. Trying your patch, I find that we receive several envelopes because we register the same event several times. But it's incorrect. We just need one envelope whatever how many time we register the same event. And I find the "IdleScreen“ event is the same phenomenon. Other events VAL is confirming.
Attached patch bug1126691_master.diff (deleted) — Splinter Review
Hi Pengfei, Please help to try it. Thank you.
Attachment #8556233 - Attachment is obsolete: true
Flags: needinfo?(pengfei.huang.hz)
Hi Sean, We get an exception: main_log:01-28 20:09:25.946 161 161 E GeckoConsole: [JavaScript Error: "Argument 1 of Navigator.removeIdleObserver is not an object." {file: "app://system.gaiamobile.org/js/icc_events.js" line: 170}] This code line: navigator.removeIdleObserver(this.stkUserActivity);
Flags: needinfo?(pengfei.huang.hz)
Attached file merged.txt (deleted) —
And the file merged.txt is my merged code.
Hi Sean, I remove the code: navigator.removeIdleObserver(this.stkUserActivity); Then we get an exception again, at this code: window.navigator.mozSettings.removeObserver('language.current', this.icc_events_languageChanged); Exception: GeckoConsole: [JavaScript Error: "Argument 2 of SettingsManager.removeObserver is not an object." {file: "app://system.gaiamobile.org/js/icc_events.js" line: 168}] GeckoConsole: [JavaScript Error: "NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "Argument 2 of SettingsManager.removeObserver is not an object." {file: "app://system.gaiamobile.org/js/icc_events.js" line: 168}]'[JavaScript Error: "Argument 2 of SettingsManager.removeObserver is not an object." {file: "app://system.gaiamobile.org/js/icc_events.js" line: 168}]' when calling method: [nsIDOMSystemMessageCallback::handleMessage]" {file: "null" line: 0}] Can we declare stkUserActivity and icc_events_languageChanged in advance or find a better way?
If you found some similar errors, could you try to use the snippet like this first: if(this.icc_events_languageChanged){ window.navigator.mozSettings.removeObserver('language.current', this.icc_events_languageChanged); } I am trying to find whether there is any better way to handle these events. Once I got some results, I will share them. Thank you.
Attached patch bug1126691_master.diff (deleted) — Splinter Review
Hi Pengfei, I attach the full patch to fix the errors at comment 11. Could you help to try the patch? By the way, I am writing a whole new unit test to make icc_events more stable because there is no unit test for icc_events.js. Thank you very much for this.
Flags: needinfo?(pengfei.huang.hz)
Attached file mtklog_1_30.zip (deleted) —
Hi Sean, The unnecessary envelope has been removed. A little problem is the "UserActivity" and "IdleScreen" event was triggered many time. It's can be device problem?
Flags: needinfo?(pengfei.huang.hz)
Flags: needinfo?(selee)
Hi Pengfei, May I have the full source code of icc_events.js ?
Flags: needinfo?(selee) → needinfo?(pengfei.huang.hz)
Attached file icc_events.zip (deleted) —
Hi Sean, Please help me check. Many thanks.
Flags: needinfo?(pengfei.huang.hz)
Hi Pengfei, I can not find any problems, and your code runs correctly in my unit test. In the log at comment 14, I didn't see any events are sent in many times. Could you help to check it again?
Flags: needinfo?(pengfei.huang.hz)
The log records: 01-28 12:12:10.868 162 162 I GeckoDump: [system] icc_events_register - User activity event 01-28 12:12:12.164 162 162 I GeckoDump: [system] STK User Activity 01-28 12:12:13.341 162 162 I GeckoDump: [system] STK User Activity 01-28 12:12:15.482 162 162 I GeckoDump: [system] STK User Activity 01-28 12:12:17.249 162 162 I GeckoDump: [system] STK User Activity I can find one "User activity" event registered and many "STK User Activity" was print which will execute method this.downloadEvent many times.
Flags: needinfo?(pengfei.huang.hz)
I don't think these redundant events were triggered by multiple event registration. In your comment 18, the time difference between every two event download is very long (1000ms). If this is caused by redundant event registration, here is the partial log at your comment 7. The time difference is very short less than 100ms. 01-28 12:29:26.138 165 574 I Gecko : RIL Worker: [0] Stk Envelope {"event":{"eventType":7,"language":"zh"},"rilMessageClientId":0,"rilMessageToken":31,"rilMessageType":"sendStkEventDownload","tag":214,"eventList":7,"deviceId":{"sourceId":130,"destinationId":129},"language":"zh"} 01-28 12:29:26.148 165 574 I Gecko : RIL Worker: [0] Stk Envelope {"event":{"eventType":7,"language":"zh"},"rilMessageClientId":0,"rilMessageToken":32,"rilMessageType":"sendStkEventDownload","tag":214,"eventList":7,"deviceId":{"sourceId":130,"destinationId":129},"language":"zh"} 01-28 12:29:26.155 165 574 I Gecko : RIL Worker: [0] Stk Envelope {"event":{"eventType":7,"language":"zh"},"rilMessageClientId":0,"rilMessageToken":33,"rilMessageType":"sendStkEventDownload","tag":214,"eventList":7,"deviceId":{"sourceId":130,"destinationId":129},"language":"zh"} How do you trigger User Activity event?
Flags: needinfo?(pengfei.huang.hz)
BTW, what about the test result of IdleScreen?
Sorry for my unclear statements. It's not caused by redundant event registration. I press home key, select STK menu, or any operation will trigger the User Activity event. And IdleScreen was triggered many time when I click home key again and again.
Flags: needinfo?(pengfei.huang.hz)
What I want to know is the test result of STK_EVENT_TYPE_LANGUAGE_SELECTION?
In your code, I don't get why you modify the following code window.addEventListener('lockscreen-appopened', << Mozilla code this.register_icc_event_idlescreen); to window.addEventListener('home', << TCL code this.register_icc_event_idlescreen); Please check your code again.
I think the comment 23 can explain the behavior at your comment 21. May I know the test result of STK_EVENT_TYPE_LANGUAGE_SELECTION ? Thank you.
Hi Sean, Patch at comment13 has resolved the problem about STK_EVENT_TYPE_LANGUAGE_SELECTION. The 'home' eventType meets VAL requirement the device should receive the event when back to home screen by clicking home key. I will check the code again. Thanks.
Hi Pengfei, Thanks for your effort. Based on your comment 0, comment 25 and summery, the patch at comment 13 can meet your requirement. Can we say this issue is resolved and PASS?
Flags: needinfo?(pengfei.huang.hz)
Blocks: 1127730
Hi Sean, Yes,please. Great help, Many Thanks.
Flags: needinfo?(pengfei.huang.hz)
Attached file PR for master (deleted) —
Hello Fernando, Here is my PR for this bug. I fix the event register issue of STK_EVENTs. Could you help to review it? Thank you!
Attachment #8557022 - Flags: review?(frsela)
Comment on attachment 8557022 [details] PR for master r+ with one question. Thank you for taking this !
Attachment #8557022 - Flags: review?(frsela) → review+
Hi Fernando, I answer your question on github. Let's discuss it if you have any comments. Thank you.
Blocks: Woodduck_Blocker
No longer blocks: Woodduck_P2
Priority: -- → P1
Comment on attachment 8557022 [details] PR for master [Approval Request Comment] [Bug caused by] (feature/regressing bug #): [User impact] if declined: The event registration is not removed before registering a new event list, so the duplicated event envelope will be sent is totally incorrect. This behavior disobey the spec at "6.4.16 SET UP EVENT LIST" in "3GPP TS 11.14" as well. [Testing completed]: Partner tested PASS in their LAB. [Risk to taking this patch] (and alternatives if risky): This modification is only related to STK setup event, and it won't affect to other components. [String changes made]: None
Attachment #8557022 - Flags: approval-gaia-v2.2?
Attachment #8557022 - Flags: approval-gaia-v2.1?
Blocks: 1132363
Attachment #8557022 - Flags: approval-gaia-v2.2?
Attachment #8557022 - Flags: approval-gaia-v2.2+
Attachment #8557022 - Flags: approval-gaia-v2.1?
Attachment #8557022 - Flags: approval-gaia-v2.1+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: