Closed Bug 1068540 Opened 10 years ago Closed 10 years ago

[camera] Recording stopped by power key is saved, but not reflected in Camera/Video/Gallery apps

Categories

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

defect
Not set
normal

Tracking

(blocking-b2g:2.0+, b2g-v2.0 verified, b2g-v2.0M verified, b2g-v2.1 unaffected, b2g-v2.2 unaffected)

VERIFIED FIXED
2.1 S7 (24Oct)
blocking-b2g 2.0+
Tracking Status
b2g-v2.0 --- verified
b2g-v2.0M --- verified
b2g-v2.1 --- unaffected
b2g-v2.2 --- unaffected

People

(Reporter: ver4ffos, Assigned: justindarc)

References

Details

(Whiteboard: [LibGLA,TD97124,DEV01, C])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36

Steps to reproduce:

Device flame.

1. Pressing the Hardware PowerKey twice -> Lockscreen appears 
2. Open camera from lockscreen.
3. Start recording 
4. Pressing Hardware PowerKey to end the recording.


Actual results:

Recording not saved.


Expected results:

Recording should be saved.
Component: General → Gaia::Camera
See Also: → 973179
Summary: [camera] recording stopped by power is not saved → [camera] recording stopped by power key is not saved
Whiteboard: [LibGLA,TD97124,DEV01, C]
Whiteboard: [LibGLA,TD97124,DEV01, C] → [LibGLA,TD97124,QE01, C]
Whiteboard: [LibGLA,TD97124,QE01, C] → [LibGLA,TD97124,DEV01, C]
I can reproduce with the below steps.

** Precondition **
settings - screen lock - lock screen on and passcode lock on

1. Press power key twice to turn on lockscreen
2. Open camera from lockscreen.
3. Start recording 
4. Press power key

The recording file should be saved.

But recording file doesn't save and you can't find this in gallery app also.
Flags: needinfo?(wilsonpage)
Flags: needinfo?(dmarcos)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hi hyuna I couldn't reproduce this issue with the latest build. 

The video can be saved correctly even I abruptly pressed the power key and interrupted the recording.

Can you please double confirm if this issue still exists ? I suppose it's already solved.

Thank you very much!
Flags: needinfo?(ver4ffos)
Flags: needinfo?(hyuna.cho82)
Hi, Rachelle
I can reproduce this on flame.
The version of flame is 20140904160718 in the build indentifier.

Did you turn on lock screen and passcode?

Plz launch camera app in secure mode.

If I tested in the latest version, plz let me know how to download on my flame.
I will check this on nexus 4 and let you know.

Thanks
Flags: needinfo?(hyuna.cho82)
Hi Hyuna, I did turn on lock screen and passcode.
My build Identifier is 20140930000618. It worked well. Thanks !
Flags: needinfo?(ver4ffos)
I tested on nexus 4 and it's reproduced.
Build Identifier: 20141002082326

My flame version has some problem so I can't test it.
Can I get the latest version for flame?
Flags: needinfo?(ryang)
I tested on Nexus4 and Flame device, Issue reproduced.
Flame Build Identifier: 20141002170510
Nexus4 Build Identifier:  20141002082326

Enable passcode lock.

One more scenerio to reproduce this issue in Flame:
1. Open camera from passcode enabled lockscreen.
2. Start recording.
3. press homescreen button.
4. Check recorded video.

Result: Recorded video not saved.
Hi,

I have tried the scenario several times on Flame, and it worked well no matter I abruptly ended the recording by Hardware PowerKey or pressing homescreen button ?

May I know do you use SD card for recording storage ?

Thanks!
Flags: needinfo?(ryang)
Hi, 

I reproduced with Flame without SDcard.

1. Enable "Passcode" on "ScreenLock". 
2. press power key to screen off.
3. press power key to screen on.
4. Open camera from "lockscreen". ( "please do not enter passcode" )
5. Start recording.
6. press homescreen button without stopping record. ( not HW key because it's flame.)
7. Check recorded video in Gallery.
Hi Mike,
Could you please kindly double confirm if this bug really exists now on Flame 2.0 build?
I cant reproduce this. Thank you very much !
Flags: needinfo?(mlien)
verify with the latest v2.0 gaia/gecko, this problem happen when lock screen passcode enabled
actually this video has been stored in the storage, no matter it's internal storage or SD card

Here's the problematic situation:
1. If lock screen passcode enabled
    In Gallery app, you CANNOT see this recorded video
    IN Video app, you CAN see this recorded video
2. The recorded video won't generate its thumbnail image in storage(it should be a JPEG image with the same file name), you can only find the video but no any bound image

Build Information:
Gaia-Rev        092d2b7678774c8b0b06dca0e0a8119e9eafdec3
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/69ca61f7edf3
Build-ID        20141006000202
Version         32.0
Device-Name     flame-kk
FW-Release      4.4.2
FW-Incremental  34
FW-Date         Tue Sep 30 14:06:36 CST 2014
Bootloader      L1TC00011840
Flags: needinfo?(mlien)
blocking-b2g: --- → 2.0?
(In reply to Mike Lien[:mlien] from comment #10)
> verify with the latest v2.0 gaia/gecko, this problem happen when lock screen
> passcode enabled
> actually this video has been stored in the storage, no matter it's internal
> storage or SD card
> 
> Here's the problematic situation:
> 1. If lock screen passcode enabled
>     In Gallery app, you CANNOT see this recorded video
>     IN Video app, you CAN see this recorded video
> 2. The recorded video won't generate its thumbnail image in storage(it
> should be a JPEG image with the same file name), you can only find the video
> but no any bound image
> 


Hi Gary,

I think it might be good to have an investigation from gaia view. Would you please help for this? Thanks.
Flags: needinfo?(gchen)
Flags: needinfo?(sku)
Flags: needinfo?(sku)
Hi vliu,
   Camera app will expect to receive 'storage change' event after file was saved successful. After my inspect camera can not received 'storage change' when lock screen passcode enabled, so the video thumbnail will not be display on left side.
   https://github.com/mozilla-b2g/gaia/blob/v2.0/apps/camera/js/lib/camera/camera.js#L985
Flags: needinfo?(gchen)
Updating description per comment 10.

dhylands, lockscreen interacting weirdly with DeviceStorage?
Flags: needinfo?(dhylands)
Summary: [camera] recording stopped by power key is not saved → [camera] Recording stopped by power key is saved, but not reflected in Camera/Video/Gallery apps
Before we go blaming device storage, we should investigate what we're doing in gaia.  After recording a video we wait for it to finish saving, and then we create a poster image for it. This poster image is what gallery needs to see in order to display the video.  (Videos with a poster image get displayed by Gallery. Those without only appear in the Video app).

So let's figure out why the poster image is not being created and saved in this secure mode abrupt termination case.

I agree with Mike Lien that this might be something to block on.

Given that neither Diego nor Wilson have responded to their needinfos for a week, let's see if this is something Justin can investigate.
Flags: needinfo?(jdarcangelo)
This issue was resolved in Bug 1019120, but the patch for it only exists in v2.1 and master (v2.2). If this is a legitimate blocker, the patch for Bug 1019120 can probably just be uplifted to v2.0.
Flags: needinfo?(jdarcangelo)
Hyuna and ver4ffos: does Justin's suggestion above resolve this bug for you?
Flags: needinfo?(ver4ffos)
Flags: needinfo?(hyuna.cho82)
Depends on: 1019120
Attached file pull-request (v2.0)
Alive: This one-line patch depends on the uplifting of Bug 1019120 to v2.0.
Attachment #8501277 - Flags: review?(alive)
Assignee: nobody → jdarcangelo
Clearing NI? for wilsonpage and dmarcos. Also clearing NI? for dhylands as this is NOT a DeviceStorage issue.
Flags: needinfo?(wilsonpage)
Flags: needinfo?(dmarcos)
Flags: needinfo?(dhylands)
Hi, David and Justin

I tested it on our device.

When press the power butten during recording the in secure mode, stop the recording and show thumbnail images in gallery and video app.
But when I press the home button, do not play recording stop sound and show thumbnail image in ONLY video app.

Thanks
Flags: needinfo?(ver4ffos)
Flags: needinfo?(hyuna.cho82)
(In reply to hyuna.cho from comment #19)
> Hi, David and Justin
> 
> I tested it on our device.
> 
> When press the power butten during recording the in secure mode, stop the
> recording and show thumbnail images in gallery and video app.
> But when I press the home button, do not play recording stop sound and show
> thumbnail image in ONLY video app.
> 
> Thanks

Good catch. The lockscreen code is different in v2.0 so I'll have to update this patch to handle that condition as well. Thanks!
blocking-b2g: 2.0? → 2.0+
Comment on attachment 8501277 [details] [review]
pull-request (v2.0)

Bypass to greg.

BTW it's really strange to uplift another bug in this one.
Attachment #8501277 - Flags: review?(alive) → review?(gweng)
(In reply to Alive Kuo [:alive][NEEDINFO!] from comment #21)
> Comment on attachment 8501277 [details] [review]
> pull-request (v2.0)
> 
> Bypass to greg.
> 
> BTW it's really strange to uplift another bug in this one.

I know. The other patch needs to be uplifted to provide the "softKill()" capability on SecureWindow. But, this isn't enough to resolve this particular problem on v2.0 because of the differences in the Lockscreen app in this branch.
Comment on attachment 8501277 [details] [review]
pull-request (v2.0)

Some nits. I think the major issue is the |console.log|. Of course the old convention isn't good enough (and we're preparing to fix it, at least on master), but we can stop to add more logs like this, if we add a DEBUG flag and create a |debug| method to print log according to it.
Attachment #8501277 - Flags: review?(gweng)
Comment on attachment 8501277 [details] [review]
pull-request (v2.0)

Greg: I have addressed the nits from your last review in this patch. Although, those nits were actually from the uplift of Bug 1019120 which has since been uplifted. Even still, this updated/rebased patch removes the console.log()'s and replaces them with this.debug()'s.
Attachment #8501277 - Flags: review?(gweng)
Hi, I think it's good now. But I notice some unit tests should be modified, too (it also failed at the Gaia-Try):

https://treeherder.mozilla.org/ui/#/jobs?repo=gaia-try&revision=b740bfbcc7ce

Could you update the patch with new tests? Thanks.
Flags: needinfo?(jdarcangelo)
(In reply to Greg Weng [:snowmantw][:gweng][:λ] from comment #25)
> Hi, I think it's good now. But I notice some unit tests should be modified,
> too (it also failed at the Gaia-Try):
> 
> https://treeherder.mozilla.org/ui/#/jobs?repo=gaia-try&revision=b740bfbcc7ce
> 
> Could you update the patch with new tests? Thanks.

Done!
Flags: needinfo?(jdarcangelo) → needinfo?(gweng)
Hi Justin

I tested your patch on our device and it works well by pressing power/home key.
Is there any update for review?

Thanks
Flags: needinfo?(jdarcangelo)
Comment on attachment 8501277 [details] [review]
pull-request (v2.0)

Thanks. From code and unit test it's OK now. But there is a Gij test failure, although I don't know whether it's an intermittent failure.
Attachment #8501277 - Flags: review?(gweng) → review+
Flags: needinfo?(gweng)
Comment on attachment 8501277 [details] [review]
pull-request (v2.0)

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): none
[User impact] if declined: Videos recorded by the user from a passcode-locked lockscreen are not saved if the user exits by tapping the "Lock" or the "Home" button.
[Testing completed]: Tested on Flame-v184, unit tests are green
[Risk to taking this patch] (and alternatives if risky): Low
[String changes made]: None
Attachment #8501277 - Flags: approval-gaia-v2.0?(release-mgmt)
(In reply to hyuna.cho from comment #27)
> Hi Justin
> 
> I tested your patch on our device and it works well by pressing power/home
> key.
> Is there any update for review?
> 
> Thanks

Hyuna: Patch has now been reviewed R+; Now awaiting approval to land on v2.0
Flags: needinfo?(jdarcangelo)
Moving over to Gaia::System::Lockscreen component since this patch is specific to the lockscreen.
Component: Gaia::Camera → Gaia::System::Lockscreen
NI Bhavana (see comment 29)
Flags: needinfo?(bbajaj)
Flags: needinfo?(bbajaj)
Attachment #8501277 - Flags: approval-gaia-v2.0?(release-mgmt) → approval-gaia-v2.0+
Landed on v2.0:

https://github.com/mozilla-b2g/gaia/commit/812ae91c9708a9116cdb2d15cc02a43ded862a78
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S7 (24Oct)
This issue is verified on Flame 2.0.

Result: The video taken during the lockscreen is saved in Gallery and Video app after the recording is ended by pressing the power button. (both with and without passcode on the lockscreen)

Device: Flame 2.0 (319mb)(Kitkat Base)(Full Flash)
BuildID: 20141029000205
Gaia: 9f5b6f025e528fabfcc068782cb9b492cb51a7f9
Gecko: de8cfd54bf93
Gonk: 48835395daa6a49b281db62c50805bd6ca24077e
Version: 32.0 (2.0)
Firmware: V188
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Verify passed, this issue can't be repro on Woodduck 2.0.
Attached: Verify_Woodduck_Video.mp4
Reproducing rate: 0/5

Woodduck build:
Gaia-Rev        cc690f8016b672475dc186bc7fd58aef45e684b7
Gecko-Rev       03d3ab62d5b07b915434f2d1d68495ad5915ecd2
Build-ID        20141118184148
Version         32.0
Blocks: Woodduck
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: