summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-01-09 03:18:47 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-01-09 03:18:47 -0800
commit7b137329627435293244687c18222268cf97ae57 (patch)
tree76463a38b523bd975d36d6cb5bd546eaa5cf3850 /src/com/android
parentb9298adcbb01ed714260a71916648cc932de7516 (diff)
parent5a7bd5db14eceef7df79c748d1416e9e28fcc707 (diff)
downloadandroid_packages_apps_Gallery2-7b137329627435293244687c18222268cf97ae57.tar.gz
android_packages_apps_Gallery2-7b137329627435293244687c18222268cf97ae57.tar.bz2
android_packages_apps_Gallery2-7b137329627435293244687c18222268cf97ae57.zip
Merge "Gallery2: Fix null pointer exception from customer monkey test."
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/gallery3d/app/AlbumSetPage.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/app/AlbumSetPage.java b/src/com/android/gallery3d/app/AlbumSetPage.java
index d2cc0ca57..c8916fe16 100644
--- a/src/com/android/gallery3d/app/AlbumSetPage.java
+++ b/src/com/android/gallery3d/app/AlbumSetPage.java
@@ -244,13 +244,16 @@ public class AlbumSetPage extends ActivityState implements
WeakReference<Toast> mEmptyAlbumToast = null;
private void showEmptyAlbumToast(int toastLength) {
+ //CRs-Fixed:951767 java.lang.NullPointerException: Attempt to invoke virtual method
+ // 'void android.widget.RelativeLayout.addView(android.view.View
+ RelativeLayout galleryRoot = (RelativeLayout) ((Activity) mActivity)
+ .findViewById(R.id.gallery_root);
+ if (galleryRoot == null) return ;
tvEmptyAlbum = new TextView(mActivity);
tvEmptyAlbum.setText(R.string.tvEmptyAlbum);
tvEmptyAlbum.setTextColor(Color.parseColor("#8A000000"));
tvEmptyAlbum.setGravity(Gravity.CENTER);
tvEmptyAlbum.setTextSize(TypedValue.COMPLEX_UNIT_SP,20);
- RelativeLayout galleryRoot = (RelativeLayout) ((Activity) mActivity)
- .findViewById(R.id.gallery_root);
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);