Closed Bug 959660 Opened 10 years ago Closed 10 years ago

[Dialer] Text cut when it makes two calls

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(blocking-b2g:1.3+, b2g-v1.3 fixed, b2g-v1.3T fixed, b2g-v1.4 unaffected)

VERIFIED FIXED
blocking-b2g 1.3+
Tracking Status
b2g-v1.3 --- fixed
b2g-v1.3T --- fixed
b2g-v1.4 --- unaffected

People

(Reporter: lolimartinezcr, Assigned: rexboy)

Details

Attachments

(3 files)

Attached image 1980-01-06-01-07-27.png
Steps:

1. Call to an phone number
2. With active call, user call other differente phone number.

Expect result:
Show screen with two calls correctly

Actual result:
Show screen with two calls not correctly, text cut. (See attached)
blocking-b2g: --- → 1.3?
This looks similar to the problem seen in bug 957276.
blocking-b2g: 1.3? → 1.3+
Assignee: nobody → rexboy
During reproducing, I found the font size of the first call wasn't set to
that big in screenshot almost every time (but it should, I guess).

But the second call do be set bigger. Seems the app initializes the first phone before
font size (in Keypad) is prepared. So I think we actually need to fix two
things: 1. confirm the font size is correctly set on all calls,
and 2. Adjust css rule to avoid text cut.
Sorry, please ignore Comment 2. I'm misunderstanding the meaning of textcut.
If we are talking about the top of the call screen covered by statusbar,
I can reproduce it only on v1.3. Master is OK. And I guess this would be a regression from system app.
Component: Gaia::Dialer → Gaia::System
I'm investigating on it and found it should be the same problem with bug 960056. 

Race conditions between attentionScreen.show() and attentionScreen.hide().
Still not very sure how to solve it though. Continue tracing.
Update some investigation:

Seems the problem is going back to dialer:
https://github.com/rexboy7/gaia/blob/master/apps/communications/dialer/js/dialer.js#L70

Because we called launch('dialer') after pressing '+' button, the call screen dropped down right away -- this is the expected behavior in case of opening dialer from other places, but not what we want here. We need it to show just the keypad.
And, inside System app, after calling launch('dialer'), the attentionScreen.show() and
attentionScreen.hide() are called interchangeably just before transition is end, so hide() doesn't remove #attention-screen.status-mode correctly. the reason for the bug comes here.
Still thinking a good way to solve it.
Attached file Patch for v1.3
Just made a quick fix for this, based on discussion earlier.
This patch prevents hide() and show() being called together.

Alive would you help review this patch?

I also tried removing applaunch listener in attentionScreen and let showForOrigin() decide whether to show/hide the attentionScreen, but then the hide() is still called twice in a short time and then the transitionend listener is not called correctly. So I think blocking hide() from calling many times first would be easier for now.

Alive would you review this quick fix?
Attachment #8363571 - Flags: review?(alive)
Comment on attachment 8363571 [details]
Patch for v1.3

We need to be very careful. If the _hiding is not correctly unset, the callscreen will never show again. I suggest to add a timer or check className to know it's hiding or not. Please set review again.
Attachment #8363571 - Flags: review?(alive)
Comment on attachment 8363571 [details]
Patch for v1.3

OK, now it uses classname to determine hiding.

I just played around and seems everything is fine.
But we still need to ensure transitionend() is correctly called so that isHiding() can return false. Let's assume it do things right so far, or we need setTimeout.. :/
Attachment #8363571 - Flags: review?(alive)
Attachment #8363571 - Flags: review?(alive) → review+
Thank you Alive! :)

Merged on v1.3:
https://github.com/mozilla-b2g/gaia/commit/e5137ed5589d7f3bf0260b8920f874cd0f462f69
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Text cut into the bottom.
Tested in master
Gecko 85b8bb0
Gaia 4699d23
open a new bug?
Attached image 1980-01-06-13-43-22.png
(In reply to Loli from comment #11)
> open a new bug?

Sure, we can open a new bug for it.
(In reply to KM Lee [:rexboy] from comment #13)
> (In reply to Loli from comment #11)
> > open a new bug?
> 
> Sure, we can open a new bug for it.

Bug 964199 has just been opened. Thanks!
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: