Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4a1837d2 authored by Kiran Kumar H N's avatar Kiran Kumar H N Committed by Steve Kondik
Browse files

Gallery2: camera: Invoke camera UI functions only after initialization.

When switching from Panorama mode to Camera mode, the CameraActivity
invokes two functions openModule and onOrientationChanged.
openModule initializes PhotoModule. As part of the PhotoModule
initialization, the PhotoUI and PhotoMenu are initialized.
But this is acheived by posting a message to the handler. When the
message is read by the Handler, the PhotoUI's onCameraOpen is invoked
which initializes the PhotoMenu. But sometimes before this message
is read by the Handler, the onOrientationChanged is invoked, which
invokes couple of functions from PhotoUI class acting on the PhotoMenu.
But since the PhotoMenu is still not initialized, it throws up error in
the form of NullPointerExceptions.
Fix this by checking if the PhotoUI and PhotoMenu have been initialized.
If they have not yet been initialized, send a message to the Handler to
invoke these PhotoUI functionalities after the PhotoUI has been
initialized completely.

CRs-Fixed: 519055
Change-Id: I06ea54aa56da96459db6cacea92b02d0f8c23bcd
parent 41bdd69d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment