Closed Bug 858444 Opened 11 years ago Closed 11 years ago

[Call] Proximity sensor does not work during phone call when screen is off.

Categories

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

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:leo+, b2g18 fixed, b2g18-v1.0.0 wontfix)

RESOLVED FIXED
1.1 QE1 (5may)
blocking-b2g leo+
Tracking Status
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix

People

(Reporter: hanj.kim25, Assigned: mchen)

References

Details

(Whiteboard: [TD-8341])

Attachments

(1 file, 2 obsolete files)

It appears that the proximity sensor does not work during phone call when screen is off. However, the proximity sensor should still work even after the screen is off.
There is also a bug 845660, which shows that the proximity sensor should not be working in speaker mode or in bluetooth mode. Let me set this bug as depends in this bug so they are linked and can be fixed all at once.
Depends on: 845660
Hi,

May I knew the what function and user scenario is performed by proximity sensor when screen is off?

Thanks.
blocking-b2g: --- → leo?
adding UX to confirm expected behavior for this bug and bug 845660
Flags: needinfo?(jcarpenter)
Flags: needinfo?(jachen)
blocking-b2g: leo? → ---
User scenario : 

When turning off screen by user, proximity sensor does not work.
but, when turning off screen due to timed-out(wait some minute, turn screen off automatically), proximity sensor should work.
Status: UNCONFIRMED → NEW
Ever confirmed: true
In Android case, proximity sensor is working after the screen turned off by screen time-out timer,
But GAIA doesn't work, please give your UX confirm for current operation is correct or not
Assignee: nobody → promise09th
Whiteboard: [TD-8341]
Assignee: promise09th → nobody
Flags: needinfo?
This issue was identified as a Leo QE1 blocker. Nominating for leo?
blocking-b2g: --- → leo?
Flags: needinfo?
Here is my suggestion:
When a call is initiated (answered or dialed), the proximity sensor should become active.

If the user puts the phone up to their ear, the screen should turn off.  When the user removes the phone from their ear, the screen should turn on showing the active call screen (not lock).

As per comment 1, the proximity sensor should be disabled for speakerphone or when Bluetooth is enabled.
Flags: needinfo?(jcarpenter)
Flags: needinfo?(jachen)
Target Milestone: --- → Leo QE1 (5may)
Assignee: nobody → mchen
I agree Casey's opinion. But you miss one point regarding the comment5. Please check the UX scenario.
needinfo on cyee for comment 8, and leo+ along with bug 845660
blocking-b2g: leo? → leo+
Flags: needinfo?(kyee)
Just to clarify the point in comment 5 as per my offline discussion with LG here at the Madrid work week:

For the case:
1. While the user is on a active call and removes the phone from their ear, the phone screen turns On.
2. If the user leaves the phone idle for a certain amount of time, the screen will turn Off after a set time-out period.
3. When the user returns the phone to their ear, the proximity sensor should still be active so that when the user removes the phone from their ear, the screen should turn back On.   

The current behavior is that in step 3, the screen remains Off.
Flags: needinfo?(kyee)
Priority: -- → P2
Attached patch Patch v1 (obsolete) — Splinter Review
In this patch, I used the argument called instant in turnScreenOff() to identify whether this screen off is caused by power key or screen timeout. If it is caused by power key then remove detecting of proximity sensor or keep to detecting.

There are two case for instant to true. One is caused by power key and the other is by screen timeout in lockscreen. But in voice_call state, there is no lockscreen there. So I can use instant == true to identify whether this screen off is caused by power key or not.
Attachment #741241 - Flags: review?(timdream)
Based on the information from Marco, it can be fixed before the end of this week.
(In reply to Marco Chen [:mchen] from comment #11)
> There are two case for instant to true. One is caused by power key and the
> other is by screen timeout in lockscreen. But in voice_call state, there is
> no lockscreen there.

No, there's a chance to have lockscreen.Locked when on a call, or did I misunderstand what do you mean by no lockscreen?
(In reply to Alive Kuo [:alive] from comment #13)
> (In reply to Marco Chen [:mchen] from comment #11)
> > There are two case for instant to true. One is caused by power key and the
> > other is by screen timeout in lockscreen. But in voice_call state, there is
> > no lockscreen there.
> 
> No, there's a chance to have lockscreen.Locked when on a call, or did I
> misunderstand what do you mean by no lockscreen?

Yeah, re-read the screen_manager.js code I found that |instant| doesn't hold the value Marco expects, specifically on L436, where the lock screen might be underneath the attention screen.

Need a better solution here.

(In reply to khu from comment #12)
> Based on the information from Marco, it can be fixed before the end of this
> week.

Ah, no.
Update: we had some plan after a quick offline discussion.
Attached patch Patch v2 (obsolete) — Splinter Review
1. This patch is created by following the discussion.
2. According to modify something related to screen off so the testing includes
  not on in_call state:
    a. timeout on homescreen/lockscreen.
    b. press power key on homescreen/lockscreen.
  on in_call state:
    a. timeout on homescreen/lockscreen.
    b. press power key on homescreen/lockscreen.

3. The reason of asking feedback only is
    I found that scm_toggleScreen() will call scm_turnScreenOff() but I don't know the use case of it and don't find any one calling it. Could Alive or Tim give the suggestion for this? Is it related to reason of timeout or we need to create a new reason for it?

Thanks.
Attachment #741241 - Attachment is obsolete: true
Attachment #741795 - Flags: feedback?(alive)
Attached patch Patch v2Splinter Review
Hi Alive,

Please help to review this patch.
Thanks.
Attachment #741795 - Attachment is obsolete: true
Attachment #741795 - Flags: feedback?(alive)
Attachment #742238 - Flags: review?(alive)
Comment on attachment 742238 [details] [diff] [review]
Patch v2

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

Looks good, r=me
Attachment #742238 - Flags: review?(alive) → review+
https://github.com/mozilla-b2g/gaia/commit/e335d27bcb1919f79215d8b47fa57cbc572d5862
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Uplifted e335d27bcb1919f79215d8b47fa57cbc572d5862 to:
v1-train: 41260ba88cd55136229f9835009a4700be9a2bbc
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: