Closed Bug 977843 Opened 10 years ago Closed 10 years ago

[B2G][Camera] No Geolocation prompt when access the camera app through the lockscreen while passcode is enabled

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.4+, b2g-v1.3 unaffected, b2g-v1.4 affected)

RESOLVED WORKSFORME
blocking-b2g 1.4+
Tracking Status
b2g-v1.3 --- unaffected
b2g-v1.4 --- affected

People

(Reporter: selkabule, Assigned: alive)

Details

(Keywords: regression, Whiteboard: burirun1.4-1)

Description:
There is no geolocation prompt message, when accessing the camera from the lock screen while passcode was enabled. The message will show only after unlocking the device with the passcode.

Prerequisites: Set Geolocation to "Ask" in app permission. 

Repro Steps:
1) Updated Buri to BuildID: 20140227040202
2) Open Settings app
3) Turn on Passcode for lockscreen
4) Lock the phone and tap the power button to wake up the device
5) Tap on the camera icon and wait couple of seconds

Actual:
The Geolocation prompt message will not show after waiting any amount of time

Expected:
The Geolocation prompt message must show after couple of seconds so the user has can accept or deny shearing the location

Environmental Variables:
Device: Buri 1.4 MOZ RIL
BuildID: 20140227040202
Gaia: 22d48b62df7901ad45044f66e15e7d8943884a06
Gecko: a98a1d78817f
Version: 30.0a1



Repro frequency:5/5, 100%
Link to failed test case: https://moztrap.mozilla.org/manage/case/8780/
Link to video clip (https://www.youtube.com/watch?edit=vd&v=-pl2owZhOrc)
This issue does not reproduce on Buri V1.3 

Environmental Variables:
Device: Buri 1.3 MOZ RIL
BuildID: 20140227004003
Gaia: ad504390a7a5f094f8967f80a0f29a1e6552535e
Gecko: 6bd9b70a1b6c
Version: 28.0
Firmware Version: V1.2-device.cfg

The prompt message displays after couple of seconds when launching the camera from the lockscreen
Whiteboard: burirun1.4-1
blocking-b2g: --- → 1.4?
blocking-b2g: 1.4? → 1.4+
QA Contact: sarsenyev
We probably shouldn't allow a user who does not know the PIN (i.e. not the phone's owner) make the geolocation decision anyway. Doesn't that choice get remembered?  

So I think that the goal of this bug should not be to get the choice dialog to appear. The goal should be to ensure that if the owner of the phone has not already approved geolocation then no geolocation happens when the camera is used while the phone is locked.

Needinfo for the reporter: does the geolocation indicator display in the statusbar in this situation?

One of the camera developers could add some console.log() statements to the geolocation code to see if we are ever actually getting a location when used locked.  It would be interesting to know this both in the first use scenario where the dialog has not appeared yet, and in later scenario where geolocation had been approved while the phone was unlocked.
Flags: needinfo?(selkabule)
Hi David, I agree with you it shouldn't allow a user who does not know the PIN. The geolocation prompt will appear only after unlocking the device with the pin code, So i think the testcase is invalid in this situation.
Flags: needinfo?(selkabule)
(In reply to David Flanagan [:djf] from comment #2)
> We probably shouldn't allow a user who does not know the PIN (i.e. not the
> phone's owner) make the geolocation decision anyway. Doesn't that choice get
> remembered? 

If the phone owner granted remember my decision here when the prompt originally appeared during camera use post the lockscreen, then the geolocation would be granted to the app process here. So someone who doesn't own the phone can allow pictures to be taken with location known if the phone owner granted it previously.

> 
> So I think that the goal of this bug should not be to get the choice dialog
> to appear. The goal should be to ensure that if the owner of the phone has
> not already approved geolocation then no geolocation happens when the camera
> is used while the phone is locked.

That would be actually arguing that the bug is invalid then. However, I think that's an inconsistent design - it seems a bit strange to me that if the phone owner granted the camera geolocation access post the lockscreen that they would be okay with granting geolocation access without getting through the lockscreen. What I think we should be doing instead is not providing geolocation information at all for pictures taken from the lockscreen. That would align with a phone owner's trust model - I trust to grant my location when I have demonstrated that I own the device, but I do not want to grant it to people randomly who do not own my device.

Adding Paul for needinfo to get a security perspective here.
Flags: needinfo?(ptheriault)
Regression Window:
Last Working build:
1.4 Environmental Variables:
Device: Buri 1.4
BuildID: 20140129040244
Gaia: 59e477229162926981cc00cf5d6c53f9614f17dd
Gecko: 7e79536aca0a
Version: 29.0a1
Firmware Version: v1.2-device.cfg

The first broken build:
1.4 Environmental Variables:
Device: Buri 1.4
BuildID: 20140130040201
Gaia: 0bc0e703df197d46dfffb9ac65cb85d2e3e10c4a
Gecko: bf49e4428906
Version: 29.0a1
Firmware Version: v1.2-device.cfg

Link to broken gaia:
https://github.com/mozilla-b2g/gaia/compare/59e477229162926981cc00cf5d6c53f9614f17dd...0bc0e703df197d46dfffb9ac65cb85d2e3e10c4a
Last Working Gaia: Issue does NOT reproduce
Gaia: 59e477229162926981cc00cf5d6c53f9614f17dd
Gecko: bf49e4428906

First Broken Gaia: Issue DOES reproduce
Gaia: 0bc0e703df197d46dfffb9ac65cb85d2e3e10c4a
Gecko: 7e79536aca0a
So it turns out the above speculation isn't right on the problem here. The regression window here shows no evidence of camera changes, which means the problem here isn't related to the camera directly. My guess is this is a system app problem.

We should continue to analyze some of speculation points above, but let's do that in a separate bug. Let's get back the old functionality we had working previously in the system app, so that we're consistent with past releases.
Component: Gaia::Camera → Gaia::System::Window Mgmt
Flags: needinfo?(ptheriault)
Note that whatever we do here with the system app should be independent of what behavior we're expecting to do with the camera app, as the system app deals with handling content interactions across the entire phone. The camera app can choose to change it's behavior if it so desires to.
Taken first.
Assignee: nobody → alive
This issue does not repro in the latest 1.4 build, but a similar issue occurs that has been bugged separately. the geolocation prompt does not appear when attaching an image to another app from the camera.
https://bugzilla.mozilla.org/show_bug.cgi?id=983874

Environmental Variables:
Device: Buri v1.4 Moz RIL
BuildID: 20140314093423
Gaia: 1cef557f9e9a865d1bf49d99a8f1cca1f0f4f5c4
Gecko: 142911d6d987
Version: 30.0a1
Firmware Version: v1.2-device.cfg
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.