[camera] LED & Flash toggles are shown even when no LED or Flash present on hardware

Bug #1542094 reported by Bill Filler
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
John McAleely
The Avila project
Fix Released
Critical
Chunsang Jeong
android (Ubuntu)
Invalid
High
Unassigned
camera-app (Ubuntu)
Invalid
High
Florian Boucault

Bug Description

could be Freiza specific.

We shouldn't be showing controls for flash, torchlight if they are not present on hardware, but apparently we are (according to design)

Tags: cqa-verified
Bill Filler (bfiller)
Changed in camera-app (Ubuntu):
assignee: nobody → Bill Filler (bfiller)
assignee: Bill Filler (bfiller) → Florian Boucault (fboucault)
Changed in canonical-devices-system-image:
assignee: nobody → Bill Filler (bfiller)
importance: Undecided → High
Changed in camera-app (Ubuntu):
importance: Undecided → High
Revision history for this message
Florian Boucault (fboucault) wrote :

Can't test without Freiza but it's clear that the app knows how to that: test with BQ Aquaris E4.5 with front camera: no flash option is displayed.

Bill Filler (bfiller)
no longer affects: libhybris (Ubuntu)
Changed in android (Ubuntu):
importance: Undecided → High
Changed in canonical-devices-system-image:
assignee: Bill Filler (bfiller) → John McAleely (john.mcaleely)
Changed in avila:
status: New → Confirmed
importance: Undecided → High
milestone: none → ww06-2016
Changed in canonical-devices-system-image:
milestone: none → ww08-2016
status: New → Confirmed
Revision history for this message
Bill Filler (bfiller) wrote :

this seems to be a device specific bug where the correct camera capabilities are not being reported up the stack. Something in backend (hybris, etc) most likely needs a fix

Changed in camera-app (Ubuntu):
status: New → Invalid
Changed in avila:
assignee: nobody → John McAleely (john.mcaleely)
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

This was reported by John also and I marked it invalid. I believe the back camera on freiza has a flash (of course it should) and its simply not working.
The front camera doesn't display a flash option.

Changed in canonical-devices-system-image:
status: Confirmed → Invalid
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Entered bug #1544982

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in android (Ubuntu):
status: New → Confirmed
Revision history for this message
John McAleely (john.mcaleely) wrote :

I am not sure where Pat has the impression this tablet has a flash on the rear camera. Here is the spec:

http://www.bq.com/es/aquaris-m10

I see no flash

Changed in avila:
assignee: John McAleely (john.mcaleely) → Chunsang Jeong (chunsang)
importance: High → Critical
Revision history for this message
John McAleely (john.mcaleely) wrote :

I assume that our android parts are reporting a flash in error. On the other hand if there is a flash (!), then it needs to be enabled.

Changed in canonical-devices-system-image:
status: Invalid → Confirmed
Changed in android (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

There is no flash apparent, all of the articles that picked up the announcement said so, I assume it was a type somewhere

Revision history for this message
Chunsang Jeong (chunsang) wrote :

Frieza cam doesn't have hw flash as commented earlier, meanwhile Frieza cam hal was hard coded to return 1 (has hw flash) which is apparently needed to be fixed.
Just for double check, whatever cam hal returns "has" or "doesn't has", cam ui has flash icon for main, while doesn't have it for front cam, respectively.

When Frieza cam hal got flash request, it just wrote log as below;
D/flash_mgr_m.cpp( 1130): flash_mgr_m.cpp isNeedFiringFlash() XO OO

If fixed;
D/flash_mgr_m.cpp( 1175): flash_mgr_m.cpp isNeedFiringFlash() No flash hw

Jason Yen (jasonyen)
Changed in avila:
milestone: backlog → ww08-2016
Revision history for this message
Chunsang Jeong (chunsang) wrote :

Can someone give me a hint that how app detects if there's a hw flash or not?

Changed in avila:
status: Confirmed → In Progress
Revision history for this message
Florian Boucault (fboucault) wrote :

The camera app checks the result of QCameraFlashControl::isFlashModeSupported(...)
http://doc.qt.io/qt-5/qcameraflashcontrol.html#isFlashModeSupported

It considers a flash is available if:
isFlashModeSupported(QCameraExposure::FlashAuto) && isFlashModeSupported(QCameraExposure::FlashOff) && isFlashModeSupported(QCameraExposure::FlashOn);

Revision history for this message
Florian Boucault (fboucault) wrote :

Supported modes are returned to the app via Qt which in our case uses the qtubuntu-camera plugin which itself queries the supported modes calling hybris' function android_camera_enumerate_supported_flash_modes(...)

Revision history for this message
Chunsang Jeong (chunsang) wrote :

@Florian

Thanks for your information.
I'd found that it was hard coded in cam hal, and already fixed it which is under reviewing.

Changed in canonical-devices-system-image:
status: Confirmed → In Progress
Changed in avila:
status: In Progress → Fix Committed
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

in the device tarball at rc#5

Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Revision history for this message
Ethan Chang (ethan.chang) wrote :

Verified with RC5 image.

tags: added: cqa-verified
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Jason Yen (jasonyen)
Changed in avila:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.