Closed Bug 1090501 Opened 10 years ago Closed 10 years ago

[Camera][Gecko][Perf] Pre-emptively open camera hardware when certified app has 'camera' permission

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.1 S8 (7Nov)

People

(Reporter: mikeh, Assigned: mikeh)

References

Details

(Keywords: perf)

Attachments

(2 files, 5 obsolete files)

No description provided.
Comment on attachment 8512977 [details] [diff] [review] Pre-emptively open camera hardware, v1 Review of attachment 8512977 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/camera/CameraPreferences.cpp @@ +293,5 @@ > + if (strcmp(aTopic, "init-camera-hw") == 0) { > + return PreinitCameraHardware(); > + } > + > + printf_stderr("Got unhandled topic '%s'\n", aTopic); DOM_CAMERA_LOGE instead of printf_stderr? ::: dom/camera/DOMCameraManager.h @@ +91,5 @@ > > +#ifdef MOZ_WIDGET_GONK > + static void PreinitCameraHardware(); > +#endif > + nit: whitespace ::: dom/ipc/TabChild.cpp @@ +1837,5 @@ > + nsCOMPtr<nsIObserverService> observerService = > + mozilla::services::GetObserverService(); > + observerService->NotifyObservers(nullptr, "init-camera-hw", nullptr); > + } > + } This is needs to be improved a bit to: - check if the app is certified - add some checks on return values (secMan, NS_NewURI for instance).
Attachment #8512977 - Flags: review?(fabrice) → feedback+
Incorporate review feedback.
Attachment #8512977 - Attachment is obsolete: true
Attachment #8513805 - Flags: review?(fabrice)
Comment on attachment 8513805 [details] [diff] [review] Pre-emptively open camera hardware, v2 Review of attachment 8513805 [details] [diff] [review]: ----------------------------------------------------------------- r=me with nit fixed. ::: dom/ipc/TabChild.cpp @@ +1826,5 @@ > + > + uint16_t status = nsIPrincipal::APP_STATUS_NOT_INSTALLED; > + principal->GetAppStatus(&status); > + bool isCertified = status == nsIPrincipal::APP_STATUS_CERTIFIED; > + if (NS_WARN_IF(!isCertified)) { No need to warn here - nothing bad happened.
Attachment #8513805 - Flags: review?(fabrice) → review+
(In reply to Fabrice Desré [:fabrice] from comment #4) > No need to warn here - nothing bad happened. Agreed. I was thinking I can probably remove the warning from the permissions check as well, for the same reason.
Incorporate review feedback, carrying r+ forward.
Attachment #8513805 - Attachment is obsolete: true
Attachment #8515118 - Flags: review+
Summary: [Camera][Gecko][Perf] Pre-emptively open camera hardware when app has 'camera' permission → [Camera][Gecko][Perf] Pre-emptively open camera hardware when certified app has 'camera' permission
And the missing headers that didn't break the unified build: https://hg.mozilla.org/integration/b2g-inbound/rev/4cb1154b0190
Target Milestone: --- → 2.1 S8 (7Nov)
This conflicted with the backout of bug 1020368, so I had to back this out too :( https://hg.mozilla.org/integration/b2g-inbound/rev/940af94c4bc6
Depends on: 1092408
Oh geez, this gets worse. Your bustage follow-up here fixed the non-unified bustage from that push too :( So it sounds like you should roll the bustage fix here into whatever lands first and then we should be good to go. Sorry for the mess :(
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
This is breaking the camera app. The automation suite is failing because after opening the camera app a loading spinner is displayed and does not disappear. The issue is also reproduced manually 5 out of 5 attempts. The tests first failed in the following Jenkins run: http://jenkins1.qa.scl3.mozilla.com/view/UI/job/flame-kk-319.b2g-inbound.ui.functional.smoke/984/HTML_Report/ Is there another patch that should have landed together with this? If not, please back out this patch.
Status: RESOLVED → REOPENED
Flags: needinfo?(cbook)
Resolution: FIXED → ---
Attached file logcat.txt (obsolete) —
This was tested on Flame 319MB shallow flash on top of v188-1. I have attached the logcat from when I tried opening the app manually.
(In reply to Robert Chira [:RobertC] from comment #13) > This is breaking the camera app. The automation suite is failing because > after opening the camera app a loading spinner is displayed and does not > disappear. The issue is also reproduced manually 5 out of 5 attempts. > > The tests first failed in the following Jenkins run: > http://jenkins1.qa.scl3.mozilla.com/view/UI/job/flame-kk-319.b2g-inbound.ui. > functional.smoke/984/HTML_Report/ > > Is there another patch that should have landed together with this? > If not, please back out this patch. Per past discussions and agreements with QA, backout requests for regressions that don't impact our CI infrastructure should go first to the patch author and then another module peer. This is to minimize risks associated with other dependencies that may be currently unknown to people on our team. If a module peer isn't reachable and this is urgent (i.e. backout and respin nightlies ASAP because the phone is unusable), please let us know. Redirecting the backout request to mike. Thanks!
Flags: needinfo?(cbook) → needinfo?(mhabicher)
Blocks: 1094808
Confirmed this has broken camera app, with symptoms described in comment 13. Please backout.
Investigating.
Flags: needinfo?(mhabicher)
It looks like the hardware is opening, but there is no initial configuration: 11-06 08:27:19.310 1370 1394 I PRLog : 1668288[b2679980]: CameraControlImpl::OnUserError : aContext='SetConfiguration' (8), aError=0x80004005 11-06 08:27:19.430 1370 1370 I PRLog : -1225137836[b434a080]: Camera mode still unspecified, nothing to do 11-06 08:27:19.430 1370 1370 I PRLog : -1225137836[b434a080]: DOM OnHardwareStateChange: open This probably didn't show up in testing because the camera had already cached an initial configuration. Testing a fix now.
Attached file pull-request (master)
Attachment #8518301 - Flags: review?(jdarcangelo)
Comment on attachment 8518301 [details] [review] pull-request (master) LGTM. Ship it!
Attachment #8518301 - Flags: review?(jdarcangelo) → review+
Attachment #8518129 - Attachment is obsolete: true
Attachment #8518316 - Flags: review?(aosmond)
Attachment #8518316 - Flags: review?(aosmond) → review+
Add header to patch file; carry r+ forward.
Attachment #8515118 - Attachment is obsolete: true
Attachment #8518316 - Attachment is obsolete: true
Attachment #8518345 - Flags: review+
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: