OSDN Git Service

Merge "Import revised translations" into froyo
authorKenny Root <kroot@google.com>
Wed, 28 Apr 2010 04:42:17 +0000 (21:42 -0700)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Wed, 28 Apr 2010 04:42:17 +0000 (21:42 -0700)
src/com/android/deskclock/DeskClock.java

index 625fa7f..f213ab8 100644 (file)
@@ -23,6 +23,7 @@ import android.app.PendingIntent;
 import android.app.UiModeManager;
 import android.content.BroadcastReceiver;
 import android.content.Context;
+import android.content.ContentResolver;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.IntentFilter;
@@ -389,7 +390,7 @@ public class DeskClock extends Activity {
 
         Cursor cur;
         try {
-            cur = managedQuery(
+            cur = getContentResolver().query(
                 queryUri,
                 WEATHER_CONTENT_COLUMNS,
                 null,
@@ -447,6 +448,11 @@ public class DeskClock extends Activity {
                 mWeatherLowTemperatureString = "";
         }
 
+        if (cur != null) {
+            // clean up cursor
+            cur.close();
+        }
+
         mHandy.sendEmptyMessage(UPDATE_WEATHER_DISPLAY_MSG);
     }