Fix NPE when opening a new folder if there were no folders before (issue 5482523)

Change-Id: I41fa39c4766f052c785c7e5635c8243e34af84fc
This commit is contained in:
Adam Cohen
2011-10-19 14:38:16 -07:00
parent d3357b186d
commit df6af5740d
+1 -6
View File
@@ -136,12 +136,6 @@ public class FolderIcon extends LinearLayout implements FolderListener {
icon.mFolder = folder;
Resources res = launcher.getResources();
// We need to reload the static values when configuration changes in case they are
// different in another configuration
if (sStaticValuesDirty) {
sSharedFolderLeaveBehind = res.getDrawable(R.drawable.portal_ring_rest);
}
icon.mFolderRingAnimator = new FolderRingAnimator(launcher, icon);
folderInfo.addListener(icon);
@@ -184,6 +178,7 @@ public class FolderIcon extends LinearLayout implements FolderListener {
sPreviewPadding = res.getDimensionPixelSize(R.dimen.folder_preview_padding);
sSharedOuterRingDrawable = res.getDrawable(R.drawable.portal_ring_outer_holo);
sSharedInnerRingDrawable = res.getDrawable(R.drawable.portal_ring_inner_holo);
sSharedFolderLeaveBehind = res.getDrawable(R.drawable.portal_ring_rest);
sStaticValuesDirty = false;
}
}