diff options
author | Wu-cheng Li <wuchengli@google.com> | 2011-11-16 14:35:43 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2011-11-16 14:35:43 +0800 |
commit | 77665404048135a5a96d709378d6f55518b868e2 (patch) | |
tree | 428b7549f968ca5dd886d7ab1880ba5cc7e62aaa /src | |
parent | 948e75e8e3fd2ec98a08e65efdb6e5eb6d02c33b (diff) | |
download | LegacyCamera-77665404048135a5a96d709378d6f55518b868e2.zip LegacyCamera-77665404048135a5a96d709378d6f55518b868e2.tar.gz LegacyCamera-77665404048135a5a96d709378d6f55518b868e2.tar.bz2 |
Fix NPE if the device has only one camera.
bug:5620872
Change-Id: I4ee2aa85e73c53d6a72f0839ed3bf31bc14c586e
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/ui/IndicatorControlBar.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/camera/ui/IndicatorControlBar.java b/src/com/android/camera/ui/IndicatorControlBar.java index 197c594..615a5ba 100644 --- a/src/com/android/camera/ui/IndicatorControlBar.java +++ b/src/com/android/camera/ui/IndicatorControlBar.java @@ -57,7 +57,9 @@ public class IndicatorControlBar extends IndicatorControl implements // Add CameraPicker control. initializeCameraPicker(); - mCameraPicker.setBackgroundResource(R.drawable.bg_pressed); + if (mCameraPicker != null) { + mCameraPicker.setBackgroundResource(R.drawable.bg_pressed); + } // Add the ZoomControl if supported. if (zoomSupported) { |