summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Stadler <stadler@android.com>2010-09-27 11:42:53 -0700
committerMichael Jurka <mikejurka@google.com>2010-09-27 14:09:29 -0700
commit959f603a93cdb378b52e852e06c9e32c514ccd84 (patch)
treee504c154551f6caca4c27f3c5959105b1949a540 /src
parentebfe4b08df4e63f2fdd6147c5ce63618e4cfe46a (diff)
downloadandroid_packages_apps_Trebuchet-959f603a93cdb378b52e852e06c9e32c514ccd84.tar.gz
android_packages_apps_Trebuchet-959f603a93cdb378b52e852e06c9e32c514ccd84.tar.bz2
android_packages_apps_Trebuchet-959f603a93cdb378b52e852e06c9e32c514ccd84.zip
Fix crash on small-screen devices
Allow for mCustomizePagedView to be null in more cases. Bug: 3040307 Change-Id: Idf5e50e661bcffa726db204a3318ab932db265aa
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/Launcher.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 0671063c3..c8fc074a4 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -3003,7 +3003,9 @@ public final class Launcher extends Activity
*/
public void bindAllApplications(ArrayList<ApplicationInfo> apps) {
mAllAppsGrid.setApps(apps);
- mCustomizePagedView.setApps(apps);
+ if (mCustomizePagedView != null) {
+ mCustomizePagedView.setApps(apps);
+ }
updateAppMarketIcon();
}
@@ -3015,7 +3017,9 @@ public final class Launcher extends Activity
public void bindAppsAdded(ArrayList<ApplicationInfo> apps) {
removeDialog(DIALOG_CREATE_SHORTCUT);
mAllAppsGrid.addApps(apps);
- mCustomizePagedView.addApps(apps);
+ if (mCustomizePagedView != null) {
+ mCustomizePagedView.addApps(apps);
+ }
updateAppMarketIcon();
}
@@ -3028,7 +3032,9 @@ public final class Launcher extends Activity
removeDialog(DIALOG_CREATE_SHORTCUT);
mWorkspace.updateShortcuts(apps);
mAllAppsGrid.updateApps(apps);
- mCustomizePagedView.updateApps(apps);
+ if (mCustomizePagedView != null) {
+ mCustomizePagedView.updateApps(apps);
+ }
updateAppMarketIcon();
}
@@ -3043,7 +3049,9 @@ public final class Launcher extends Activity
mWorkspace.removeItems(apps);
}
mAllAppsGrid.removeApps(apps);
- mCustomizePagedView.removeApps(apps);
+ if (mCustomizePagedView != null) {
+ mCustomizePagedView.removeApps(apps);
+ }
updateAppMarketIcon();
}