diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/camera/ui/CameraRootView.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/com/android/camera/ui/CameraRootView.java b/src/com/android/camera/ui/CameraRootView.java index 0cff14480..e49ac59a6 100644 --- a/src/com/android/camera/ui/CameraRootView.java +++ b/src/com/android/camera/ui/CameraRootView.java @@ -89,12 +89,14 @@ public class CameraRootView extends RelativeLayout { left += mOffset; break; } - if (mCurrentInsets.right > 0) { - // navigation bar on the right - right = right > 0 ? right : mCurrentInsets.right; - } else { - // navigation bar on the bottom - bottom = bottom > 0 ? bottom : mCurrentInsets.bottom; + if (mCurrentInsets != null) { + if (mCurrentInsets.right > 0) { + // navigation bar on the right + right = right > 0 ? right : mCurrentInsets.right; + } else { + // navigation bar on the bottom + bottom = bottom > 0 ? bottom : mCurrentInsets.bottom; + } } for (int i = 0; i < getChildCount(); i++) { View v = getChildAt(i); |
