summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Yoo <jyoo@codeaurora.org>2016-01-26 16:08:10 -0800
committerSteve Kondik <steve@cyngn.com>2016-08-03 15:45:45 -0700
commitd1712aad3d7570a238511c4a30773d4e1732c8c2 (patch)
tree9ff359459fb16e55a97619fb1a58b96a522dab57 /src
parentf64b94c590a37fa8c7e42d3a8058f1c297ca1739 (diff)
downloadandroid_packages_apps_Snap-d1712aad3d7570a238511c4a30773d4e1732c8c2.zip
android_packages_apps_Snap-d1712aad3d7570a238511c4a30773d4e1732c8c2.tar.gz
android_packages_apps_Snap-d1712aad3d7570a238511c4a30773d4e1732c8c2.tar.bz2
SnapdragonCamera: Adding null exception handler.
There's a case the view's children got removed from the group while it's processing the layout change. It can bypass its view layout. Change-Id: Ib9a7ff71af79a88e81acfceedc06b3cc26fac0c5 CRs-Fixed: 963356
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/ui/FilmStripView.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/camera/ui/FilmStripView.java b/src/com/android/camera/ui/FilmStripView.java
index b1b3133..6024063 100644
--- a/src/com/android/camera/ui/FilmStripView.java
+++ b/src/com/android/camera/ui/FilmStripView.java
@@ -553,8 +553,12 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener {
}
private void layoutAt(int left, int top) {
- mView.layout(left, top, left + mView.getMeasuredWidth(),
- top + mView.getMeasuredHeight());
+ try {
+ mView.layout(left, top, left + mView.getMeasuredWidth(),
+ top + mView.getMeasuredHeight());
+ } catch (NullPointerException e) {
+ Log.e(TAG, "One of the view children is removed");
+ }
}
/**