Fix crash on small-screen devices

Allow for mCustomizePagedView to be null in more cases.

Bug: 3040307
Change-Id: Idf5e50e661bcffa726db204a3318ab932db265aa
This commit is contained in:
Andrew Stadler 2010-09-27 11:42:53 -07:00 committed by Michael Jurka
parent ebfe4b08df
commit 959f603a93
1 changed files with 12 additions and 4 deletions

View File

@ -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();
}