Created attachment 651476 [details] [diff] [review]
Comment on attachment 651476 [details] [diff] [review]
Review of attachment 651476 [details] [diff] [review]:
@@ +9,5 @@
> readonly attribute PRUint64 totalBytes;
> readonly attribute PRUint64 freeBytes;
> + // shared, available, unavailable
I'd put quotes around these for clarity.
This is not working for me in the Gallery app.
If /sdcard is in the "shared" or "unavailable" state, then calling stat() never returns a result to onsuccess.
Instead, onerror is called with request.error.name set to:
Unknown file path = /sdcard/DCIM path =
It looks to me like the only time stat() works is when the card is already in the available state.
This was tested on the otoro with the Gallery app temporarily blacklisted. Haven't tested it OOP.
Testing it OOP shows the same behavior except that the stat error us truncated to "Unknown"
I've landed a change to the Gaia app to track this change. If you use the latest Gallery app, you can confirm that the onerror() handler of the stat() request is being called if there is no sdcard or if it is mouned for UMS.
Created attachment 652284 [details] [diff] [review]
patch v.1 followup
I've reopened this because it is not working for OOP processes.
Gallery is now OOP. If I call stat with no card or during USB Mass Storage, the onerror handler on the stat request is triggered.
But screenshots are in process as part of the system app. And they get correct results when calling stat() in either of those two conditions.
Created attachment 654449 [details] [diff] [review]
patch v.1 - followup - followup
missed a place