diff options
author | Alok Kediya <kediya@codeaurora.org> | 2013-10-03 15:12:43 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2013-10-31 19:40:02 -0600 |
commit | 3c9da9a7940a3900eeda7cd768ff5353b427993f (patch) | |
tree | 7087093d56a712b4b12cfea12253e24cc410733b /res/layout | |
parent | 5fdf67e0e20b317a213db7484bb34329d8d4a85e (diff) | |
download | android_packages_apps_Snap-3c9da9a7940a3900eeda7cd768ff5353b427993f.tar.gz android_packages_apps_Snap-3c9da9a7940a3900eeda7cd768ff5353b427993f.tar.bz2 android_packages_apps_Snap-3c9da9a7940a3900eeda7cd768ff5353b427993f.zip |
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.
(cherrypicked from commit 774659c9f580b90a15a896881376075bb1506a05 )
Change-Id: Idb55e4f5ba29523c273ff66f11149ff271c490a4
(cherry picked from commit 42f1ffca2e43c4561f5bc3534a966c4bbe6cbef8)
(cherry picked from commit 8df298b693932da2c06dbfd40ad5bbe57dc96308)
Diffstat (limited to 'res/layout')
0 files changed, 0 insertions, 0 deletions