diff options
author | Joe Onorato <joeo@android.com> | 2010-02-22 14:46:10 -0800 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2010-02-22 14:46:10 -0800 |
commit | bf5350db6166df369a4e22012bc0a7a122f39a51 (patch) | |
tree | aa7f5c65540dd6d8c4a02da7f1f170806ef46709 | |
parent | 3c24aca5f597f2eb90e53dce450197e2f46c2305 (diff) | |
download | android_packages_apps_Trebuchet-bf5350db6166df369a4e22012bc0a7a122f39a51.tar.gz android_packages_apps_Trebuchet-bf5350db6166df369a4e22012bc0a7a122f39a51.tar.bz2 android_packages_apps_Trebuchet-bf5350db6166df369a4e22012bc0a7a122f39a51.zip |
fix 2460740 com.android.launcher2: java.lang.NullPointerException at
com.android.launcher2.AllAppsView$RolloRS.saveAppsList(AllAppsView.java:1270)
-rw-r--r-- | src/com/android/launcher2/AllAppsView.java | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java index 336f117d1..f8008816f 100644 --- a/src/com/android/launcher2/AllAppsView.java +++ b/src/com/android/launcher2/AllAppsView.java @@ -1265,24 +1265,23 @@ public class AllAppsView extends RSSurfaceView * Send the apps list structures to RS. */ private void saveAppsList() { - mRS.contextBindRootScript(null); + if (mScript != null) { // this happens when we init it + mRS.contextBindRootScript(null); - mAllocIconIds.data(mIconIds); - mAllocLabelIds.data(mLabelIds); + mAllocIconIds.data(mIconIds); + mAllocLabelIds.data(mLabelIds); - if (mScript != null) { // this happens when we init it mScript.bindAllocation(mAllocIconIds, Defines.ALLOC_ICON_IDS); mScript.bindAllocation(mAllocLabelIds, Defines.ALLOC_LABEL_IDS); - } - mState.save(); + mState.save(); + + // Note: mScript may be null if we haven't initialized it yet. + // In that case, this is a no-op. + if (mInvokeResetWAR != null) { + mInvokeResetWAR.execute(); + } - // Note: mScript may be null if we haven't initialized it yet. - // In that case, this is a no-op. - if (mInvokeResetWAR != null) { - mInvokeResetWAR.execute(); - } - if (mScript != null) { mRS.contextBindRootScript(mScript); } } |