auto import from //branches/cupcake_rel/...@140373
The Android Open Source Project [Thu, 19 Mar 2009 00:39:48 +0000 (17:39 -0700)]
18 files changed:
res/values-cs/strings.xml
res/values-de/strings.xml
res/values-es/strings.xml
res/values-fr/strings.xml
res/values-it/strings.xml
res/values-ja/strings.xml
res/values-ko/strings.xml
res/values-nb/strings.xml
res/values-nl/strings.xml
res/values-pl/strings.xml
res/values-ru/strings.xml
res/values-zh-rCN/strings.xml
res/values-zh-rTW/strings.xml
src/com/android/calendar/AgendaActivity.java
src/com/android/calendar/AlertReceiver.java
src/com/android/calendar/AlertService.java
src/com/android/calendar/CalendarView.java
src/com/android/calendar/DismissAllAlarmsService.java

index 7da9cfc..814310f 100644 (file)
@@ -63,6 +63,8 @@
     <string name="saving_event">"Ukládání události…"</string>
     <string name="loading_calendars_title">"Načítání kalendářů"</string>
     <string name="loading_calendars_message">"Načítání kalendářů..."</string>
+    <!-- no translation found for alert_title (7869592820853066853) -->
+    <skip />
     <string name="alert_when_label">"Kdy:"</string>
     <string name="alert_where_label">"Kde:"</string>
     <string name="alert_missed_events_single">"(zbývá <xliff:g id="REMINDER_COUNT">%s</xliff:g> připomenutí)"</string>
index 152047e..7bf1d24 100644 (file)
@@ -63,6 +63,8 @@
     <string name="saving_event">"Termin wird gespeichert…"</string>
     <string name="loading_calendars_title">"Kalender werden geladen."</string>
     <string name="loading_calendars_message">"Kalender werden geladen..."</string>
+    <!-- no translation found for alert_title (7869592820853066853) -->
+    <skip />
     <string name="alert_when_label">"Wann:"</string>
     <string name="alert_where_label">"Wo:"</string>
     <string name="alert_missed_events_single">"(<xliff:g id="REMINDER_COUNT">%s</xliff:g> weitere Erinnerung)"</string>
index 1755eb7..c7e5089 100644 (file)
@@ -63,6 +63,8 @@
     <string name="saving_event">"Guardando evento..."</string>
     <string name="loading_calendars_title">"Cargando calendarios"</string>
     <string name="loading_calendars_message">"Cargando calendarios..."</string>
+    <!-- no translation found for alert_title (7869592820853066853) -->
+    <skip />
     <string name="alert_when_label">"Cuándo:"</string>
     <string name="alert_where_label">"Dónde:"</string>
     <string name="alert_missed_events_single">"(<xliff:g id="REMINDER_COUNT">%s</xliff:g> más recordatorios)"</string>
index a1b4517..3ec4c22 100644 (file)
@@ -63,6 +63,8 @@
     <string name="saving_event">"Enregistrement de l\'événement…"</string>
     <string name="loading_calendars_title">"Chargement des agendas"</string>
     <string name="loading_calendars_message">"Chargement des agendas..."</string>
+    <!-- no translation found for alert_title (7869592820853066853) -->
+    <skip />
     <string name="alert_when_label">"Date :"</string>
     <string name="alert_where_label">"Lieu :"</string>
     <string name="alert_missed_events_single">"(<xliff:g id="REMINDER_COUNT">%s</xliff:g> rappel supplémentaire)"</string>
index 0aaeef5..9d9f22c 100644 (file)
@@ -63,6 +63,8 @@
     <string name="saving_event">"Salvataggio evento in corso…"</string>
     <string name="loading_calendars_title">"Caricamento calendari"</string>
     <string name="loading_calendars_message">"Caricamento calendari in corso..."</string>
+    <!-- no translation found for alert_title (7869592820853066853) -->
+    <skip />
     <string name="alert_when_label">"Intervallo di tempo:"</string>
     <string name="alert_where_label">"Dove:"</string>
     <string name="alert_missed_events_single">"(Altri <xliff:g id="REMINDER_COUNT">%s</xliff:g> promemoria)"</string>
index 235f0df..0fe211b 100644 (file)
@@ -63,6 +63,8 @@
     <string name="saving_event">"予定を保存中..."</string>
     <string name="loading_calendars_title">"カレンダーを読み込み中"</string>
     <string name="loading_calendars_message">"カレンダーを読み込み中..."</string>
+    <!-- no translation found for alert_title (7869592820853066853) -->
+    <skip />
     <string name="alert_when_label">"日時:"</string>
     <string name="alert_where_label">"場所:"</string>
     <string name="alert_missed_events_single">"(<xliff:g id="REMINDER_COUNT">%s</xliff:g> 件の通知がありました)"</string>
index 24a2e64..c397a53 100644 (file)
@@ -63,6 +63,8 @@
     <string name="saving_event">"일정 저장 중..."</string>
     <string name="loading_calendars_title">"캘린더 로드 중"</string>
     <string name="loading_calendars_message">"캘린더 로드 중..."</string>
+    <!-- no translation found for alert_title (7869592820853066853) -->
+    <skip />
     <string name="alert_when_label">"일자:"</string>
     <string name="alert_where_label">"위치:"</string>
     <string name="alert_missed_events_single">"(<xliff:g id="REMINDER_COUNT">%s</xliff:g>개 이상의 알림)"</string>
index 3da8d23..00d3560 100644 (file)
@@ -63,6 +63,8 @@
     <string name="saving_event">"Lagrer hendelse…"</string>
     <string name="loading_calendars_title">"Laster kalendre"</string>
     <string name="loading_calendars_message">"Laster kalendre…"</string>
+    <!-- no translation found for alert_title (7869592820853066853) -->
+    <skip />
     <string name="alert_when_label">"Hva:"</string>
     <string name="alert_where_label">"Hvor:"</string>
     <!-- no translation found for alert_missed_events_single (8042891195314876684) -->
index a3448cb..5edf363 100644 (file)
@@ -63,6 +63,8 @@
     <string name="saving_event">"Afspraak wordt opgeslagen..."</string>
     <string name="loading_calendars_title">"Agenda\'s worden geladen"</string>
     <string name="loading_calendars_message">"Agenda\'s worden geladen"</string>
+    <!-- no translation found for alert_title (7869592820853066853) -->
+    <skip />
     <string name="alert_when_label">"Wanneer:"</string>
     <string name="alert_where_label">"Waar:"</string>
     <string name="alert_missed_events_single">"(<xliff:g id="REMINDER_COUNT">%s</xliff:g> extra herinnering)"</string>
index 168d59b..58492d5 100644 (file)
@@ -63,6 +63,8 @@
     <string name="saving_event">"Zapisywanie wydarzenia..."</string>
     <string name="loading_calendars_title">"Ładowanie kalendarzy"</string>
     <string name="loading_calendars_message">"Ładowanie kalendarzy..."</string>
+    <!-- no translation found for alert_title (7869592820853066853) -->
+    <skip />
     <string name="alert_when_label">"Kiedy:"</string>
     <string name="alert_where_label">"Gdzie:"</string>
     <string name="alert_missed_events_single">"(więcej przypomnień: <xliff:g id="REMINDER_COUNT">%s</xliff:g>)"</string>
index 6eba53a..404000c 100644 (file)
@@ -63,6 +63,8 @@
     <string name="saving_event">"Идет сохранение мероприятия..."</string>
     <string name="loading_calendars_title">"Загрузка календарей"</string>
     <string name="loading_calendars_message">"Идет загрузка календарей..."</string>
+    <!-- no translation found for alert_title (7869592820853066853) -->
+    <skip />
     <string name="alert_when_label">"Когда:"</string>
     <string name="alert_where_label">"Где:"</string>
     <string name="alert_missed_events_single">"(дополнительное уведомление: <xliff:g id="REMINDER_COUNT">%s</xliff:g>)"</string>
index 9645f48..8d7bc2b 100644 (file)
@@ -63,6 +63,8 @@
     <string name="saving_event">"正在保存活动..."</string>
     <string name="loading_calendars_title">"载入日历"</string>
     <string name="loading_calendars_message">"正在载入日历..."</string>
+    <!-- no translation found for alert_title (7869592820853066853) -->
+    <skip />
     <string name="alert_when_label">"时间:"</string>
     <string name="alert_where_label">"地点:"</string>
     <string name="alert_missed_events_single">"(还有 <xliff:g id="REMINDER_COUNT">%s</xliff:g> 个提醒)"</string>
index e7ce72f..f07ec53 100644 (file)
@@ -63,6 +63,8 @@
     <string name="saving_event">"正在儲存活動..."</string>
     <string name="loading_calendars_title">"正在載入日曆"</string>
     <string name="loading_calendars_message">"正在載入日曆..."</string>
+    <!-- no translation found for alert_title (7869592820853066853) -->
+    <skip />
     <string name="alert_when_label">"時間:"</string>
     <string name="alert_where_label">"地點:"</string>
     <string name="alert_missed_events_single">"(還有 <xliff:g id="REMINDER_COUNT">%s</xliff:g> 則提醒)"</string>
index cf4c6b6..97a6e5a 100644 (file)
@@ -403,6 +403,7 @@ public class AgendaActivity extends Activity implements ViewSwitcher.ViewFactory
             selectTime();
         } else {
             mTime = time;
+            renewCursor();
         }
     }
 
index 9988f26..7943a9e 100644 (file)
@@ -76,15 +76,6 @@ public class AlertReceiver extends BroadcastReceiver {
             // This intent might be a BOOT_COMPLETED so it might not have a Uri.
             if (uri != null) {
                 i.putExtra("uri", uri.toString());
-                
-                // Record the received time in the CalendarAlerts table.
-                // This is useful for finding bugs that cause alarms to be
-                // missed or delayed.
-                ContentResolver cr = context.getContentResolver();
-                ContentValues values = new ContentValues();
-                long currentTime = System.currentTimeMillis();
-                values.put(CalendarAlerts.RECEIVED_TIME, currentTime);
-                cr.update(uri, values, null /* where */, null /* args */);
             }
             beginStartingService(context, i);
         }
index eb70504..558a8f6 100644 (file)
@@ -42,7 +42,6 @@ import android.provider.Calendar.Instances;
 import android.provider.Calendar.Reminders;
 import android.text.TextUtils;
 import android.text.format.DateUtils;
-import android.text.format.Time;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -94,7 +93,8 @@ public class AlertService extends Service {
         Reminders._ID,                     // 0
     };
     
-    private void processMessage(Message msg) {
+    @SuppressWarnings("deprecation")
+    void processMessage(Message msg) {
         Bundle bundle = (Bundle) msg.obj;
         
         // On reboot, update the notification bar with the contents of the
@@ -112,11 +112,20 @@ public class AlertService extends Service {
             Log.d(TAG, "uri: " + alertUri);
         }
 
+        if (alertUri != null) {
+            // Record the received time in the CalendarAlerts table.
+            // This is useful for finding bugs that cause alarms to be
+            // missed or delayed.
+            ContentValues values = new ContentValues();
+            values.put(CalendarAlerts.RECEIVED_TIME, System.currentTimeMillis());
+            getContentResolver().update(alertUri, values, null /* where */, null /* args */);
+        }
+        
         ContentResolver cr = getContentResolver();
         Cursor alertCursor = cr.query(alertUri, ALERT_PROJECTION,
                 null /* selection */, null, null /* sort order */);
         
-        long alertId, eventId, instanceId, alarmTime;
+        long alertId, eventId, alarmTime;
         int minutes;
         String eventName;
         String location;
index 43fe93b..8185006 100644 (file)
@@ -28,6 +28,7 @@ import android.content.res.TypedArray;
 import android.database.Cursor;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
+import android.graphics.Color;
 import android.graphics.Paint;
 import android.graphics.Path;
 import android.graphics.PorterDuff;
@@ -143,6 +144,7 @@ public class CalendarView extends View
     private Rect mSrcRect = new Rect();
     private Rect mDestRect = new Rect();
     private Paint mPaint = new Paint();
+    private Paint mPaintBorder = new Paint();
     private Paint mEventTextPaint = new Paint();
     private Paint mSelectionPaint = new Paint();
     private Path mPath = new Path();
@@ -335,6 +337,11 @@ public class CalendarView extends View
         p = mPaint;
         p.setAntiAlias(true);
 
+        mPaintBorder.setColor(0xffc8c8c8);
+        mPaintBorder.setStyle(Style.STROKE);
+        mPaintBorder.setAntiAlias(true);
+        mPaintBorder.setStrokeWidth(2.0f);
+
         // Allocate space for 2 weeks worth of weekday names so that we can
         // easily start the week display at any week day.
         mDayStrs = new String[14];
@@ -2074,7 +2081,15 @@ public class CalendarView extends View
         rf.right = event.right - 1;
 
         canvas.drawRoundRect(rf, SMALL_ROUND_RADIUS, SMALL_ROUND_RADIUS, p);
-        
+
+        // Draw a darker border
+        float[] hsv = new float[3];
+        Color.colorToHSV(p.getColor(), hsv);
+        hsv[1] = 1.0f;
+        hsv[2] *= 0.75f;
+        mPaintBorder.setColor(Color.HSVToColor(hsv));
+        canvas.drawRoundRect(rf, SMALL_ROUND_RADIUS, SMALL_ROUND_RADIUS, mPaintBorder);
+
         rf.left += 2;
         rf.right -= 2;
         
index d342106..7e3ca8f 100644 (file)
@@ -16,7 +16,7 @@
 
 package com.android.calendar;
 
-import android.app.Service;
+import android.app.IntentService;
 import android.content.ContentResolver;
 import android.content.Intent;
 import android.database.Cursor;
@@ -25,15 +25,19 @@ import android.os.IBinder;
 import android.provider.Calendar.CalendarAlerts;
 
 /**
- * Service for marking all fired alarms as dismissed. 
+ * Service for asynchronously marking all fired alarms as dismissed. 
  */
-public class DismissAllAlarmsService extends Service {
+public class DismissAllAlarmsService extends IntentService {
     private static final String[] PROJECTION = new String[] {
             CalendarAlerts._ID,
             CalendarAlerts.STATE,
     };
     private static final int COLUMN_INDEX_STATE = 1;  
 
+    public DismissAllAlarmsService() {
+        super("DismissAllAlarmsService");
+    }
+
     @Override
     public IBinder onBind(Intent intent) {
         return null;
@@ -41,7 +45,7 @@ public class DismissAllAlarmsService extends Service {
 
     @SuppressWarnings("deprecation")
     @Override
-    public void onStart(Intent intent, int startId) {
+    public void onHandleIntent(Intent intent) {
         // Mark all fired alarms as dismissed
         Uri uri = CalendarAlerts.CONTENT_URI_BY_INSTANCE;
         String selection = CalendarAlerts.STATE + "=" + CalendarAlerts.FIRED;