Closed Bug 881664 Opened 8 years ago Closed 7 years ago

Camera 'pick' pitfall when there is no sdcard


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

Gonk (Firefox OS)
Not set


(blocking-b2g:leo+, b2g18 verified, b2g-v1.1hd fixed)

blocking-b2g leo+
Tracking Status
b2g18 --- verified
b2g-v1.1hd --- fixed


(Reporter: gerard-majax, Assigned: johnhu)



(Keywords: late-l10n)


(4 files, 2 obsolete files)

If you try to take a picture from the Camera when there is no SD card and that this is started from the 'pick' WebActivity, you get stuck in the "No SD card" error message with no other way to get out than to reboot.

Steps to reproduce:
0. Ensure no SD card is present in the device
1. Open SMS app, tap to attach a file
2. From the activity chooser, select Camera
3. Kaboom, you get suck on the error message stating that there is no SD card.

Reproduced with gaia master.
blocking-b2g: leo? → leo+
Assignee: nobody → mshiao
Assignee: mshiao → johu
Attached file patch for this bug (obsolete) —

I done the following change:
1. add a header section in overlay only containing back button. 
2. add css of this header section to show above overlay-container
3. check if it is shown with pick activity, if yes, show header section, vice visa.
4. Once overlay shown, all buttons are disabled including cancelPick. So, I create another method "cancelPickActivity" which is chained with cancelPick function for back button.
Attachment #762475 - Flags: review?(dale)
Attached image Patched UI (obsolete) —
Comment on attachment 762475 [details]
patch for this bug

I am going to clear the review and needinfo UX for this, the code looks great and I think it would be mergable as it, but not sure about the UX

I feel like this should probably be an alert style UI with a big red button in the bottom to cancel the pick activity, the small header button on top of an overlay feels wrong and non obvious for the user what to do.
Attachment #762475 - Flags: review?(dale) → feedback?(firefoxos-ux-bugzilla)
I've noticed the same behavior with Music, and probably with Videos too ...
Thanks Dale. Let's wait for UX's opinion.
See Also: → 885728
Hi Stephany, can you help with this? its been pending for some time.

Flags: needinfo?(swilkes)
Wayne, it's been "pending for some time" but only because UX was flagged for the first time on July 4, a national holiday. Today is our first day back since we also had July 5 off for the FFOS launch. I will assign it to someone on our team this morning because it is blocking.
Flags: needinfo?(swilkes) → needinfo?(firefoxos-ux-bugzilla)
The feedback for was filed on the 14th of June, but I marked feedback? instead of needinfo? apologies if that is the wrong way
Ah - good to know. This wouldn't have come up in our usual query because feedback is only attached to the patch. Sorry about that. Assigned to Rob.
Flags: needinfo?(firefoxos-ux-bugzilla) → needinfo?(rmacdonald)
Comment on attachment 762475 [details]
patch for this bug

Clearing f? as should have been needinfo
Attachment #762475 - Flags: feedback?(firefoxos-ux-bugzilla)
In this case, I propose we eliminate the need to show the error by removing pick options that are not available. So, if the memory card is not present, Gallery and Camera, for example, would not appear on the list. I'm assuming here that the Wallpaper link will always be available as the images are stored on phone memory.

Please flag if you have any questions or concerns.
Flags: needinfo?(rmacdonald)

Is it possible to implement like that?? The activity list is provided by others app which may not have the knowledge of availability checking of camera, or gallery app, for example.

And there is also a case about plugging USB cable while processing 'pick' activity.
Flags: needinfo?(dale)
Yup, that would require the system app having knowledge of when particular applications were able to provide these activities, I dont think that is really possible within the current implementation of activities (and cant think of any clean way to extend them to be able to do so), and as you brought up it is always possible that the sdcard becomes inaccessible during picking an image.

re needinfoing firefox-ux as I am fairly sure we will need to implement this as was originally patched (just with a possible improved UI)
Flags: needinfo?(dale) → needinfo?(firefoxos-ux-bugzilla)
Thanks Dale. What's the UI question for the latest needinfo? Is it a question of what should be implemented, something else? Sorry I'm not grokking! :(
Hi John and Dale...

I had a feeling that proposal might not be feasible within the timeframe. That said, I'd still like to work towards that and have flagged Peter to add it to the systems group's long backlog.

As an interim solution, I've attached a screenshot that is more in line with our UX guidelines. Please flag me if you have any questions or concerns.

Best regards,
Flags: needinfo?(firefoxos-ux-bugzilla) → needinfo?(pdolanjski)
!. use building block confirm to display the error message
2. remove css which is duplicated with building block
3. add codes to show close button when picking.
Attachment #762475 - Attachment is obsolete: true
Attachment #762977 - Attachment is obsolete: true
Attachment #775550 - Flags: review?(dale)
Comment on attachment 775550 [details]
use building block to show the error overlay

Looks like a good patch, much nicer to be using building blocks

There is a syntax error that prevents it from working, mentioned on Github, there is also an wording issue as the error message doesnt make sense, but that is unrelated to this patch.
Attachment #775550 - Flags: review?(dale) → review-
Comment on attachment 775550 [details]
use building block to show the error overlay

Sorry about the syntax error. That should be that. It may be some keyboard typo here.

I had fix the "comma" error and rerun the whole test. Please review it again. Thanks.
Attachment #775550 - Flags: review- → review?(dale)
Comment on attachment 775550 [details]
use building block to show the error overlay

This is great, thanks
Attachment #775550 - Flags: review?(dale) → review+
Merge in

Closed: 7 years ago
Resolution: --- → FIXED
I was not able to uplift this bug to v1-train.  If this bug has dependencies which are not marked in this bug, please comment on this bug.  If this bug depends on patches that aren't approved for v1-train, we need to re-evaluate the approval.  Otherwise, if this is just a merge conflict, you might be able to resolve it with:

  git checkout v1-train
  git cherry-pick -x -m1 cdf71136ae6233cb790e9f9be16ae456726e38c1
  git commit
Flags: needinfo?(johu)
Hi John Ford, 

It is just a merge conflict. I had create a branch in my github repository for this bug in v1-train:

Thanks for your help.
Flags: needinfo?(johu)
Flags: needinfo?(jhford)
v1-train: c174c08d038b3d70a4f6a1835f48ecb43722f1a7
Flags: needinfo?(jhford)
(In reply to Rob MacDonald [:robmac] from comment #15)
> That said, I'd still like to work towards that and have flagged Peter to add
> it to the systems group's long backlog.

Added to backlog.
Flags: needinfo?(pdolanjski)
No error message appears stating that there is no sd card inserted

Build ID: 20130722070207
Gaia: 41d10fb10be6916e6554eb440d9a97130ef23ce0
Platform Version: 18.1
v1.1.0hd: c174c08d038b3d70a4f6a1835f48ecb43722f1a7
See Also: → 914958
See Also: → 915039
See Also: → 915043
You need to log in before you can comment on or make changes to this bug.