summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2010-06-11 07:14:11 (GMT)
committerJoe Onorato <joeo@android.com>2010-06-11 07:14:11 (GMT)
commit790c2d9fc5931bca04e6d28a6ccec16e4aea2024 (patch)
treeae9a35804db15b5a7872bc6611b0bfa8af37e3e3 /src
parenta9bda02f7c931f7c4414c0cf8d64e3559c701bcd (diff)
downloadandroid_packages_apps_Trebuchet-790c2d9fc5931bca04e6d28a6ccec16e4aea2024.zip
android_packages_apps_Trebuchet-790c2d9fc5931bca04e6d28a6ccec16e4aea2024.tar.gz
android_packages_apps_Trebuchet-790c2d9fc5931bca04e6d28a6ccec16e4aea2024.tar.bz2
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')
-rw-r--r--src/com/android/launcher2/LauncherModel.java12
1 files changed, 6 insertions, 6 deletions
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 @@ 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)