Merge branch 'froyo' into froyo-release
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 13a39a3..6bd915a 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -2093,7 +2093,11 @@
* Implementation of the method from LauncherModel.Callbacks.
*/
public int getCurrentWorkspaceScreen() {
- return mWorkspace.getCurrentScreen();
+ if (mWorkspace != null) {
+ return mWorkspace.getCurrentScreen();
+ } else {
+ return SCREEN_COUNT / 2;
+ }
}
/**
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index 17cd151..17f7573 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -304,13 +304,13 @@
ArrayList<ApplicationInfo> removed = null;
ArrayList<ApplicationInfo> modified = null;
- synchronized (mAllAppsListLock) {
- if (mBeforeFirstLoad) {
- // If we haven't even loaded yet, don't bother, since we'll just pick
- // up the changes.
- return;
- }
+ if (mBeforeFirstLoad) {
+ // If we haven't even loaded yet, don't bother, since we'll just pick
+ // up the changes.
+ return;
+ }
+ synchronized (mAllAppsListLock) {
final String action = intent.getAction();
if (Intent.ACTION_PACKAGE_CHANGED.equals(action)