diff options
author | Joe Onorato <joeo@android.com> | 2010-06-11 00:14:11 -0700 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2010-06-11 00:14:11 -0700 |
commit | 790c2d9fc5931bca04e6d28a6ccec16e4aea2024 (patch) | |
tree | ae9a35804db15b5a7872bc6611b0bfa8af37e3e3 /src/com/android/launcher2/LauncherModel.java | |
parent | a9bda02f7c931f7c4414c0cf8d64e3559c701bcd (diff) | |
download | android_packages_apps_Trebuchet-790c2d9fc5931bca04e6d28a6ccec16e4aea2024.tar.gz android_packages_apps_Trebuchet-790c2d9fc5931bca04e6d28a6ccec16e4aea2024.tar.bz2 android_packages_apps_Trebuchet-790c2d9fc5931bca04e6d28a6ccec16e4aea2024.zip |
This variable can be checked outside the lock because it's only
set from the ui thread.
This will help the ANR in LauncherModel.onReceive because if
we're under contention, there's a good chance that we haven't loaded
yet. It won't completely fix it, but that will take a large refactoring.
Bug 2672967
Change-Id: I2c97a416767b4bb6aac0252f02e2aa2055ae8a4e
Diffstat (limited to 'src/com/android/launcher2/LauncherModel.java')
-rw-r--r-- | src/com/android/launcher2/LauncherModel.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java index 17cd15101..17f75732a 100644 --- a/src/com/android/launcher2/LauncherModel.java +++ b/src/com/android/launcher2/LauncherModel.java @@ -304,13 +304,13 @@ public class LauncherModel extends BroadcastReceiver { 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) |