OSDN Git Service

auto import from //branches/cupcake/...@137197
authorThe Android Open Source Project <initial-contribution@android.com>
Mon, 9 Mar 2009 18:52:14 +0000 (11:52 -0700)
committerThe Android Open Source Project <initial-contribution@android.com>
Mon, 9 Mar 2009 18:52:14 +0000 (11:52 -0700)
Android.mk
samples/PluginDemo/Android.mk
src/com/android/im/app/FrontDoorPlugin.java

index ee5fe32..a3a1856 100644 (file)
@@ -1,9 +1,6 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
-LOCAL_MODULE_TAGS := eng 
-
-
 LOCAL_SRC_FILES := $(call all-subdir-java-files) \
                        src/com/android/im/IChatSession.aidl \
                        src/com/android/im/IChatSessionListener.aidl \
index 3cf36f2..46fe534 100644 (file)
@@ -1,7 +1,7 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
-LOCAL_MODULE_TAGS := samples development
+LOCAL_MODULE_TAGS := samples
 
 LOCAL_SRC_FILES := $(call all-subdir-java-files) \
 
index 1bbcac1..343efec 100644 (file)
@@ -147,7 +147,7 @@ public class FrontDoorPlugin extends Service {
         loadBrandingResourcesFromCache(providerIdToName);
 
         // check and load any un-cached resources
-        ArrayList<ContentValues> valuesList = new ArrayList<ContentValues>();
+        final ArrayList<ContentValues> valuesList = new ArrayList<ContentValues>();
         for (String provider : mProviderNames) {
             long providerId = providerNameToId.get(provider);
             if (!mBrandingResources.containsKey(provider)) {
@@ -170,11 +170,14 @@ public class FrontDoorPlugin extends Service {
         }
 
         // save the changes to cache
-        int size = valuesList.size();
-        if (size > 0) {
-            getContentResolver().bulkInsert(
-                    Im.BrandingResourceMapCache.CONTENT_URI,
-                    valuesList.toArray(new ContentValues[size]));
+        if (valuesList.size() > 0) {
+            new Thread(new Runnable() {
+                public void run() {
+                    getContentResolver().bulkInsert(
+                            Im.BrandingResourceMapCache.CONTENT_URI,
+                            valuesList.toArray(new ContentValues[]{}));
+                }
+            }).start();
         }
     }