am 79c111c5: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '79c111c58cf4b62c227fbff56ce97dbca4ba2f44':
diff --git a/Android.mk b/Android.mk
index f19bc81..a0d1b19 100644
--- a/Android.mk
+++ b/Android.mk
@@ -12,7 +12,7 @@
LOCAL_OVERRIDES_PACKAGES := AlarmClock
-LOCAL_SDK_VERSION := current
+LOCAL_SDK_VERSION := 17
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
diff --git a/res/layout-land/stopwatch_fragment.xml b/res/layout-land/stopwatch_fragment.xml
index 7f70302..b35f6da 100644
--- a/res/layout-land/stopwatch_fragment.xml
+++ b/res/layout-land/stopwatch_fragment.xml
@@ -25,7 +25,7 @@
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/circle_margin"
android:layout_marginRight="@dimen/circle_margin"
- android:layout_weight="1" >
+ android:layout_weight="0.95" >
<com.android.deskclock.timer.CountingTimerView
android:id="@+id/stopwatch_time_text"
@@ -78,8 +78,7 @@
<ListView
android:id="@+id/laps_list"
android:layout_weight="1"
- android:layout_marginLeft="@dimen/laps_margin"
- android:layout_marginRight="@dimen/laps_margin"
+ android:layout_marginRight="@dimen/sw_right_margin"
android:layout_gravity="center"
android:layout_width="0dip"
android:layout_height="wrap_content" />
diff --git a/res/layout-land/time_setup_view.xml b/res/layout-land/time_setup_view.xml
new file mode 100644
index 0000000..8badd96
--- /dev/null
+++ b/res/layout-land/time_setup_view.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ <com.android.deskclock.timer.TimerView
+ android:id="@+id/timer_time_text"
+ android:layout_width="0dip"
+ android:layout_weight="2"
+ android:layout_height="wrap_content"
+ android:paddingTop="@dimen/medium_font_padding"
+ android:paddingBottom="@dimen/medium_font_padding"
+ android:paddingLeft="@dimen/timer_padding_left"
+ android:layout_gravity="center"
+ android:gravity="top"
+ android:baselineAligned="false">
+ <com.android.deskclock.ZeroTopPaddingTextView
+ android:id="@+id/hours_ones"
+ android:singleLine="true"
+ android:ellipsize="none"
+ style="@style/medium_bold"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textColor="@color/clock_white"/>
+
+ <com.android.deskclock.ZeroTopPaddingTextView
+ android:id="@+id/hours_label"
+ android:singleLine="true"
+ android:ellipsize="none"
+ style="@style/label"
+ android:layout_gravity="top"
+ android:contentDescription="@string/hours_label_description"
+ android:text="@string/hours_label"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textColor="@color/clock_white"/>
+
+ <com.android.deskclock.ZeroTopPaddingTextView
+ android:id="@+id/minutes_tens"
+ android:singleLine="true"
+ android:ellipsize="none"
+ style="@style/medium_bold"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textColor="@color/clock_white"/>
+
+ <com.android.deskclock.ZeroTopPaddingTextView
+ android:id="@+id/minutes_ones"
+ android:singleLine="true"
+ android:ellipsize="none"
+ style="@style/medium_bold"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textColor="@color/clock_white"/>
+ <com.android.deskclock.ZeroTopPaddingTextView
+ android:id="@+id/minutes_label"
+ android:singleLine="true"
+ android:ellipsize="none"
+ style="@style/label"
+ android:contentDescription="@string/minutes_label_description"
+ android:text="@string/minutes_label"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textColor="@color/clock_white"/>
+
+ <com.android.deskclock.ZeroTopPaddingTextView
+ android:id="@+id/seconds"
+ android:singleLine="true"
+ android:ellipsize="none"
+ style="@style/medium_light"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textColor="@color/clock_white"/>
+
+ <com.android.deskclock.ZeroTopPaddingTextView
+ android:id="@+id/seconds_label"
+ android:singleLine="true"
+ android:ellipsize="none"
+ style="@style/label"
+ android:layout_gravity="top"
+ android:contentDescription="@string/seconds_label_description"
+ android:text="@string/seconds_label"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textColor="@color/clock_white"/>
+
+ </com.android.deskclock.timer.TimerView>
+ <ImageButton
+ android:id="@+id/delete"
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ android:gravity="center"
+ android:layout_gravity="center"
+ android:paddingBottom="@dimen/body_font_padding"
+ android:src="@drawable/ic_backspace"
+ android:background="@drawable/item_background"
+ android:contentDescription="@string/timer_delete"
+ android:layout_height="match_parent" />
+ </LinearLayout>
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:layout_marginBottom="8dip"
+ android:background="#28ffffff" />
+ <include layout="@layout/three_keys_view"
+ android:id="@+id/first" />
+
+ <include layout="@layout/three_keys_view"
+ android:id="@+id/second"/>
+
+ <include layout="@layout/three_keys_view"
+ android:id="@+id/third"/>
+
+ <include layout="@layout/three_keys_view"
+ android:id="@+id/fourth" />
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:layout_marginTop="16dip" />
+</LinearLayout>
diff --git a/res/layout-land/timer_list_item.xml b/res/layout-land/timer_list_item.xml
index 15ddfdf..854d19d 100644
--- a/res/layout-land/timer_list_item.xml
+++ b/res/layout-land/timer_list_item.xml
@@ -27,8 +27,8 @@
android:id="@+id/timer_frame"
android:layout_width="@dimen/timer_circle_width"
android:layout_height="@dimen/timer_circle_diameter"
- android:layout_marginLeft="@dimen/circle_margin"
- android:layout_marginRight="@dimen/circle_margin">
+ android:layout_marginLeft="@dimen/timer_circle_margin"
+ android:layout_marginRight="@dimen/timer_circle_margin">
<com.android.deskclock.CircleTimerView
android:id="@+id/timer_time"
diff --git a/res/layout/desk_clock_saver.xml b/res/layout/desk_clock_saver.xml
index 7fae380..2cddbd6 100644
--- a/res/layout/desk_clock_saver.xml
+++ b/res/layout/desk_clock_saver.xml
@@ -29,8 +29,10 @@
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginLeft="@dimen/screensaver_margin"
+ android:layout_marginRight="@dimen/screensaver_margin"
android:layout_marginTop="@dimen/time_margin_top"
- android:layout_marginBottom="@dimen/time_margin_bottom">
+ android:layout_marginBottom="@dimen/screensaver_margin">
<include layout="@layout/desk_clock_time_date"
android:id="@+id/digital_clock"
@@ -38,6 +40,7 @@
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
+ android:layout_marginBottom="@dimen/digital_margin_bottom"
/>
<com.android.deskclock.AnalogClock
android:id="@+id/analog_clock"
diff --git a/res/layout/lap_view.xml b/res/layout/lap_view.xml
index 30d8757..f4e90f8 100644
--- a/res/layout/lap_view.xml
+++ b/res/layout/lap_view.xml
@@ -18,25 +18,24 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_marginTop="4dip"
android:layout_marginBottom="4dip"
+ android:gravity="center"
android:paddingTop="@dimen/body_font_padding"
android:paddingBottom="@dimen/body_font_padding"
- android:paddingLeft="@dimen/laps_margin"
- android:paddingRight="@dimen/laps_margin"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/clock_gray"
- android:layout_marginRight="8dip"
+ android:layout_marginRight="@dimen/sw_item_space"
android:gravity="left"
style="@style/body"
android:textAllCaps="false"
android:id="@+id/lap_number" />
<TextView
- android:layout_width="0dip"
- android:layout_weight="1"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginRight="@dimen/sw_item_space"
android:textColor="@color/clock_gray"
android:gravity="right"
style="@style/body"
@@ -44,8 +43,7 @@
android:id="@+id/lap_time" />
<TextView
android:layout_height="wrap_content"
- android:layout_width="0dip"
- android:layout_weight="1"
+ android:layout_width="wrap_content"
android:textColor="@color/clock_gray"
android:gravity="right"
style="@style/body"
diff --git a/res/layout/main_clock_frame.xml b/res/layout/main_clock_frame.xml
index 935a925..e36565b 100644
--- a/res/layout/main_clock_frame.xml
+++ b/res/layout/main_clock_frame.xml
@@ -41,7 +41,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/time_margin_top"
- android:layout_marginBottom="@dimen/medium_space_bottom"
+ android:layout_marginBottom="@dimen/digital_margin_bottom"
/>
</FrameLayout>
<LinearLayout
diff --git a/res/layout/time_setup_view.xml b/res/layout/time_setup_view.xml
index 8badd96..c0ab9bc 100644
--- a/res/layout/time_setup_view.xml
+++ b/res/layout/time_setup_view.xml
@@ -27,9 +27,7 @@
android:layout_height="wrap_content"
android:paddingTop="@dimen/medium_font_padding"
android:paddingBottom="@dimen/medium_font_padding"
- android:paddingLeft="@dimen/timer_padding_left"
- android:layout_gravity="center"
- android:gravity="top"
+ android:gravity="top|center_horizontal"
android:baselineAligned="false">
<com.android.deskclock.ZeroTopPaddingTextView
android:id="@+id/hours_ones"
diff --git a/res/layout/timer_fragment.xml b/res/layout/timer_fragment.xml
index 2f0e89c..d136691 100644
--- a/res/layout/timer_fragment.xml
+++ b/res/layout/timer_fragment.xml
@@ -60,8 +60,6 @@
android:orientation="vertical">
<com.android.deskclock.TimerSetupView
android:id="@+id/timer_setup"
- android:layout_marginLeft="8dip"
- android:layout_marginRight="8dip"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1" />
diff --git a/res/layout/timer_list_item.xml b/res/layout/timer_list_item.xml
index 1dfc04f..f5ac851 100644
--- a/res/layout/timer_list_item.xml
+++ b/res/layout/timer_list_item.xml
@@ -27,8 +27,8 @@
android:id="@+id/timer_frame"
android:layout_width="match_parent"
android:layout_height="@dimen/timer_circle_diameter"
- android:layout_marginLeft="@dimen/circle_margin"
- android:layout_marginRight="@dimen/circle_margin">
+ android:layout_marginLeft="@dimen/timer_circle_margin"
+ android:layout_marginRight="@dimen/timer_circle_margin">
<com.android.deskclock.CircleTimerView
android:id="@+id/timer_time"
diff --git a/res/layout/world_clock_list_item.xml b/res/layout/world_clock_list_item.xml
index 4628d9a..a832265 100644
--- a/res/layout/world_clock_list_item.xml
+++ b/res/layout/world_clock_list_item.xml
@@ -18,8 +18,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginRight="@dimen/circle_margin"
- android:layout_marginLeft="@dimen/circle_margin"
+ android:layout_marginRight="@dimen/world_clock_margin"
+ android:layout_marginLeft="@dimen/world_clock_margin"
android:orientation="horizontal">
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index 9f986dd..de6bbeb 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"My tyd is <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Rondtetye:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Rondte <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m. <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m. <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>u. <xliff:g id="M">%2$02d</xliff:g>m. <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>u. <xliff:g id="M">%2$02d</xliff:g>m. <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>u. <xliff:g id="M">%2$02d</xliff:g>m. <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 uur"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> ure"</item>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 06b8dd2..97c4f5a 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"የእኔ ሰዓት <xliff:g id="TIME">%s</xliff:g> ነው"</string>
<string name="sw_share_laps" msgid="614390674795945007">"የዙር ሰዓት፦"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"ዙር <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>ደ <xliff:g id="S">%3$02d</xliff:g>ሴ።<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>ደ <xliff:g id="S">%3$02d</xliff:g>ሴ።<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>ሰ <xliff:g id="M">%2$02d</xliff:g>ደ <xliff:g id="S">%3$02d</xliff:g>ሴ።<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>ሰ <xliff:g id="M">%2$02d</xliff:g>ደ <xliff:g id="S">%3$02d</xliff:g>ሴ።<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>ሰ <xliff:g id="M">%2$02d</xliff:g>ደ <xliff:g id="S">%3$02d</xliff:g>ሴ።<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 ሰዓት"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> ሰዓታት"</item>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index c63c3d5..b67c112 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"وقتي هو <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"مرات الدوران:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"معمل <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>د <xliff:g id="S">%3$02d</xliff:g>ث.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>د <xliff:g id="S">%3$02d</xliff:g>ث.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>س <xliff:g id="M">%2$02d</xliff:g>د <xliff:g id="S">%3$02d</xliff:g>ث.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>س <xliff:g id="M">%2$02d</xliff:g>د <xliff:g id="S">%3$02d</xliff:g>ث.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>س <xliff:g id="M">%2$02d</xliff:g>د <xliff:g id="S">%3$02d</xliff:g>ث.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"ساعة واحدة"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> من الساعات"</item>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index c0b0392..e6c4582 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Мой час: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Час круга:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Круг <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g> хв. <xliff:g id="S">%3$02d</xliff:g> с.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g> хв. <xliff:g id="S">%3$02d</xliff:g> с.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g> гадз. <xliff:g id="M">%2$02d</xliff:g> хв. <xliff:g id="S">%3$02d</xliff:g> с.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g> гадз. <xliff:g id="M">%2$02d</xliff:g> хв. <xliff:g id="S">%3$02d</xliff:g> с.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g> гадз. <xliff:g id="M">%2$02d</xliff:g> хв. <xliff:g id="S">%3$02d</xliff:g> с.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 гадзіна"</item>
<item quantity="other" msgid="7018184076091344797">"Гадзiн: <xliff:g id="NUMBER">%d</xliff:g>"</item>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 5239c15..0428c1a 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Времето ми е <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Междинни резултати:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Междинен резултат <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g> м <xliff:g id="S">%3$02d</xliff:g> с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g> м <xliff:g id="S">%3$02d</xliff:g> с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g> ч <xliff:g id="M">%2$02d</xliff:g> м <xliff:g id="S">%3$02d</xliff:g> с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g> ч <xliff:g id="M">%2$02d</xliff:g> м <xliff:g id="S">%3$02d</xliff:g> с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g> ч <xliff:g id="M">%2$02d</xliff:g> м <xliff:g id="S">%3$02d</xliff:g> с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 час"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> часа"</item>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index ee3e8f8..ac02af8 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"La meva hora: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Temps per volta:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Etapa <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g> min, <xliff:g id="S">%3$02d</xliff:g> s, <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g> min, <xliff:g id="S">%3$02d</xliff:g> s, <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g> h, <xliff:g id="M">%2$02d</xliff:g> m, <xliff:g id="S">%3$02d</xliff:g> s, <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g> h, <xliff:g id="M">%2$02d</xliff:g> min, <xliff:g id="S">%3$02d</xliff:g> s, <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g> h, <xliff:g id="M">%2$02d</xliff:g> min, <xliff:g id="S">%3$02d</xliff:g> s, <xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 hora"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> hores"</item>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 7c31bad..f6a1c2a 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Můj čas je <xliff:g id="TIME">%s</xliff:g>."</string>
<string name="sw_share_laps" msgid="614390674795945007">"Časy etap:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Úsek <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 hodina"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> h"</item>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 9e24fc7..1e22d04 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Min tid er <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Omgangstider:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Omgang <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m. <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m. <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>t. <xliff:g id="M">%2$02d</xliff:g>m. <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>t. <xliff:g id="M">%2$02d</xliff:g>m. <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>t. <xliff:g id="M">%2$02d</xliff:g>m. <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"Én time"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> timer"</item>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 4c519f7..f5ec290 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Meine Zeit: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Rundenzeiten:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"<xliff:g id="NUMBER">%d</xliff:g>. Runde"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 Stunde"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> Stunden"</item>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index 6920cbc..6448e11 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Ο χρόνος μου είναι <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Χρόνοι γύρων:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Γύρος <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>λ <xliff:g id="S">%3$02d</xliff:g>δ.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>λ <xliff:g id="S">%3$02d</xliff:g>δ.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>ω <xliff:g id="M">%2$02d</xliff:g>λ <xliff:g id="S">%3$02d</xliff:g>δ.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>ω <xliff:g id="M">%2$02d</xliff:g>λ <xliff:g id="S">%3$02d</xliff:g>δ.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>ω <xliff:g id="M">%2$02d</xliff:g>λ <xliff:g id="S">%3$02d</xliff:g>δ.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 ώρα"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> ώρες"</item>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 63ddd3f..68a069f 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"My time is <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Lap times:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Lap <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 hour"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> hours"</item>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 9e36077..f46fdc1 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Mi hora es <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Duración:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Duración <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 hora"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> horas"</item>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 9abd1b0..aca9b33 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Hora: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Duración de las vueltas:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Fase <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g> min <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g> min <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> min <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> min <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> min <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 hora"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> horas"</item>
diff --git a/res/values-et/strings.xml b/res/values-et/strings.xml
index 940bd62..777fc31 100644
--- a/res/values-et/strings.xml
+++ b/res/values-et/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Minu aeg on <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Ringi ajad:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"<xliff:g id="NUMBER">%d</xliff:g>. ring"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 tund"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> tundi"</item>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 8958e02..ae01b78 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"زمان من <xliff:g id="TIME">%s</xliff:g> است"</string>
<string name="sw_share_laps" msgid="614390674795945007">"زمانهای دور:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"دور <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"۱ ساعت"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> ساعت"</item>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index f61d7f0..40c5fe9 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Oma aika: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Kierrosajat:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Kierros <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>t <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>t <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>t <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 tunti"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> tuntia"</item>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index ebb9619..177925a 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Mon heure est <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Temps de circuit :"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Tour <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>min <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>min <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>min <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>min <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>min <xliff:g id="S">%3$02d</xliff:g>s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 heure"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> heures"</item>
@@ -186,8 +193,8 @@
</plurals>
<string name="home_label" msgid="4436139365695453870">"Domicile"</string>
<string name="cities_activity_title" msgid="8552462751129256730">"Villes"</string>
- <string name="alarm_on" msgid="4344630320756422804">"ACTIVÉE"</string>
- <string name="alarm_off" msgid="6478058633710013612">"DÉSACTIVÉE"</string>
+ <string name="alarm_on" msgid="4344630320756422804">"OUI"</string>
+ <string name="alarm_off" msgid="6478058633710013612">"NON"</string>
<string name="clock_settings" msgid="8887845806151785393">"HORLOGE"</string>
<string name="clock_style" msgid="2265011060429742344">"Style"</string>
<string-array name="clock_style_entries">
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 21445fd..704fdf1 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"मेरा समय <xliff:g id="TIME">%s</xliff:g> है"</string>
<string name="sw_share_laps" msgid="614390674795945007">"लैप अवधियां:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"लैप <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 घंटा"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> घंटे"</item>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index a9a1f9e..209e773 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Moje je vrijeme <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Vremena krugova:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"<xliff:g id="NUMBER">%d</xliff:g>. krug"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 sat"</item>
<item quantity="other" msgid="7018184076091344797">"Broj sati: <xliff:g id="NUMBER">%d</xliff:g>"</item>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index f955104..1c94640 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Az én időm: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Köridők:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"<xliff:g id="NUMBER">%d</xliff:g>. kör"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>p <xliff:g id="S">%3$02d</xliff:g>.<xliff:g id="D">%4$02d</xliff:g>m"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>p <xliff:g id="S">%3$02d</xliff:g>.<xliff:g id="D">%4$02d</xliff:g>m"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>ó <xliff:g id="M">%2$02d</xliff:g>p <xliff:g id="S">%3$02d</xliff:g>.<xliff:g id="D">%4$02d</xliff:g>m"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>ó <xliff:g id="M">%2$02d</xliff:g>p <xliff:g id="S">%3$02d</xliff:g>.<xliff:g id="D">%4$02d</xliff:g>m"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>ó <xliff:g id="M">%2$02d</xliff:g>p <xliff:g id="S">%3$02d</xliff:g>.<xliff:g id="D">%4$02d</xliff:g>m"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 óra"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> óra"</item>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index e4da035..e5079d9 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -35,7 +35,7 @@
<string name="alert" msgid="6506982899651975645">"Nada Dering Alarm"</string>
<string name="ringtone" msgid="9110746249688559579">"Nada Dering"</string>
<string name="time" msgid="8067216534232296518">"Waktu"</string>
- <string name="alarm_alert_dismiss_text" msgid="4942914605480888820">"Tolak"</string>
+ <string name="alarm_alert_dismiss_text" msgid="4942914605480888820">"Tutup"</string>
<string name="alarm_alert_alert_silenced" msgid="2704775170733835993">"Alarm disenyapkan setelah <xliff:g id="MINUTES">%d</xliff:g> menit."</string>
<string name="alarm_alert_snooze_text" msgid="1774416052207651584">"Tunda"</string>
<string name="alarm_alert_snooze_set" msgid="656470966696912087">"Menunda selama <xliff:g id="MINUTES">%d</xliff:g> menit."</string>
@@ -102,7 +102,7 @@
<string name="volume_button_dialog_title" msgid="8768042543750036853">"Efek tombol"</string>
<string-array name="volume_button_setting_entries">
<item msgid="7972756698723318690">"Tunda"</item>
- <item msgid="3450979320164769576">"Singkirkan"</item>
+ <item msgid="3450979320164769576">"Tutup"</item>
<item msgid="6302517608411378024">"Tidak melakukan apa-apa"</item>
</string-array>
<string name="default_ringtone_setting_title" msgid="4549726190682964245">"Setel nada dering default"</string>
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Waktu saya adalah <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Waktu putaran:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Putaran <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>d.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>d.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>j <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>d.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>j <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>d.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>j <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>d.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 jam"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> jam"</item>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 69e1562..140ec6a 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Il mio tempo è <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Tempi sul giro:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Giro <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s <xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 ora"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> ore"</item>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index de87a46..6e11582 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"השעה שלי הוא <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"זמני הקפה:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"הקפה <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>ד <xliff:g id="S">%3$02d</xliff:g>ש.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>ד <xliff:g id="S">%3$02d</xliff:g>ש.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>שע <xliff:g id="M">%2$02d</xliff:g>ד <xliff:g id="S">%3$02d</xliff:g>ש.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>שע <xliff:g id="M">%2$02d</xliff:g>ד <xliff:g id="S">%3$02d</xliff:g>ש.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>שע <xliff:g id="M">%2$02d</xliff:g>ד <xliff:g id="S">%3$02d</xliff:g>ש.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"שעה אחת"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> שעות"</item>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 9619cf0..a85a15e 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"私の時間は<xliff:g id="TIME">%s</xliff:g>です"</string>
<string name="sw_share_laps" msgid="614390674795945007">"ラップ時間:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"ラップ<xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>分<xliff:g id="S">%3$02d</xliff:g>秒<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>分<xliff:g id="S">%3$02d</xliff:g>秒<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>時間<xliff:g id="M">%2$02d</xliff:g>分<xliff:g id="S">%3$02d</xliff:g>秒<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>時間<xliff:g id="M">%2$02d</xliff:g>分<xliff:g id="S">%3$02d</xliff:g>秒<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>時間<xliff:g id="M">%2$02d</xliff:g>分<xliff:g id="S">%3$02d</xliff:g>秒<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1時間"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g>時間"</item>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 04da8c1..ab79530 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"내 시간: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"랩 타임:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"랩 타임 <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>분<xliff:g id="S">%3$02d</xliff:g>초.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>분<xliff:g id="S">%3$02d</xliff:g>초.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>시간<xliff:g id="M">%2$02d</xliff:g>분<xliff:g id="S">%3$02d</xliff:g>초.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>시간<xliff:g id="M">%2$02d</xliff:g>분<xliff:g id="S">%3$02d</xliff:g>초.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>시간<xliff:g id="M">%2$02d</xliff:g>분<xliff:g id="S">%3$02d</xliff:g>초.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1시간"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g>시간"</item>
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index 4cc714e..7b75074 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -26,7 +26,7 @@
<dimen name="next_alarm_text_size">15sp</dimen>
<dimen name="time_margin_right">8dip</dimen>
<dimen name="time_margin_bottom">14dip</dimen>
- <dimen name="time_margin_top">8dip</dimen>
+ <dimen name="time_margin_top">24dip</dimen>
<dimen name="ampm_margin_top">16dip</dimen>
<dimen name="font_margin_adjust">8dip</dimen>
<dimen name="next_alarm_margin_top">-5dip</dimen>
@@ -39,8 +39,11 @@
<!-- Size of margin for circles. -->
<dimen name="circle_margin">8dp</dimen>
- <dimen name="laps_margin">16dp</dimen>
<dimen name="analog_clock_margin">200dp</dimen>
+ <dimen name="timer_circle_margin">8dp</dimen>
+
+ <dimen name="world_clock_margin">8dp</dimen>
+ <dimen name="sw_right_margin">8dp</dimen>
<!-- Extra offset for timer button paddings. Only nonzero for non-tablets. -->
<dimen name="timer_button_extra_offset">45dip</dimen>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 27a88e2..338f286 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Mano laikas yra <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Persidengiantis laikas:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"<xliff:g id="NUMBER">%d</xliff:g> ratas"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 val."</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> val."</item>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index 36f14bc..cbd9fcf 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Mans laiks ir: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Intervāla laiki:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"<xliff:g id="NUMBER">%d</xliff:g>. intervāls"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 stunda"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> stundas"</item>
diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml
index 3bd3e1f..dac3806 100644
--- a/res/values-ms/strings.xml
+++ b/res/values-ms/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Masa saya ialah <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Masa pusingan:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Pusingan <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>j <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>j <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>j <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 jam"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> jam"</item>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index bdacdcc..50e7c66 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Tiden min er <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Rundetider:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Runde <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g> t <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g> t <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g> t <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 time"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> timer"</item>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 4523298..d6b681f 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Mijn tijd is <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Rondetijden:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Ronde <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>u <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>u <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>u <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 uur"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> uur"</item>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 5b477aa..fa5fc24 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Mój czas to <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Czasy okrążeń:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Okr. <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>,<xliff:g id="D">%4$02d</xliff:g>s"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>,<xliff:g id="D">%4$02d</xliff:g>s"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>g <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>,<xliff:g id="D">%4$02d</xliff:g>s"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>g <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>,<xliff:g id="D">%4$02d</xliff:g>s"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>g <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>,<xliff:g id="D">%4$02d</xliff:g>s"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 godz."</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> godz."</item>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index ab36f7f..6312351 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"O meu tempo é <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Tempos de volta:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Volta <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 hora"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> horas"</item>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index de403b9..80d3dee 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Meu tempo é <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Tempos de volta:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Volta <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 hora"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> horas"</item>
diff --git a/res/values-rm/strings.xml b/res/values-rm/strings.xml
index dbb89ba..375d9ef 100644
--- a/res/values-rm/strings.xml
+++ b/res/values-rm/strings.xml
@@ -184,6 +184,11 @@
<skip />
<!-- no translation found for sw_notification_lap_number (3535420316052647126) -->
<skip />
+ <!-- no translation found for stopwatch_format_set:0 (7855304148648938406) -->
+ <!-- no translation found for stopwatch_format_set:1 (3964356050933061913) -->
+ <!-- no translation found for stopwatch_format_set:2 (4906928997138522728) -->
+ <!-- no translation found for stopwatch_format_set:3 (1167529664702951052) -->
+ <!-- no translation found for stopwatch_format_set:4 (4383974684898411623) -->
<!-- no translation found for Nhours_description:one (371227238759147245) -->
<!-- no translation found for Nhours_description:other (7018184076091344797) -->
<!-- no translation found for Nminutes_description:one (1001391305885322059) -->
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index c58e491..39d30b5 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Ora mea este <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Timpi circuit:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Circuitul <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 oră"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> ore"</item>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 4a7b759..b6c51f7 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Мое время: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Время круга"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Круг <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>м <xliff:g id="S">%3$02d</xliff:g>с.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>м <xliff:g id="S">%3$02d</xliff:g>с.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>ч <xliff:g id="M">%2$02d</xliff:g>м <xliff:g id="S">%3$02d</xliff:g>с.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>ч <xliff:g id="M">%2$02d</xliff:g>м <xliff:g id="S">%3$02d</xliff:g>с.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>ч <xliff:g id="M">%2$02d</xliff:g>м <xliff:g id="S">%3$02d</xliff:g>с.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 ч."</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> ч."</item>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 68888ba..566e089 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Môj čas je <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Intervalové časy:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Kolo č. <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 hodina"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> hod."</item>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index 05b5ea6..52d12e2 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Moj čas je <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Časi kroga:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"<xliff:g id="NUMBER">%d</xliff:g>. krog"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s. <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s. <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s. <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s. <xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g> h <xliff:g id="M">%2$02d</xliff:g> m <xliff:g id="S">%3$02d</xliff:g> s. <xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 ura"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> h"</item>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 70f0367..d3ea977 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Моје време је <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Пролазна времена:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"<xliff:g id="NUMBER">%d</xliff:g>. круг"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>м <xliff:g id="S">%3$02d</xliff:g>с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>м <xliff:g id="S">%3$02d</xliff:g>с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>ч <xliff:g id="M">%2$02d</xliff:g> м <xliff:g id="S">%3$02d</xliff:g>с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>ч <xliff:g id="M">%2$02d</xliff:g>м <xliff:g id="S">%3$02d</xliff:g>с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>ч <xliff:g id="M">%2$02d</xliff:g>м <xliff:g id="S">%3$02d</xliff:g>с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 сат"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> сата(и)"</item>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 6b4156b..946ad41 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Min tid är <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Varvtider:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Varv <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 timme"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> timmar"</item>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index d8e55bf..681b9af 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Muda wangu ni <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Muda wa mzunguko:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Mzunguko <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"Saa 1"</item>
<item quantity="other" msgid="7018184076091344797">"Saa <xliff:g id="NUMBER">%d</xliff:g>"</item>
diff --git a/res/values-sw600dp-land/dimens.xml b/res/values-sw600dp-land/dimens.xml
index 15fc265..311d495 100644
--- a/res/values-sw600dp-land/dimens.xml
+++ b/res/values-sw600dp-land/dimens.xml
@@ -27,7 +27,7 @@
<dimen name="time_margin_right">8dip</dimen>
<dimen name="time_margin_left">8dip</dimen>
<dimen name="time_margin_bottom">14dip</dimen>
- <dimen name="time_margin_top">16dip</dimen>
+ <dimen name="time_margin_top">32dip</dimen>
<dimen name="ampm_margin_top">28dip</dimen>
<dimen name="font_margin_adjust">8dip</dimen>
<dimen name="next_alarm_margin_top">-5dip</dimen>
@@ -38,8 +38,11 @@
<!-- Size of margin for circles. -->
<dimen name="circle_margin_top">16dp</dimen>
<dimen name="circle_margin">48dp</dimen>
- <dimen name="laps_margin">36dp</dimen>
<dimen name="analog_clock_margin">48dp</dimen>
+ <dimen name="timer_circle_margin">48dp</dimen>
+
+ <dimen name="world_clock_margin">48dp</dimen>
+ <dimen name="sw_right_margin">48dp</dimen>
<!-- Empty space at the edges of the +1 and reset button icons. Based off of 56dip width.-->
<dimen name="plusone_reset_button_padding">23dip</dimen>
@@ -52,5 +55,7 @@
<dimen name="glowpadview_margin_right">-64dip</dimen>
- <dimen name="def_digital_widget_height">200dip</dimen>
+ <dimen name="min_digital_widget_resize_width">370dip</dimen>
+ <dimen name="min_digital_widget_height">200dip</dimen>
+ <dimen name="digital_widget_list_min_height">200dip</dimen>
</resources>
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
index 9ff0292..d14e6c6 100644
--- a/res/values-sw600dp/dimens.xml
+++ b/res/values-sw600dp/dimens.xml
@@ -27,7 +27,9 @@
<dimen name="time_margin_right">8dip</dimen>
<dimen name="time_margin_left">8dip</dimen>
<dimen name="time_margin_bottom">14dip</dimen>
- <dimen name="time_margin_top">32dip</dimen>
+ <dimen name="time_margin_top">48dip</dimen>
+ <dimen name="digital_margin_bottom">36dip</dimen>
+ <dimen name="screensaver_margin">32dip</dimen>
<dimen name="ampm_margin_top">15dip</dimen>
<dimen name="font_margin_adjust">8dip</dimen>
<dimen name="next_alarm_margin_top">-5dip</dimen>
@@ -56,14 +58,15 @@
<!-- Size of margin for circles. -->
<dimen name="circle_margin_top">48dp</dimen>
<dimen name="circle_margin">96dp</dimen>
- <dimen name="laps_margin">110dp</dimen>
<dimen name="analog_clock_margin">96dp</dimen>
+ <dimen name="timer_circle_margin">96dp</dimen>
<!-- Width of the clock, for use with alarm buttons. -->
<dimen name="alarm_alert_display_width">550dip</dimen>
<!-- Size of analog clock in world clock. -->
<dimen name="world_clock_analog_size">200dip</dimen>
+ <dimen name="world_clock_margin">96dp</dimen>
<!-- Empty space at the edges of the +1 and reset button icons. Based off of 56dip width.-->
<dimen name="plusone_reset_button_padding">23dip</dimen>
<!-- Empty space at the edges of the delete button icons. Based off of 56dip width. -->
@@ -81,11 +84,11 @@
<dimen name="glowpadview_margin_bottom">0dip</dimen>
- <dimen name="min_digital_widget_width">300dip</dimen>
+ <dimen name="min_digital_widget_width">450dip</dimen>
<dimen name="min_digital_widget_height">120dip</dimen>
- <dimen name="min_digital_widget_resize_width">200dip</dimen>
+ <dimen name="min_digital_widget_resize_width">450dip</dimen>
<dimen name="min_digital_widget_resize_height">120dip</dimen>
<dimen name="def_digital_widget_width">200dip</dimen>
- <dimen name="def_digital_widget_height">190dip</dimen>
+ <dimen name="digital_widget_list_min_height">190dip</dimen>
</resources>
diff --git a/res/values-sw720dp-land/dimens.xml b/res/values-sw720dp-land/dimens.xml
index de69a5d..bee4607 100644
--- a/res/values-sw720dp-land/dimens.xml
+++ b/res/values-sw720dp-land/dimens.xml
@@ -22,6 +22,7 @@
<dimen name="glowpadview_margin_right">48dip</dimen>
<dimen name="alarm_alert_clock_padding_left">128dp</dimen>
- <dimen name="def_digital_widget_height">150dip</dimen>
+ <dimen name="digital_widget_list_min_height">150dip</dimen>
+ <dimen name="min_digital_widget_resize_width">370dip</dimen>
</resources>
diff --git a/res/values-sw720dp/dimens.xml b/res/values-sw720dp/dimens.xml
index 51ffaf0..142ff79 100644
--- a/res/values-sw720dp/dimens.xml
+++ b/res/values-sw720dp/dimens.xml
@@ -18,5 +18,5 @@
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
<resources>
- <dimen name="def_digital_widget_height">145dip</dimen>
+ <dimen name="digital_widget_list_min_height">100dip</dimen>
</resources>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index 1551ee0..3d26d5a 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"เวลาของฉันคือ <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"เวลาสิ้นสุดรอบ:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"สิ้นสุดรอบที่ <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 ชั่วโมง"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> ชั่วโมง"</item>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index b4788d3..cd79117 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Ang aking oras ay <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Mga lap time:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Lap <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 oras"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> (na) oras"</item>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 869aeba..d6fd55d 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Saatim: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Tur süreleri:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"<xliff:g id="NUMBER">%d</xliff:g>. tur"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>d <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>d <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>s <xliff:g id="M">%2$02d</xliff:g>d <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>s <xliff:g id="M">%2$02d</xliff:g>d <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>s <xliff:g id="M">%2$02d</xliff:g>d <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 saat"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> saat"</item>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 0f1a667..1f485e0 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Мій час – <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Час кола:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Коло <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>хв <xliff:g id="S">%3$02d</xliff:g>с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>хв <xliff:g id="S">%3$02d</xliff:g>с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>год <xliff:g id="M">%2$02d</xliff:g>хв <xliff:g id="S">%3$02d</xliff:g>с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>год <xliff:g id="M">%2$02d</xliff:g>хв <xliff:g id="S">%3$02d</xliff:g>с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>год <xliff:g id="M">%2$02d</xliff:g>хв <xliff:g id="S">%3$02d</xliff:g>с,<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 год."</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> год."</item>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 9223d41..17da505 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Thời gian của tôi là <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Số lần bấm giờ:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"<xliff:g id="NUMBER">%d</xliff:g> bấm giờ"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>p <xliff:g id="S">%3$02d</xliff:g>g.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>p <xliff:g id="S">%3$02d</xliff:g>g.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>p <xliff:g id="S">%3$02d</xliff:g>g.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>p <xliff:g id="S">%3$02d</xliff:g>g.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>p <xliff:g id="S">%3$02d</xliff:g>g.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 giờ"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> giờ"</item>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 6e7ca36..fdecd7f 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"我的时间:<xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"各圈时间:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"第 <xliff:g id="NUMBER">%d</xliff:g> 圈"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>:<xliff:g id="S">%3$02d</xliff:g>.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>:<xliff:g id="S">%3$02d</xliff:g>.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>:<xliff:g id="M">%2$02d</xliff:g>:<xliff:g id="S">%3$02d</xliff:g>.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>:<xliff:g id="M">%2$02d</xliff:g>:<xliff:g id="S">%3$02d</xliff:g>.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>:<xliff:g id="M">%2$02d</xliff:g>:<xliff:g id="S">%3$02d</xliff:g>.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 小时"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> 小时"</item>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 902b99f..64d18bc 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"我的時間:<xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"單圈時間:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"第 <xliff:g id="NUMBER">%d</xliff:g> 圈"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>:<xliff:g id="S">%3$02d</xliff:g>。<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>:<xliff:g id="S">%3$02d</xliff:g>。<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>:<xliff:g id="M">%2$02d</xliff:g>:<xliff:g id="S">%3$02d</xliff:g>。<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>:<xliff:g id="M">%2$02d</xliff:g>:<xliff:g id="S">%3$02d</xliff:g>。<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>:<xliff:g id="M">%2$02d</xliff:g>:<xliff:g id="S">%3$02d</xliff:g>。<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 小時"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> 小時"</item>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index 6fa1d57..b48e482 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -147,6 +147,13 @@
<string name="sw_share_main" msgid="7703563468204234405">"Isikhathi sami ngu-<xliff:g id="TIME">%s</xliff:g>"</string>
<string name="sw_share_laps" msgid="614390674795945007">"Ukuhluka kwezikhathi:"</string>
<string name="sw_notification_lap_number" msgid="3535420316052647126">"Xhapha <xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <string-array name="stopwatch_format_set">
+ <item msgid="7855304148648938406">"<xliff:g id="M">%2$d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="3964356050933061913">"<xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4906928997138522728">"<xliff:g id="H">%1$d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="1167529664702951052">"<xliff:g id="H">%1$02d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ <item msgid="4383974684898411623">"<xliff:g id="H">%1$03d</xliff:g>h <xliff:g id="M">%2$02d</xliff:g>m <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>"</item>
+ </string-array>
<plurals name="Nhours_description">
<item quantity="one" msgid="371227238759147245">"1 ihora"</item>
<item quantity="other" msgid="7018184076091344797">"<xliff:g id="NUMBER">%d</xliff:g> amahora"</item>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 470ef08..3c9ffe5 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -27,8 +27,10 @@
<dimen name="time_margin_right">8dip</dimen>
<dimen name="time_margin_left">8dip</dimen>
<dimen name="time_margin_bottom">8dip</dimen>
- <dimen name="time_margin_top">16dip</dimen>
+ <dimen name="time_margin_top">32dip</dimen>
+ <dimen name="digital_margin_bottom">24dip</dimen>
<dimen name="timer_padding_left">16dip</dimen>
+ <dimen name="screensaver_margin">16dip</dimen>
<dimen name="ampm_margin_top">8dip</dimen>
<dimen name="font_margin_adjust">4dip</dimen>
<dimen name="next_alarm_margin_top">-4dip</dimen>
@@ -69,6 +71,7 @@
<dimen name="medium_space_top">24dp</dimen>
<dimen name="medium_space_bottom">8dp</dimen>
<dimen name="style_label_space">4dip</dimen>
+ <dimen name="sw_item_space">16dip</dimen>
<dimen name="label_margin_big">4dp</dimen>
<dimen name="label_margin_small">2dp</dimen>
@@ -86,8 +89,10 @@
<!-- Size of margin for circles. -->
<dimen name="circle_margin_top">16dp</dimen>
<dimen name="circle_margin">32dp</dimen>
- <dimen name="laps_margin">52dp</dimen>
<dimen name="analog_clock_margin">60dp</dimen>
+ <dimen name="timer_circle_margin">32dp</dimen>
+
+ <dimen name="sw_right_margin">32dp</dimen>
<!-- The width of the big icons in notifications. -->
<dimen name="notification_large_icon_width">64dp</dimen>
@@ -105,6 +110,7 @@
<!-- Size of analog clock in world clock. -->
<dimen name="world_clock_analog_size">100dip</dimen>
+ <dimen name="world_clock_margin">32dp</dimen>
<dimen name="toast_bar_bottom_margin_in_conversation">24dip</dimen>
@@ -147,9 +153,10 @@
<dimen name="min_digital_widget_width">160dip</dimen>
<dimen name="min_digital_widget_height">70dip</dimen>
<dimen name="min_digital_widget_resize_width">160dip</dimen>
- <dimen name="min_digital_widget_resize_height">35dip</dimen>
+ <dimen name="min_digital_widget_resize_height">70dip</dimen>
<dimen name="def_digital_widget_width">160dip</dimen>
- <dimen name="def_digital_widget_height">70dip</dimen>
+ <dimen name="def_digital_widget_height">130dip</dimen>
+ <dimen name="digital_widget_list_min_height">70dip</dimen>
<dimen name="digital_widget_list_margin_top">12dip</dimen>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index b076859..94180e4 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -344,11 +344,11 @@
<!-- Describes the purpose of the button to share the stopwatch value. -->
<string name="sw_share_button">Share</string>
- <!-- Abbreviation for temporal hours -->
+ <!-- Abbreviation for temporal hours [CHAR LIMIT=1] -->
<string name="hours_label">h</string>
- <!-- Abbreviation for temporal minutes -->
+ <!-- Abbreviation for temporal minutes [CHAR LIMIT=1] -->
<string name="minutes_label">m</string>
- <!-- Abbreviation for temporal seconds -->
+ <!-- Abbreviation for temporal seconds [CHAR LIMIT=1] -->
<string name="seconds_label">s</string>
<!-- Accessibility strings -->
<string name="hours_label_description">hours</string>
@@ -362,8 +362,40 @@
<string name="sw_share_main">My time is <xliff:g id="time">%s</xliff:g></string>
<!-- Header within the message created to share a list of lap times (a new line is appended to this) -->
<string name="sw_share_laps">Lap times:</string>
- <!-- Label to enumerate the number of laps the user has counted -->
+ <!-- Label to enumerate the number of laps in the notification the user has counted -->
<string name="sw_notification_lap_number">Lap <xliff:g id="number">%d</xliff:g></string>
+ <!-- Formatted stopwatch time
+ [CHAR LIMIT=1] for each abbreviation as in hours_label, etc. -->
+ <string-array name="stopwatch_format_set">
+ <item> <!-- <10 minutes - example "1m 02s.03" -->
+ <xliff:g id="M">%2$d</xliff:g>m
+ <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>
+ </item>
+ <item> <!-- <1 hour - example "12m 03s.04" -->
+ <xliff:g id="M">%2$02d</xliff:g>m
+ <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>
+ </item>
+ <item> <!-- <10 hours - example "1h 02m 03s.04" -->
+ <xliff:g id="H">%1$d</xliff:g>h
+ <xliff:g id="M">%2$02d</xliff:g>m
+ <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>
+ </item>
+ <item> <!-- <100 hours - example "12h 03m 04s.05" -->
+ <xliff:g id="H">%1$02d</xliff:g>h
+ <xliff:g id="M">%2$02d</xliff:g>m
+ <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>
+ </item>
+ <item> <!-- <1000 hours - example "123h 04m 05s.06" -->
+ <xliff:g id="H">%1$03d</xliff:g>h
+ <xliff:g id="M">%2$02d</xliff:g>m
+ <xliff:g id="S">%3$02d</xliff:g>s.<xliff:g id="D">%4$02d</xliff:g>
+ </item>
+ </string-array>
+ <!-- Label to enumerate the number of laps the user has counted -->
+ <string-array name="sw_lap_number_set" translatable="false">
+ <item># <xliff:g id="number">%d</xliff:g></item>
+ <item># <xliff:g id="number">%02d</xliff:g></item>
+ </string-array>
<!-- Stopwatch accessibility strings -->
<plurals name="Nhours_description">
diff --git a/res/xml/dream_settings.xml b/res/xml/dream_settings.xml
index 0631434..5c7a3e1 100644
--- a/res/xml/dream_settings.xml
+++ b/res/xml/dream_settings.xml
@@ -26,5 +26,5 @@
android:key="screensaver_night_mode"
android:title="@string/night_mode_title"
android:summary="@string/night_mode_summary"
- android:defaultValue="false" />
+ android:defaultValue="true" />
</PreferenceScreen>
diff --git a/res/xml/settings.xml b/res/xml/settings.xml
index 50565c8..916b947 100644
--- a/res/xml/settings.xml
+++ b/res/xml/settings.xml
@@ -64,6 +64,6 @@
android:dialogTitle="@string/volume_button_setting_title"
android:entries="@array/volume_button_setting_entries"
android:entryValues="@array/volume_button_setting_values"
- android:defaultValue="1" />
+ android:defaultValue="0" />
</PreferenceCategory>
</PreferenceScreen>
diff --git a/src/com/android/alarmclock/DigitalWidgetViewsFactory.java b/src/com/android/alarmclock/DigitalWidgetViewsFactory.java
index 92d798b..d906b89 100644
--- a/src/com/android/alarmclock/DigitalWidgetViewsFactory.java
+++ b/src/com/android/alarmclock/DigitalWidgetViewsFactory.java
@@ -16,6 +16,7 @@
package com.android.alarmclock;
+import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -47,7 +48,12 @@
private int mId = AppWidgetManager.INVALID_APPWIDGET_ID;
private RemoteWorldClockAdapter mAdapter;
private boolean mReloadCitiesList = true;
+ private boolean mReloadCitiesDb = true;
private float mFontScale = 1;
+ private float mListScale = 1;
+ private PendingIntent mQuarterlyIntent;
+ private String mLastTimeZone;
+
// An adapter to provide the view for the list of cities in the world clock.
private class RemoteWorldClockAdapter extends WorldClockAdapter {
@@ -89,14 +95,20 @@
final Calendar now = Calendar.getInstance();
now.setTimeInMillis(System.currentTimeMillis());
int myDayOfWeek = now.get(Calendar.DAY_OF_WEEK);
- now.setTimeZone(TimeZone.getTimeZone(cityObj.mTimeZone));
+ CityObj cityInDb = mCitiesDb.get(cityObj.mCityId);
+ String cityTZ = (cityInDb != null) ? cityInDb.mTimeZone : cityObj.mTimeZone;
+ now.setTimeZone(TimeZone.getTimeZone(cityTZ));
int cityDayOfWeek = now.get(Calendar.DAY_OF_WEEK);
- clock.setTextViewTextSize(clockId1, TypedValue.COMPLEX_UNIT_PX, mFontSize * mFontScale);
- clock.setTextViewTextSize(clockId2, TypedValue.COMPLEX_UNIT_PX, mFontSize * mFontScale);
+ float scale = Math.min(mFontScale, mListScale);
+ clock.setTextViewTextSize(clockId1, TypedValue.COMPLEX_UNIT_PX, mFontSize * scale);
+ clock.setTextViewTextSize(clockId2, TypedValue.COMPLEX_UNIT_PX, mFontSize * scale);
clock.setString(clockId1, "setTimeZone", cityObj.mTimeZone);
clock.setString(clockId2, "setTimeZone", cityObj.mTimeZone);
- clock.setTextViewText(labelId, cityObj.mCityName);
+
+ // Home city or city not in DB , use data from the save selected cities list
+ clock.setTextViewText(labelId, Utils.getCityName(cityObj, cityInDb));
+
if (myDayOfWeek != cityDayOfWeek) {
clock.setTextViewText(dayId, mContext.getString(
R.string.world_day_of_week_label, now.getDisplayName(
@@ -125,6 +137,7 @@
mId = intent.getIntExtra(
AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
mAdapter = new RemoteWorldClockAdapter(c);
+ mLastTimeZone = TimeZone.getDefault().getID();
}
public DigitalWidgetViewsFactory() {
@@ -170,13 +183,14 @@
@Override
public void onCreate() {
+ mQuarterlyIntent = Utils.startAlarmOnQuarterHour(mContext);
// Do intent listening registration here since doing it in the manifest creates a new
// new factory
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_DATE_CHANGED);
filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
filter.addAction(Intent.ACTION_SCREEN_ON);
- filter.addAction(Intent.ACTION_TIME_TICK);
+ filter.addAction(Utils.ACTION_ON_QUARTER_HOUR);
filter.addAction(Intent.ACTION_TIME_CHANGED);
filter.addAction(Intent.ACTION_LOCALE_CHANGED);
filter.addAction("com.android.deskclock.NEXT_ALARM_TIME_SET");
@@ -190,11 +204,19 @@
mAdapter.loadData(mContext);
mReloadCitiesList = false;
}
+ if (mReloadCitiesDb) {
+ mAdapter.loadCitiesDb(mContext);
+ mReloadCitiesDb = false;
+ }
+
mFontScale = WidgetUtils.getScaleRatio(mContext, null, mId);
+ mListScale = WidgetUtils.getHeightScaleRatio(mContext, null, mId);
+
}
@Override
public void onDestroy() {
+ Utils.cancelAlarmOnQuarterHour(mContext, mQuarterlyIntent);
mContext.unregisterReceiver(this);
}
@@ -224,6 +246,26 @@
refreshAlarm(context, widget);
widgetManager.partiallyUpdateAppWidget(mId, widget);
} else {
+ if (action.equals(Intent.ACTION_TIMEZONE_CHANGED)) {
+ // refresh the list to make sure home time zone is displayed / removed
+ mReloadCitiesList = true;
+ mLastTimeZone = TimeZone.getDefault().getID();
+ } else if (action.equals(Intent.ACTION_LOCALE_CHANGED)) {
+ // reload the cities DB to pick up the cities name in the new language
+ mReloadCitiesDb = true;
+ } else if (action.equals(Utils.ACTION_ON_QUARTER_HOUR)) {
+ // Since the system may miss or not send time zone changes in all cases
+ // make sure to update the world clock list if the time zone
+ // changed in the last 15 minutes
+ String currentTimeZone = TimeZone.getDefault().getID();
+ if (!TextUtils.equals(currentTimeZone, mLastTimeZone)) {
+ // refresh the list to make sure home time zone is displayed / removed
+ mReloadCitiesList = true;
+ mLastTimeZone = currentTimeZone;
+ Log.v(TAG,"Detected time zone change,updating time zone to " + currentTimeZone);
+ }
+ }
+
// For any time change or locale change, refresh all
widgetManager.notifyAppWidgetViewDataChanged(mId, R.id.digital_appwidget_listview);
RemoteViews widget =
@@ -232,6 +274,7 @@
WidgetUtils.setClockSize(context, widget, ratio);
refreshAlarm(context, widget);
widgetManager.partiallyUpdateAppWidget(mId, widget);
+ mQuarterlyIntent = Utils.refreshAlarmOnQuarterHour(context, mQuarterlyIntent);
}
}
diff --git a/src/com/android/alarmclock/WidgetUtils.java b/src/com/android/alarmclock/WidgetUtils.java
index 757e062..d4a6b70 100644
--- a/src/com/android/alarmclock/WidgetUtils.java
+++ b/src/com/android/alarmclock/WidgetUtils.java
@@ -56,6 +56,26 @@
return 1;
}
+ // Calculate the scale factor of the fonts in the list of the widget using the widget height
+ public static float getHeightScaleRatio(Context context, Bundle options, int id) {
+ AppWidgetManager widgetManager = AppWidgetManager.getInstance(context);
+ if (options == null) {
+ options = widgetManager.getAppWidgetOptions(id);
+ }
+ if (options != null) {
+ int minHeight = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT);
+ if (minHeight == 0) {
+ // No data , do no scaling
+ return 1f;
+ }
+ Resources res = context.getResources();
+ float ratio = minHeight / res.getDimension(R.dimen.def_digital_widget_height);
+ return (ratio > 1) ? 1 : ratio;
+ }
+ return 1;
+ }
+
+
// Decide if to show the list of world clock.
// Check to see if the widget size is big enough, if it is return true.
public static boolean showList(Context context, int id, float scale) {
@@ -66,7 +86,7 @@
}
int minHeight = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT);
int neededSize = (int) context.getResources().
- getDimension(R.dimen.def_digital_widget_height);
+ getDimension(R.dimen.digital_widget_list_min_height);
return (minHeight > neededSize);
}
}
diff --git a/src/com/android/deskclock/AlarmAlertFullScreen.java b/src/com/android/deskclock/AlarmAlertFullScreen.java
index 0cf49f8..8f1582c 100644
--- a/src/com/android/deskclock/AlarmAlertFullScreen.java
+++ b/src/com/android/deskclock/AlarmAlertFullScreen.java
@@ -52,7 +52,6 @@
private final boolean LOG = true;
// These defaults must match the values in res/xml/settings.xml
private static final String DEFAULT_SNOOZE = "10";
- private static final String DEFAULT_VOLUME_BEHAVIOR = "2";
protected static final String SCREEN_OFF = "screen_off";
protected Alarm mAlarm;
@@ -80,11 +79,12 @@
if (action.equals(Alarms.ALARM_SNOOZE_ACTION)) {
snooze();
} else if (action.equals(Alarms.ALARM_DISMISS_ACTION)) {
- dismiss(false);
+ dismiss(false, false);
} else {
Alarm alarm = intent.getParcelableExtra(Alarms.ALARM_INTENT_EXTRA);
+ boolean replaced = intent.getBooleanExtra(Alarms.ALARM_REPLACED, false);
if (alarm != null && mAlarm.id == alarm.id) {
- dismiss(true);
+ dismiss(true, replaced);
}
}
}
@@ -118,7 +118,7 @@
final String vol =
PreferenceManager.getDefaultSharedPreferences(this)
.getString(SettingsActivity.KEY_VOLUME_BEHAVIOR,
- DEFAULT_VOLUME_BEHAVIOR);
+ SettingsActivity.DEFAULT_VOLUME_BEHAVIOR);
mVolumeBehavior = Integer.parseInt(vol);
final Window win = getWindow();
@@ -255,12 +255,12 @@
}
// Dismiss the alarm.
- private void dismiss(boolean killed) {
+ private void dismiss(boolean killed, boolean replaced) {
if (LOG) {
Log.v("AlarmAlertFullScreen - dismiss");
}
- Log.i(killed ? "Alarm killed" : "Alarm dismissed by user");
+ Log.i("Alarm id=" + mAlarm.id + (killed ? (replaced ? " replaced" : " killed") : " dismissed by user"));
// The service told us that the alarm has been killed, do not modify
// the notification or stop the service.
if (!killed) {
@@ -269,7 +269,9 @@
nm.cancel(mAlarm.id);
stopService(new Intent(Alarms.ALARM_ALERT_ACTION));
}
- finish();
+ if (!replaced) {
+ finish();
+ }
}
/**
@@ -345,7 +347,7 @@
break;
case 2:
- dismiss(false);
+ dismiss(false, false);
break;
default:
@@ -390,7 +392,7 @@
break;
case R.drawable.ic_alarm_alert_dismiss:
- dismiss(false);
+ dismiss(false, false);
break;
default:
// Code should never reach here.
diff --git a/src/com/android/deskclock/AlarmClock.java b/src/com/android/deskclock/AlarmClock.java
index ab92228..14868c0 100644
--- a/src/com/android/deskclock/AlarmClock.java
+++ b/src/com/android/deskclock/AlarmClock.java
@@ -18,10 +18,12 @@
import android.app.ActionBar;
import android.app.Activity;
+import android.app.AlertDialog;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.app.LoaderManager;
import android.content.Context;
+import android.content.DialogInterface;
import android.content.Intent;
import android.content.Loader;
import android.content.res.Resources;
@@ -65,7 +67,7 @@
public class AlarmClock extends Activity implements LoaderManager.LoaderCallbacks<Cursor>,
AlarmTimePickerDialogFragment.AlarmTimePickerDialogHandler,
LabelDialogFragment.AlarmLabelDialogHandler,
- OnLongClickListener, Callback {
+ OnLongClickListener, Callback, DialogInterface.OnClickListener {
private static final String KEY_EXPANDED_IDS = "expandedIds";
private static final String KEY_REPEAT_CHECKED_IDS = "repeatCheckedIds";
@@ -75,6 +77,7 @@
private static final String KEY_UNDO_SHOWING = "undoShowing";
private static final String KEY_PREVIOUS_DAY_MAP = "previousDayMap";
private static final String KEY_SELECTED_ALARM = "selectedAlarm";
+ private static final String KEY_DELETE_CONFIRMATION = "deleteConfirmation";
private static final int REQUEST_CODE_RINGTONE = 1;
@@ -86,6 +89,7 @@
private Alarm mSelectedAlarm;
private int mScrollToAlarmId = -1;
+ private boolean mInDeleteConfirmation = false;
// This flag relies on the activity having a "standard" launchMode and a new instance of this
// activity being created when launched.
@@ -118,6 +122,7 @@
selectedAlarms = savedState.getIntArray(KEY_SELECTED_ALARMS);
previousDayMap = savedState.getBundle(KEY_PREVIOUS_DAY_MAP);
mSelectedAlarm = savedState.getParcelable(KEY_SELECTED_ALARM);
+ mInDeleteConfirmation = savedState.getBoolean(KEY_DELETE_CONFIRMATION, false);
}
mAlarmsList = (SwipeableListView) findViewById(R.id.alarms_list);
@@ -174,6 +179,13 @@
}
+ @Override
+ public void onResume() {
+ super.onResume();
+ if (mInDeleteConfirmation) {
+ showConfirmationDialog();
+ }
+ }
private void hideUndoBar(boolean animate, MotionEvent event) {
if (mUndoBar != null) {
if (event != null && mUndoBar.isEventInToastBar(event)) {
@@ -197,6 +209,7 @@
outState.putBoolean(KEY_UNDO_SHOWING, mUndoShowing);
outState.putBundle(KEY_PREVIOUS_DAY_MAP, mAdapter.getPreviousDaysOfWeekMap());
outState.putParcelable(KEY_SELECTED_ALARM, mSelectedAlarm);
+ outState.putBoolean(KEY_DELETE_CONFIRMATION, mInDeleteConfirmation);
}
private void updateLayout() {
@@ -465,6 +478,7 @@
CheckBox vibrate;
ViewGroup collapse;
TextView ringtone;
+ View hairLine;
// Other states
Alarm alarm;
@@ -574,6 +588,7 @@
holder.infoArea = view.findViewById(R.id.info_area);
holder.repeat = (CheckBox) view.findViewById(R.id.repeat_onoff);
holder.clickableLabel = (TextView) view.findViewById(R.id.edit_label);
+ holder.hairLine = view.findViewById(R.id.hairline);
holder.repeatDays = (LinearLayout) view.findViewById(R.id.repeat_days);
// Build button for each day.
@@ -610,14 +625,12 @@
itemHolder.onoff.setChecked(alarm.enabled);
if (mSelectedAlarms.contains(itemHolder.alarm.id)) {
itemHolder.alarmItem.setBackgroundColor(mBackgroundColorSelected);
- itemHolder.alarmItem.setAlpha(1f);
+ setItemAlpha(itemHolder, true);
+ itemHolder.onoff.setEnabled(false);
} else {
+ itemHolder.onoff.setEnabled(true);
itemHolder.alarmItem.setBackgroundColor(mBackgroundColor);
- if (itemHolder.onoff.isChecked()) {
- itemHolder.alarmItem.setAlpha(1f);
- } else {
- itemHolder.alarmItem.setAlpha(0.5f);
- }
+ setItemAlpha(itemHolder, itemHolder.onoff.isChecked());
}
final CompoundButton.OnCheckedChangeListener onOffListener =
new CompoundButton.OnCheckedChangeListener() {
@@ -629,11 +642,7 @@
return;
}
if (checked != alarm.enabled) {
- if (checked) {
- itemHolder.alarmItem.setAlpha(1f);
- } else {
- itemHolder.alarmItem.setAlpha(0.5f);
- }
+ setItemAlpha(itemHolder, checked);
alarm.enabled = checked;
asyncUpdateAlarm(alarm, alarm.enabled);
}
@@ -912,6 +921,16 @@
itemHolder.ringtone.setOnLongClickListener(mLongClickListener);
}
+ // Sets the alpha of the item except the on/off switch. This gives a visual effect
+ // for enabled/disabled alarm while leaving the on/off switch more visible
+ private void setItemAlpha(ItemHolder holder, boolean enabled) {
+ float alpha = enabled ? 1f : 0.5f;
+ holder.clock.setAlpha(alpha);
+ holder.infoArea.setAlpha(alpha);
+ holder.expandArea.setAlpha(alpha);
+ holder.hairLine.setAlpha(alpha);
+ }
+
private void updateDaysOfWeekButtons(ItemHolder holder, Alarm.DaysOfWeek daysOfWeek) {
HashSet<Integer> setDays = daysOfWeek.getSetDays();
for (int i = 0; i < 7; i++) {
@@ -1211,10 +1230,7 @@
switch (item.getItemId()) {
// Delete selected items and close CAB.
case R.id.menu_item_delete_alarm:
- if (mAdapter != null) {
- mAdapter.deleteSelectedAlarms();
- mode.finish();
- }
+ showConfirmationDialog();
break;
default:
break;
@@ -1241,4 +1257,30 @@
return false;
}
+ /***
+ * Handle the delete alarms confirmation dialog
+ */
+
+ private void showConfirmationDialog() {
+ AlertDialog.Builder b = new AlertDialog.Builder(this);
+ Resources res = getResources();
+ String msg = String.format(res.getQuantityText(R.plurals.alarm_delete_confirmation,
+ mAdapter.getSelectedItemsNum()).toString());
+ b.setCancelable(true).setMessage(msg)
+ .setNegativeButton(res.getString(android.R.string.cancel), this)
+ .setPositiveButton(res.getString(android.R.string.ok), this).show();
+ mInDeleteConfirmation = true;
+ }
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ if (which == -1) {
+ if (mAdapter != null) {
+ mAdapter.deleteSelectedAlarms();
+ mActionMode.finish();
+ }
+ }
+ dialog.dismiss();
+ mInDeleteConfirmation = false;
+ }
+
}
diff --git a/src/com/android/deskclock/AlarmInitReceiver.java b/src/com/android/deskclock/AlarmInitReceiver.java
index 83ca4a1..b2625f1 100644
--- a/src/com/android/deskclock/AlarmInitReceiver.java
+++ b/src/com/android/deskclock/AlarmInitReceiver.java
@@ -27,6 +27,9 @@
public class AlarmInitReceiver extends BroadcastReceiver {
+ // A flag that indicates that switching the volume button default was done
+ private static final String PREF_VOLUME_DEF_DONE = "vol_def_done";
+
/**
* Sets alarm on ACTION_BOOT_COMPLETED. Resets alarm on
* TIME_SET, TIMEZONE_CHANGED
@@ -49,9 +52,15 @@
// Clear stopwatch and timers data
SharedPreferences prefs =
PreferenceManager.getDefaultSharedPreferences(context);
- Log.v("AlarmInitReceiver - Cleaning old timer and stopwatch data");
- TimerObj.cleanTimersFromSharedPrefs(prefs);
+ Log.v("AlarmInitReceiver - Reset timers and clear stopwatch data");
+ TimerObj.resetTimersInSharedPrefs(prefs);
Utils.clearSwSharedPref(prefs);
+
+ if (!prefs.getBoolean(PREF_VOLUME_DEF_DONE, false)) {
+ // Fix the default
+ Log.v("AlarmInitReceiver - resetting volume button default");
+ switchVolumeButtonDefault(prefs);
+ }
}
Alarms.setNextAlert(context);
result.finish();
@@ -60,4 +69,15 @@
}
});
}
+
+ private void switchVolumeButtonDefault(SharedPreferences prefs) {
+ SharedPreferences.Editor editor = prefs.edit();
+
+ editor.putString(SettingsActivity.KEY_VOLUME_BEHAVIOR,
+ SettingsActivity.DEFAULT_VOLUME_BEHAVIOR);
+
+ // Make sure we do it only once
+ editor.putBoolean(PREF_VOLUME_DEF_DONE, true);
+ editor.apply();
+ }
}
diff --git a/src/com/android/deskclock/AlarmKlaxon.java b/src/com/android/deskclock/AlarmKlaxon.java
index 61f35cf..7834623 100644
--- a/src/com/android/deskclock/AlarmKlaxon.java
+++ b/src/com/android/deskclock/AlarmKlaxon.java
@@ -33,6 +33,7 @@
import android.preference.PreferenceManager;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
+import android.text.format.DateUtils;
/**
* Manages alarms and vibe. Runs as a service so that it can continue to play
@@ -62,7 +63,7 @@
if (Log.LOGV) {
Log.v("*********** Alarm killer triggered ***********");
}
- sendKillBroadcast((Alarm) msg.obj);
+ sendKillBroadcast((Alarm) msg.obj, false);
stopSelf();
break;
}
@@ -78,7 +79,7 @@
// we don't kill the alarm during a call.
if (state != TelephonyManager.CALL_STATE_IDLE
&& state != mInitialCallState) {
- sendKillBroadcast(mCurrentAlarm);
+ sendKillBroadcast(mCurrentAlarm, false);
stopSelf();
}
}
@@ -129,7 +130,7 @@
}
if (mCurrentAlarm != null) {
- sendKillBroadcast(mCurrentAlarm);
+ sendKillBroadcast(mCurrentAlarm, true);
}
play(alarm);
@@ -141,12 +142,13 @@
return START_STICKY;
}
- private void sendKillBroadcast(Alarm alarm) {
+ private void sendKillBroadcast(Alarm alarm, boolean replaced) {
long millis = System.currentTimeMillis() - mStartTime;
- int minutes = (int) Math.round(millis / 60000.0);
+ int minutes = (int) Math.round(millis / (double)DateUtils.MINUTE_IN_MILLIS);
Intent alarmKilled = new Intent(Alarms.ALARM_KILLED);
alarmKilled.putExtra(Alarms.ALARM_INTENT_EXTRA, alarm);
alarmKilled.putExtra(Alarms.ALARM_KILLED_TIMEOUT, minutes);
+ alarmKilled.putExtra(Alarms.ALARM_REPLACED, replaced);
sendBroadcast(alarmKilled);
}
@@ -291,7 +293,7 @@
int autoSnoozeMinutes = Integer.parseInt(autoSnooze);
if (autoSnoozeMinutes != -1) {
mHandler.sendMessageDelayed(mHandler.obtainMessage(KILLER, alarm),
- 1000 * autoSnoozeMinutes * 60);
+ autoSnoozeMinutes * DateUtils.MINUTE_IN_MILLIS);
}
}
diff --git a/src/com/android/deskclock/AlarmReceiver.java b/src/com/android/deskclock/AlarmReceiver.java
index 003ee09..69f726b 100644
--- a/src/com/android/deskclock/AlarmReceiver.java
+++ b/src/com/android/deskclock/AlarmReceiver.java
@@ -116,7 +116,7 @@
// Intentionally verbose: always log the alarm time to provide useful
// information in bug reports.
long now = System.currentTimeMillis();
- Log.v("Received alarm set for " + Log.formatTime(alarm.time));
+ Log.v("Received alarm set for id=" + alarm.id + " " + Log.formatTime(alarm.time));
// Always verbose to track down time change problems.
if (now > alarm.time + STALE_WINDOW) {
diff --git a/src/com/android/deskclock/Alarms.java b/src/com/android/deskclock/Alarms.java
index b762388..637b824 100644
--- a/src/com/android/deskclock/Alarms.java
+++ b/src/com/android/deskclock/Alarms.java
@@ -76,6 +76,9 @@
// alarm played before being killed.
public static final String ALARM_KILLED_TIMEOUT = "alarm_killed_timeout";
+ // Extra in the ALARM_KILLED intent to indicate when alarm was replaced
+ public static final String ALARM_REPLACED = "alarm_replaced";
+
// This string is used to indicate a silent alarm in the db.
public static final String ALARM_ALERT_SILENT = "silent";
@@ -423,9 +426,9 @@
AlarmManager am = (AlarmManager)
context.getSystemService(Context.ALARM_SERVICE);
- if (Log.LOGV) {
- Log.v("** setAlert id " + alarm.id + " atTime " + atTimeInMillis);
- }
+ // Intentionally verbose: always log the alarm time to provide useful
+ // information in bug reports.
+ Log.v("Alarm set for id=" + alarm.id + " " + Log.formatTime(atTimeInMillis));
Intent intent = new Intent(ALARM_ALERT_ACTION);
@@ -469,6 +472,9 @@
PendingIntent.FLAG_CANCEL_CURRENT);
am.cancel(sender);
setStatusBarIcon(context, false);
+ // Intentionally verbose: always log the lack of a next alarm to provide useful
+ // information in bug reports.
+ Log.v("No next alarm");
saveNextAlarm(context, "");
}
diff --git a/src/com/android/deskclock/AnalogClock.java b/src/com/android/deskclock/AnalogClock.java
index 8b1bf9a..55fff90 100644
--- a/src/com/android/deskclock/AnalogClock.java
+++ b/src/com/android/deskclock/AnalogClock.java
@@ -61,8 +61,8 @@
private String mTimeZoneId;
private boolean mNoSeconds = false;
- private float mDotRadius;
- private float mDotOffset;
+ private final float mDotRadius;
+ private final float mDotOffset;
private Paint mDotPaint;
public AnalogClock(Context context) {
@@ -207,47 +207,30 @@
canvas.drawCircle(x, y - (h / 2) + mDotOffset, mDotRadius, mDotPaint);
}
- canvas.save();
- canvas.rotate(mHour / 12.0f * 360.0f, x, y);
- final Drawable hourHand = mHourHand;
- if (changed) {
- w = hourHand.getIntrinsicWidth();
- h = hourHand.getIntrinsicHeight();
- hourHand.setBounds(x - (w / 2), y - (h / 2), x + (w / 2), y + (h / 2));
- }
- hourHand.draw(canvas);
- canvas.restore();
-
+ drawHand(canvas, mHourHand, x, y, mHour / 12.0f * 360.0f, changed);
+ drawHand(canvas, mMinuteHand, x, y, mMinutes / 60.0f * 360.0f, changed);
if (!mNoSeconds) {
- canvas.save();
- canvas.rotate(mSeconds / 60.0f * 360.0f, x, y);
-
- final Drawable secondHand = mSecondHand;
- if (changed) {
- w = secondHand.getIntrinsicWidth();
- h = secondHand.getIntrinsicHeight();
- secondHand.setBounds(x - (w / 2), y - (h / 2), x + (w / 2), y + (h / 2));
- }
- secondHand.draw(canvas);
- canvas.restore();
+ drawHand(canvas, mSecondHand, x, y, mSeconds / 60.0f * 360.0f, changed);
}
- canvas.save();
- canvas.rotate(mMinutes / 60.0f * 360.0f, x, y);
-
- final Drawable minuteHand = mMinuteHand;
- if (changed) {
- w = minuteHand.getIntrinsicWidth();
- h = minuteHand.getIntrinsicHeight();
- minuteHand.setBounds(x - (w / 2), y - (h / 2), x + (w / 2), y + (h / 2));
- }
- minuteHand.draw(canvas);
- canvas.restore();
if (scaled) {
canvas.restore();
}
}
+ private void drawHand(Canvas canvas, Drawable hand, int x, int y, float angle,
+ boolean changed) {
+ canvas.save();
+ canvas.rotate(angle, x, y);
+ if (changed) {
+ final int w = hand.getIntrinsicWidth();
+ final int h = hand.getIntrinsicHeight();
+ hand.setBounds(x - (w / 2), y - (h / 2), x + (w / 2), y + (h / 2));
+ }
+ hand.draw(canvas);
+ canvas.restore();
+ }
+
private void onTimeChanged() {
mCalendar.setToNow();
diff --git a/src/com/android/deskclock/ClockFragment.java b/src/com/android/deskclock/ClockFragment.java
index db3bc8e..bd1b581 100644
--- a/src/com/android/deskclock/ClockFragment.java
+++ b/src/com/android/deskclock/ClockFragment.java
@@ -16,7 +16,6 @@
package com.android.deskclock;
-import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -27,7 +26,6 @@
import android.os.Bundle;
import android.os.Handler;
import android.preference.PreferenceManager;
-import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
@@ -63,23 +61,33 @@
private final BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
- boolean changed = intent.getAction().equals(Intent.ACTION_TIME_CHANGED)
- || intent.getAction().equals(Intent.ACTION_TIMEZONE_CHANGED);
- if (changed || intent.getAction().equals(Utils.ACTION_ON_QUARTER_HOUR)) {
+ String action = intent.getAction();
+ boolean changed = action.equals(Intent.ACTION_TIME_CHANGED)
+ || action.equals(Intent.ACTION_TIMEZONE_CHANGED)
+ || action.equals(Intent.ACTION_LOCALE_CHANGED);
+ if (changed || action.equals(Utils.ACTION_ON_QUARTER_HOUR)) {
Utils.updateDate(mDateFormat, mDateFormatForAccessibility,mClockFrame);
if (mAdapter != null) {
// *CHANGED may modify the need for showing the Home City
if (changed && (mAdapter.hasHomeCity() != mAdapter.needHomeCity())) {
- mAdapter.loadData(context);
+ mAdapter.reloadData(context);
} else {
mAdapter.notifyDataSetChanged();
}
+ // Reloading the cities list with new localized names
+ if (action.equals(Intent.ACTION_LOCALE_CHANGED)) {
+ mAdapter.loadCitiesDb(context);
+ mAdapter.notifyDataSetChanged();
+ }
}
}
- if (changed || intent.getAction().equals(Alarms.ALARM_DONE_ACTION)
- || intent.getAction().equals(Alarms.ALARM_SNOOZE_CANCELLED)) {
+ if (changed || action.equals(Alarms.ALARM_DONE_ACTION)
+ || action.equals(Alarms.ALARM_SNOOZE_CANCELLED)) {
Utils.refreshAlarm(getActivity(), mClockFrame);
}
+ if (changed) {
+ mQuarterlyIntent = Utils.refreshAlarmOnQuarterHour(getActivity(), mQuarterlyIntent);
+ }
}
};
@@ -153,12 +161,7 @@
mDateFormat = getString(R.string.abbrev_wday_month_day_no_year);
mDateFormatForAccessibility = getString(R.string.full_wday_month_day_no_year);
- long alarmOnQuarterHour = Utils.getAlarmOnQuarterHour();
- mQuarterlyIntent = PendingIntent.getBroadcast(
- getActivity(), 0, new Intent(Utils.ACTION_ON_QUARTER_HOUR), 0);
- ((AlarmManager) getActivity().getSystemService(Context.ALARM_SERVICE)).setRepeating(
- AlarmManager.RTC, alarmOnQuarterHour, AlarmManager.INTERVAL_FIFTEEN_MINUTES,
- mQuarterlyIntent);
+ mQuarterlyIntent = Utils.startAlarmOnQuarterHour(getActivity());
// Besides monitoring when quarter-hour changes, monitor other actions that
// effect clock time
IntentFilter filter = new IntentFilter(Utils.ACTION_ON_QUARTER_HOUR);
@@ -166,12 +169,14 @@
filter.addAction(Alarms.ALARM_SNOOZE_CANCELLED);
filter.addAction(Intent.ACTION_TIME_CHANGED);
filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
+ filter.addAction(Intent.ACTION_LOCALE_CHANGED);
getActivity().registerReceiver(mIntentReceiver, filter);
mButtons.setAlpha(mButtonsHidden ? 0 : 1);
- // Resume can invoked after changing the cities list.
+ // Resume can invoked after changing the cities list or a change in locale
if (mAdapter != null) {
+ mAdapter.loadCitiesDb(getActivity());
mAdapter.reloadData(getActivity());
}
// Resume can invoked after changing the clock style.
@@ -189,8 +194,7 @@
public void onPause() {
super.onPause();
mPrefs.unregisterOnSharedPreferenceChangeListener(this);
- ((AlarmManager) getActivity().getSystemService(Context.ALARM_SERVICE)).cancel(
- mQuarterlyIntent);
+ Utils.cancelAlarmOnQuarterHour(getActivity(), mQuarterlyIntent);
getActivity().unregisterReceiver(mIntentReceiver);
}
diff --git a/src/com/android/deskclock/DeskClock.java b/src/com/android/deskclock/DeskClock.java
index 159fffe..0cc0d28 100644
--- a/src/com/android/deskclock/DeskClock.java
+++ b/src/com/android/deskclock/DeskClock.java
@@ -20,15 +20,13 @@
import android.app.ActionBar.Tab;
import android.app.Activity;
import android.app.Fragment;
+import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
-import android.graphics.drawable.TransitionDrawable;
import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
import android.preference.PreferenceManager;
import android.support.v13.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
@@ -38,10 +36,6 @@
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
-import android.view.animation.Animation;
-import android.view.animation.Animation.AnimationListener;
-import android.view.animation.AnimationUtils;
-import android.view.animation.TranslateAnimation;
import android.widget.PopupMenu;
import android.widget.TextView;
@@ -54,6 +48,7 @@
import com.android.deskclock.worldclock.CitiesActivity;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.TimeZone;
/**
@@ -134,6 +129,7 @@
mStopwatchTab.setContentDescription(R.string.menu_stopwatch);
mTabsAdapter.addTab(mStopwatchTab, StopwatchFragment.class,STOPWATCH_TAB_INDEX);
mActionBar.setSelectedNavigationItem(selectedIndex);
+ mTabsAdapter.notifySelectedPage(selectedIndex);
}
}
@@ -268,10 +264,19 @@
Log.v(LOG_TAG, "Setting home time zone to " + homeTimeZone);
}
- public boolean isClockTab() {
- return mViewPager.getCurrentItem() == CLOCK_TAB_INDEX;
+ public void registerPageChangedListener(DeskClockFragment frag) {
+ if (mTabsAdapter != null) {
+ mTabsAdapter.registerPageChangedListener(frag);
+ }
}
+ public void unregisterPageChangedListener(DeskClockFragment frag) {
+ if (mTabsAdapter != null) {
+ mTabsAdapter.unregisterPageChangedListener(frag);
+ }
+ }
+
+
/***
* Adapter for wrapping together the ActionBar's tab with the ViewPager
*/
@@ -300,6 +305,8 @@
ActionBar mMainActionBar;
Context mContext;
ViewPager mPager;
+ // Used for doing callbacks to fragments.
+ HashSet<String> mFragmentTags = new HashSet<String>();
public TabsAdapter(Activity activity, ViewPager pager) {
super(activity.getFragmentManager());
@@ -340,6 +347,7 @@
@Override
public void onPageSelected(int position) {
mMainActionBar.setSelectedNavigationItem(position);
+ notifyPageChanged(position);
}
@Override
@@ -363,14 +371,44 @@
// Do nothing
}
+
+ public void notifySelectedPage(int page) {
+ notifyPageChanged(page);
+ }
+
+ private void notifyPageChanged(int newPage) {
+ for (String tag : mFragmentTags) {
+ final FragmentManager fm = getFragmentManager();
+ DeskClockFragment f = (DeskClockFragment) fm.findFragmentByTag(tag);
+ if (f != null) {
+ f.onPageChanged(newPage);
+ }
+ }
+ }
+
+ public void registerPageChangedListener(DeskClockFragment frag) {
+ String tag = frag.getTag();
+ if (mFragmentTags.contains(tag)) {
+ Log.wtf(LOG_TAG, "Trying to add an existing fragment " + tag);
+ } else {
+ mFragmentTags.add(frag.getTag());
+ }
+ // Since registering a listener by the fragment is done sometimes after the page
+ // was already changed, make sure the fragment gets the current page
+ frag.onPageChanged(mMainActionBar.getSelectedNavigationIndex());
+ }
+
+ public void unregisterPageChangedListener(DeskClockFragment frag) {
+ mFragmentTags.remove(frag.getTag());
+ }
}
public static abstract class OnTapListener implements OnTouchListener {
private float mLastTouchX;
private float mLastTouchY;
private long mLastTouchTime;
- private TextView mMakePressedTextView;
- private int mPressedColor, mGrayColor;
+ private final TextView mMakePressedTextView;
+ private final int mPressedColor, mGrayColor;
private final float MAX_MOVEMENT_ALLOWED = 20;
private final long MAX_TIME_ALLOWED = 500;
diff --git a/src/com/android/deskclock/DeskClockFragment.java b/src/com/android/deskclock/DeskClockFragment.java
index 4df2fcc..dcf7f7c 100644
--- a/src/com/android/deskclock/DeskClockFragment.java
+++ b/src/com/android/deskclock/DeskClockFragment.java
@@ -17,19 +17,10 @@
package com.android.deskclock;
import android.app.Fragment;
-import android.content.Context;
public class DeskClockFragment extends Fragment {
- protected Context mContext;
- private boolean mButtonClicked = false;
- protected void buttonClicked(boolean state) {
- mButtonClicked = state;
- }
-
- public boolean isButtonClicked() {
- boolean res = mButtonClicked;
- mButtonClicked = false;
- return res;
+ public void onPageChanged(int page) {
+ // Do nothing here , only in derived classes
}
}
diff --git a/src/com/android/deskclock/Log.java b/src/com/android/deskclock/Log.java
index 39e7e34..e075442 100644
--- a/src/com/android/deskclock/Log.java
+++ b/src/com/android/deskclock/Log.java
@@ -55,6 +55,6 @@
}
public static String formatTime(long millis) {
- return new SimpleDateFormat("HH:mm:ss.SSS aaa").format(new Date(millis));
+ return new SimpleDateFormat("HH:mm:ss.SSS/E").format(new Date(millis));
}
}
diff --git a/src/com/android/deskclock/ScreensaverActivity.java b/src/com/android/deskclock/ScreensaverActivity.java
index 814888a..c75e1fc 100644
--- a/src/com/android/deskclock/ScreensaverActivity.java
+++ b/src/com/android/deskclock/ScreensaverActivity.java
@@ -16,44 +16,23 @@
package com.android.deskclock;
-import android.animation.Animator;
-import android.animation.AnimatorSet;
-import android.animation.ObjectAnimator;
-import android.animation.TimeInterpolator;
import android.app.Activity;
import android.app.AlarmManager;
import android.app.PendingIntent;
-import android.app.UiModeManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import android.content.SharedPreferences;
import android.content.res.Configuration;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuffColorFilter;
import android.os.BatteryManager;
-import android.os.Bundle;
import android.os.Handler;
-import android.preference.PreferenceManager;
-import android.provider.Settings;
-import android.service.dreams.DreamService;
-import android.text.TextUtils;
-import android.text.format.DateFormat;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
-import android.view.animation.AccelerateInterpolator;
-import android.view.animation.DecelerateInterpolator;
-import android.widget.TextView;
import com.android.deskclock.Utils.ScreensaverMoveSaverRunnable;
-import java.util.Calendar;
-
public class ScreensaverActivity extends Activity {
static final boolean DEBUG = false;
static final String TAG = "DeskClock/ScreensaverActivity";
@@ -96,6 +75,8 @@
if (changed) {
Utils.refreshAlarm(ScreensaverActivity.this, mContentView);
+ mQuarterlyIntent = Utils.refreshAlarmOnQuarterHour(
+ ScreensaverActivity.this, mQuarterlyIntent);
}
}
@@ -136,18 +117,13 @@
layoutClockSaver();
mHandler.post(mMoveSaverRunnable);
- long alarmOnQuarterHour = Utils.getAlarmOnQuarterHour();
- mQuarterlyIntent = PendingIntent.getBroadcast(
- this, 0, new Intent(Utils.ACTION_ON_QUARTER_HOUR), 0);
- ((AlarmManager) getSystemService(Context.ALARM_SERVICE)).setRepeating(
- AlarmManager.RTC, alarmOnQuarterHour, AlarmManager.INTERVAL_FIFTEEN_MINUTES,
- mQuarterlyIntent);
+ mQuarterlyIntent = Utils.startAlarmOnQuarterHour(this);
}
@Override
public void onPause() {
mHandler.removeCallbacks(mMoveSaverRunnable);
- ((AlarmManager) getSystemService(Context.ALARM_SERVICE)).cancel(mQuarterlyIntent);
+ Utils.cancelAlarmOnQuarterHour(this, mQuarterlyIntent);
finish();
super.onPause();
}
diff --git a/src/com/android/deskclock/SettingsActivity.java b/src/com/android/deskclock/SettingsActivity.java
index 2e5a2fe..bafe95f 100644
--- a/src/com/android/deskclock/SettingsActivity.java
+++ b/src/com/android/deskclock/SettingsActivity.java
@@ -17,6 +17,7 @@
package com.android.deskclock;
import android.app.ActionBar;
+import android.content.Intent;
import android.content.res.Resources;
import android.media.AudioManager;
import android.os.Bundle;
@@ -30,6 +31,11 @@
import android.view.Menu;
import android.view.MenuItem;
+import com.android.deskclock.worldclock.Cities;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
import java.util.TimeZone;
/**
@@ -58,10 +64,11 @@
static final String KEY_VOLUME_BUTTONS =
"volume_button_setting";
+ public static final String DEFAULT_VOLUME_BEHAVIOR = "0";
+
private static CharSequence[][] mTimezones;
private long mTime;
- private static final boolean SHOW_DAYLIGHT_SAVINGS_INDICATOR = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -156,10 +163,12 @@
final ListPreference listPref = (ListPreference) pref;
final int idx = listPref.findIndexOfValue((String) newValue);
listPref.setSummary(listPref.getEntries()[idx]);
+ notifyHomeTimeZoneChanged();
} else if (KEY_AUTO_HOME_CLOCK.equals(pref.getKey())) {
boolean state =((CheckBoxPreference) pref).isChecked();
Preference homeTimeZone = findPreference(KEY_HOME_TZ);
homeTimeZone.setEnabled(!state);
+ notifyHomeTimeZoneChanged();
} else if (KEY_VOLUME_BUTTONS.equals(pref.getKey())) {
final ListPreference listPref = (ListPreference) pref;
final int idx = listPref.findIndexOfValue((String) newValue);
@@ -178,6 +187,12 @@
}
}
+ private void notifyHomeTimeZoneChanged() {
+ Intent i = new Intent(Cities.WORLDCLOCK_UPDATE_INTENT);
+ sendBroadcast(i);
+ }
+
+
private void refresh() {
ListPreference listPref = (ListPreference) findPreference(KEY_AUTO_SILENCE);
String delay = listPref.getValue();
@@ -203,6 +218,52 @@
SnoozeLengthDialog snoozePref = (SnoozeLengthDialog) findPreference(KEY_ALARM_SNOOZE);
snoozePref.setSummary();
}
+
+ private class TimeZoneRow implements Comparable<TimeZoneRow> {
+ private static final boolean SHOW_DAYLIGHT_SAVINGS_INDICATOR = false;
+
+ public final String mId;
+ public final String mDisplayName;
+ public final int mOffset;
+
+ public TimeZoneRow(String id, String name) {
+ mId = id;
+ TimeZone tz = TimeZone.getTimeZone(id);
+ boolean useDaylightTime = tz.useDaylightTime();
+ mOffset = tz.getOffset(mTime);
+ mDisplayName = buildGmtDisplayName(id, name, useDaylightTime);
+ }
+
+ @Override
+ public int compareTo(TimeZoneRow another) {
+ return mOffset - another.mOffset;
+ }
+
+ public String buildGmtDisplayName(String id, String displayName, boolean useDaylightTime) {
+ int p = Math.abs(mOffset);
+ StringBuilder name = new StringBuilder("(GMT");
+ name.append(mOffset < 0 ? '-' : '+');
+
+ name.append(p / DateUtils.HOUR_IN_MILLIS);
+ name.append(':');
+
+ int min = p / 60000;
+ min %= 60;
+
+ if (min < 10) {
+ name.append('0');
+ }
+ name.append(min);
+ name.append(") ");
+ name.append(displayName);
+ if (useDaylightTime && SHOW_DAYLIGHT_SAVINGS_INDICATOR) {
+ name.append(" \u2600"); // Sun symbol
+ }
+ return name.toString();
+ }
+ }
+
+
/**
* Returns an array of ids/time zones. This returns a double indexed array
* of ids and time zones for Calendar. It is an inefficient method and
@@ -218,44 +279,19 @@
if (ids.length != labels.length) {
Log.wtf("Timezone ids and labels have different length!");
}
- CharSequence[][] timeZones = new CharSequence[2][ids.length];
+ List<TimeZoneRow> timezones = new ArrayList<TimeZoneRow>();
for (int i = 0; i < ids.length; i++) {
- timeZones[0][i] = ids[i];
- timeZones[1][i] = buildGmtDisplayName(ids[i], labels[i]);
+ timezones.add(new TimeZoneRow(ids[i], labels[i]));
+ }
+ Collections.sort(timezones);
+
+ CharSequence[][] timeZones = new CharSequence[2][timezones.size()];
+ int i = 0;
+ for (TimeZoneRow row : timezones) {
+ timeZones[0][i] = row.mId;
+ timeZones[1][i++] = row.mDisplayName;
}
return timeZones;
}
- public String buildGmtDisplayName(String id, String displayName) {
- TimeZone tz = TimeZone.getTimeZone(id);
- boolean mUseDaylightTime = tz.useDaylightTime();
- int mOffset = tz.getOffset(mTime);
- int p = Math.abs(mOffset);
- StringBuilder name = new StringBuilder();
- name.append("GMT");
-
- if (mOffset < 0) {
- name.append('-');
- } else {
- name.append('+');
- }
-
- name.append(p / (DateUtils.HOUR_IN_MILLIS));
- name.append(':');
-
- int min = p / 60000;
- min %= 60;
-
- if (min < 10) {
- name.append('0');
- }
- name.append(min);
- name.insert(0, "(");
- name.append(") ");
- name.append(displayName);
- if (mUseDaylightTime && SHOW_DAYLIGHT_SAVINGS_INDICATOR) {
- name.append(" \u2600"); // Sun symbol
- }
- return name.toString();
- }
}
diff --git a/src/com/android/deskclock/Utils.java b/src/com/android/deskclock/Utils.java
index fcc2c7f..ff05d26 100644
--- a/src/com/android/deskclock/Utils.java
+++ b/src/com/android/deskclock/Utils.java
@@ -20,11 +20,14 @@
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.TimeInterpolator;
+import android.app.AlarmManager;
+import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
@@ -44,8 +47,12 @@
import com.android.deskclock.stopwatch.Stopwatches;
import com.android.deskclock.timer.Timers;
+import com.android.deskclock.worldclock.CityObj;
+import java.text.Collator;
+import java.util.Arrays;
import java.util.Calendar;
+import java.util.Comparator;
import java.util.Locale;
@@ -308,7 +315,7 @@
}
/** Setup to find out when the quarter-hour changes (e.g. Kathmandu is GMT+5:45) **/
- public static long getAlarmOnQuarterHour() {
+ private static long getAlarmOnQuarterHour() {
Calendar nextQuarter = Calendar.getInstance();
// Set 1 second to ensure quarter-hour threshold passed.
nextQuarter.set(Calendar.SECOND, 1);
@@ -322,6 +329,33 @@
return alarmOnQuarterHour;
}
+ /** Setup alarm refresh when the quarter-hour changes **/
+ public static PendingIntent startAlarmOnQuarterHour(Context context) {
+ if (context != null) {
+ PendingIntent quarterlyIntent = PendingIntent.getBroadcast(
+ context, 0, new Intent(Utils.ACTION_ON_QUARTER_HOUR), 0);
+ ((AlarmManager) context.getSystemService(Context.ALARM_SERVICE)).setRepeating(
+ AlarmManager.RTC, getAlarmOnQuarterHour(),
+ AlarmManager.INTERVAL_FIFTEEN_MINUTES, quarterlyIntent);
+ return quarterlyIntent;
+ } else {
+ return null;
+ }
+ }
+
+ public static void cancelAlarmOnQuarterHour(Context context, PendingIntent quarterlyIntent) {
+ if (quarterlyIntent != null && context != null) {
+ ((AlarmManager) context.getSystemService(Context.ALARM_SERVICE)).cancel(
+ quarterlyIntent);
+ }
+ }
+
+ public static PendingIntent refreshAlarmOnQuarterHour(
+ Context context, PendingIntent quarterlyIntent) {
+ cancelAlarmOnQuarterHour(context, quarterlyIntent);
+ return startAlarmOnQuarterHour(context);
+ }
+
/**
* For screensavers to set whether the digital or analog clock should be displayed.
* Returns the view to be displayed.
@@ -390,4 +424,34 @@
}
}
+ public static CityObj[] loadCitiesDataBase(Context c) {
+ final Collator collator = Collator.getInstance();
+ Resources r = c.getResources();
+ // Read strings array of name,timezone, id
+ // make sure the list are the same length
+ String[] cities = r.getStringArray(R.array.cities_names);
+ String[] timezones = r.getStringArray(R.array.cities_tz);
+ String[] ids = r.getStringArray(R.array.cities_id);
+ if (cities.length != timezones.length || ids.length != cities.length) {
+ Log.wtf("City lists sizes are not the same, cannot use the data");
+ return null;
+ }
+ CityObj[] tempList = new CityObj[cities.length];
+ for (int i = 0; i < cities.length; i++) {
+ tempList[i] = new CityObj(cities[i], timezones[i], ids[i]);
+ }
+ // Sort alphabetically
+ Arrays.sort(tempList, new Comparator<CityObj> () {
+ @Override
+ public int compare(CityObj c1, CityObj c2) {
+ Comparator<CityObj> mCollator;
+ return collator.compare(c1.mCityName, c2.mCityName);
+ }
+ });
+ return tempList;
+ }
+
+ public static String getCityName(CityObj city, CityObj dbCity) {
+ return (city.mCityId == null || dbCity == null) ? city.mCityName : dbCity.mCityName;
+ }
}
diff --git a/src/com/android/deskclock/stopwatch/StopwatchFragment.java b/src/com/android/deskclock/stopwatch/StopwatchFragment.java
index b751cc0..6a8aa51 100644
--- a/src/com/android/deskclock/stopwatch/StopwatchFragment.java
+++ b/src/com/android/deskclock/stopwatch/StopwatchFragment.java
@@ -9,7 +9,10 @@
import android.content.pm.ResolveInfo;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
+import android.os.PowerManager;
+import android.os.PowerManager.WakeLock;
import android.preference.PreferenceManager;
+import android.text.format.DateUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -17,7 +20,6 @@
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
-import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.ListPopupWindow;
@@ -28,7 +30,6 @@
import com.android.deskclock.CircleButtonsLinearLayout;
import com.android.deskclock.CircleTimerView;
import com.android.deskclock.DeskClock;
-import com.android.deskclock.DeskClock.OnTapListener;
import com.android.deskclock.DeskClockFragment;
import com.android.deskclock.Log;
import com.android.deskclock.R;
@@ -38,10 +39,10 @@
import java.util.ArrayList;
import java.util.List;
-/**
- * TODO: Insert description here. (generated by isaackatz)
- */
-public class StopwatchFragment extends DeskClockFragment implements OnSharedPreferenceChangeListener{
+public class StopwatchFragment extends DeskClockFragment
+ implements OnSharedPreferenceChangeListener {
+
+ private static final String TAG = "StopwatchFragment";
int mState = Stopwatches.STOPWATCH_RESET;
// Stopwatch views that are accessed by the activity
@@ -52,6 +53,7 @@
private ListView mLapsList;
private ImageButton mShareButton;
private ListPopupWindow mSharePopup;
+ private WakeLock mWakeLock;
// Used for calculating the time from the start taking into account the pause times
long mStartTime = 0;
@@ -78,10 +80,26 @@
ArrayList<Lap> mLaps = new ArrayList<Lap>();
private final LayoutInflater mInflater;
private final int mBackgroundColor;
+ private final String[] mFormats;
+ private final String[] mLapFormatSet;
+ // Size of this array must match the size of formats
+ private final long[] mThresholds = {
+ 10 * DateUtils.MINUTE_IN_MILLIS, // < 10 minutes
+ DateUtils.HOUR_IN_MILLIS, // < 1 hour
+ 10 * DateUtils.HOUR_IN_MILLIS, // < 10 hours
+ 100 * DateUtils.HOUR_IN_MILLIS, // < 100 hours
+ 1000 * DateUtils.HOUR_IN_MILLIS // < 1000 hours
+ };
+ private int mLapIndex = 0;
+ private int mTotalIndex = 0;
+ private String mLapFormat;
public LapsListAdapter(Context context) {
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mBackgroundColor = getResources().getColor(R.color.blackish);
+ mFormats = context.getResources().getStringArray(R.array.stopwatch_format_set);
+ mLapFormatSet = context.getResources().getStringArray(R.array.sw_lap_number_set);
+ updateLapFormat();
}
@Override
@@ -103,10 +121,11 @@
TextView count = (TextView)lapInfo.findViewById(R.id.lap_number);
TextView lapTime = (TextView)lapInfo.findViewById(R.id.lap_time);
TextView toalTime = (TextView)lapInfo.findViewById(R.id.lap_total);
- lapTime.setText(Stopwatches.getTimeText(mLaps.get(position).mLapTime));
- toalTime.setText(Stopwatches.getTimeText(mLaps.get(position).mTotalTime));
- count.setText(getString(R.string.sw_notification_lap_number, mLaps.size() - position)
- .toUpperCase());
+ lapTime.setText(Stopwatches.formatTimeText(mLaps.get(position).mLapTime,
+ mFormats[mLapIndex]));
+ toalTime.setText(Stopwatches.formatTimeText(mLaps.get(position).mTotalTime,
+ mFormats[mTotalIndex]));
+ count.setText(String.format(mLapFormat, mLaps.size() - position).toUpperCase());
lapInfo.setBackgroundColor(mBackgroundColor);
return lapInfo;
@@ -125,13 +144,38 @@
return mLaps.get(position);
}
+ private void updateLapFormat() {
+ // Note Stopwatches.MAX_LAPS < 100
+ mLapFormat = mLapFormatSet[mLaps.size() < 10 ? 0 : 1];
+ }
+
+ private void resetTimeFormats() {
+ mLapIndex = mTotalIndex = 0;
+ }
+
+ public boolean updateTimeFormats(Lap lap) {
+ boolean formatChanged = false;
+ while (mLapIndex + 1 < mThresholds.length && lap.mLapTime >= mThresholds[mLapIndex]) {
+ mLapIndex++;
+ formatChanged = true;
+ }
+ while (mTotalIndex + 1 < mThresholds.length &&
+ lap.mTotalTime >= mThresholds[mTotalIndex]) {
+ mTotalIndex++;
+ formatChanged = true;
+ }
+ return formatChanged;
+ }
+
public void addLap(Lap l) {
mLaps.add(0, l);
- notifyDataSetChanged();
+ // for efficiency caller also calls notifyDataSetChanged()
}
public void clearLaps() {
mLaps.clear();
+ updateLapFormat();
+ resetTimeFormats();
notifyDataSetChanged();
}
@@ -163,7 +207,9 @@
for (int i = size -1; i >= 0; i --) {
totalTime += laps[i];
mLaps.get(i).mTotalTime = totalTime;
+ updateTimeFormats(mLaps.get(i));
}
+ updateLapFormat();
notifyDataSetChanged();
}
}
@@ -185,7 +231,6 @@
Intent intent = new Intent(context, StopwatchService.class);
intent.putExtra(Stopwatches.MESSAGE_TIME, time);
intent.putExtra(Stopwatches.SHOW_NOTIF, false);
- buttonClicked(true);
switch (mState) {
case Stopwatches.STOPWATCH_RUNNING:
// do stop
@@ -194,6 +239,7 @@
doStop();
intent.setAction(Stopwatches.STOP_STOPWATCH);
context.startService(intent);
+ releaseWakeLock();
break;
case Stopwatches.STOPWATCH_RESET:
case Stopwatches.STOPWATCH_STOPPED:
@@ -201,6 +247,7 @@
doStart(time);
intent.setAction(Stopwatches.START_STOPWATCH);
context.startService(intent);
+ acquireWakeLock();
break;
default:
Log.wtf("Illegal state " + mState
@@ -224,7 +271,6 @@
Intent intent = new Intent(context, StopwatchService.class);
intent.putExtra(Stopwatches.MESSAGE_TIME, time);
intent.putExtra(Stopwatches.SHOW_NOTIF, false);
- buttonClicked(true);
switch (mState) {
case Stopwatches.STOPWATCH_RUNNING:
// Save lap time
@@ -238,6 +284,7 @@
doReset();
intent.setAction(Stopwatches.RESET_STOPWATCH);
context.startService(intent);
+ releaseWakeLock();
break;
default:
Log.wtf("Illegal state " + mState
@@ -300,12 +347,13 @@
setButtons(mState);
mTimeText.setTime(mAccumulatedTime, true, true);
if (mState == Stopwatches.STOPWATCH_RUNNING) {
+ acquireWakeLock();
startUpdateThread();
} else if (mState == Stopwatches.STOPWATCH_STOPPED && mAccumulatedTime != 0) {
mTimeText.blinkTimeStr(true);
}
showLaps();
-
+ ((DeskClock)getActivity()).registerPageChangedListener(this);
super.onResume();
}
@@ -325,10 +373,20 @@
mSharePopup.dismiss();
mSharePopup = null;
}
-
+ ((DeskClock)getActivity()).unregisterPageChangedListener(this);
+ releaseWakeLock();
super.onPause();
}
+ @Override
+ public void onPageChanged(int page) {
+ if (page == DeskClock.STOPWATCH_TAB_INDEX && mState == Stopwatches.STOPWATCH_RUNNING) {
+ acquireWakeLock();
+ } else {
+ releaseWakeLock();
+ }
+ }
+
private void doStop() {
stopUpdateThread();
mTime.pauseIntervalAnimation();
@@ -555,15 +613,18 @@
long curTime = time - mStartTime + mAccumulatedTime;
if (size == 0) {
// Always show the ending lap and a new one
- mLapsAdapter.addLap(new Lap(curTime, curTime));
+ Lap firstLap = new Lap(curTime, curTime);
+ mLapsAdapter.addLap(firstLap);
mLapsAdapter.addLap(new Lap(0, curTime));
mTime.setIntervalTime(curTime);
+ mLapsAdapter.updateTimeFormats(firstLap);
} else {
long lapTime = curTime - ((Lap) mLapsAdapter.getItem(1)).mTotalTime;
((Lap)mLapsAdapter.getItem(0)).mLapTime = lapTime;
((Lap)mLapsAdapter.getItem(0)).mTotalTime = curTime;
mLapsAdapter.addLap(new Lap(0, 0));
mTime.setMarkerTime(lapTime);
+ mLapsAdapter.updateLapFormat();
// mTime.setIntervalTime(lapTime * 10);
}
mLapsAdapter.notifyDataSetChanged();
@@ -743,4 +804,24 @@
}
}
}
+
+ // Used to keeps screen on when stopwatch is running.
+
+ private void acquireWakeLock() {
+ if (mWakeLock == null) {
+ final PowerManager pm =
+ (PowerManager) getActivity().getSystemService(Context.POWER_SERVICE);
+ mWakeLock = pm.newWakeLock(
+ PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.ON_AFTER_RELEASE, TAG);
+ mWakeLock.setReferenceCounted(false);
+ }
+ mWakeLock.acquire();
+ }
+
+ private void releaseWakeLock() {
+ if (mWakeLock != null && mWakeLock.isHeld()) {
+ mWakeLock.release();
+ }
+ }
+
}
diff --git a/src/com/android/deskclock/stopwatch/Stopwatches.java b/src/com/android/deskclock/stopwatch/Stopwatches.java
index d8d0741..94af594 100644
--- a/src/com/android/deskclock/stopwatch/Stopwatches.java
+++ b/src/com/android/deskclock/stopwatch/Stopwatches.java
@@ -19,7 +19,6 @@
import android.content.Context;
import com.android.deskclock.R;
-import com.android.deskclock.stopwatch.StopwatchFragment.Lap;
public class Stopwatches {
// Private actions processed by the receiver
@@ -107,4 +106,23 @@
return timeStr;
}
+ /***
+ * Sets the string of the time running on the stopwatch up to hundred of a second accuracy
+ * @param time - in hundreds of a second since the stopwatch started
+ */
+ public static String formatTimeText(long time, final String format) {
+ if (time < 0) {
+ time = 0;
+ }
+ long hundreds, seconds, minutes, hours;
+ seconds = time / 1000;
+ hundreds = (time - seconds * 1000) / 10;
+ minutes = seconds / 60;
+ seconds = seconds - minutes * 60;
+ hours = minutes / 60;
+ minutes = minutes - hours * 60;
+ String timeStr = String.format(format, hours, minutes, seconds, hundreds);
+ return timeStr;
+ }
+
}
diff --git a/src/com/android/deskclock/timer/CountingTimerView.java b/src/com/android/deskclock/timer/CountingTimerView.java
index 14b4afa..417e9b1 100644
--- a/src/com/android/deskclock/timer/CountingTimerView.java
+++ b/src/com/android/deskclock/timer/CountingTimerView.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,13 +21,14 @@
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Typeface;
+import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.accessibility.AccessibilityManager;
import android.widget.TextView;
-import com.android.deskclock.DeskClock;
+import com.android.deskclock.Log;
import com.android.deskclock.R;
import com.android.deskclock.Utils;
@@ -42,17 +43,19 @@
// vertically center.
private static final float FONT_VERTICAL_OFFSET = 0.14f;
- private String mHours, mMinutes, mSeconds, mHunderdths;
- private final String mHoursLabel, mMinutesLabel, mSecondsLabel;
- private float mHoursWidth, mMinutesWidth, mSecondsWidth, mHundredthsWidth;
- private float mHoursLabelWidth, mMinutesLabelWidth, mSecondsLabelWidth, mHundredthsSepWidth;
+ private String mHours, mMinutes, mSeconds, mHundredths;
private boolean mShowTimeStr = true;
- private final Typeface mAndroidClockMonoThin, mAndroidClockMonoBold, mRobotoLabel, mAndroidClockMonoLight;
+ private final Typeface mAndroidClockMonoThin, mAndroidClockMonoBold, mAndroidClockMonoLight;
+ private final Typeface mRobotoLabel;
private final Paint mPaintBig = new Paint();
private final Paint mPaintBigThin = new Paint();
private final Paint mPaintMed = new Paint();
private final Paint mPaintLabel = new Paint();
+ private final float mBigFontSize, mSmallFontSize;
+ private SignedTime mBigHours, mBigMinutes;
+ private UnsignedTime mBigThinSeconds;
+ private Hundredths mMedHundredths;
private float mTextHeight = 0;
private float mTotalTextWidth;
private static final String HUNDREDTH_SEPERATOR = ".";
@@ -80,6 +83,151 @@
};
+ class UnsignedTime {
+ protected Paint mPaint;
+ protected float mEm;
+ protected float mWidth = 0;
+ private String mWidest;
+ protected String mLabel;
+ private float mLabelWidth = 0;
+
+ public UnsignedTime(Paint paint, final String label, String allDigits) {
+ mPaint = paint;
+ mLabel = label;
+
+ if (TextUtils.isEmpty(allDigits)) {
+ Log.wtf("Locale digits missing - using English");
+ allDigits = "0123456789";
+ }
+
+ float widths[] = new float[allDigits.length()];
+ int ll = mPaint.getTextWidths(allDigits, widths);
+ int largest = 0;
+ for (int ii = 1; ii < ll; ii++) {
+ if (widths[ii] > widths[largest]) {
+ largest = ii;
+ }
+ }
+
+ mEm = widths[largest];
+ mWidest = allDigits.substring(largest, largest + 1);
+ }
+
+ public UnsignedTime(UnsignedTime unsignedTime, final String label) {
+ this.mPaint = unsignedTime.mPaint;
+ this.mEm = unsignedTime.mEm;
+ this.mWidth = unsignedTime.mWidth;
+ this.mWidest = unsignedTime.mWidest;
+ this.mLabel = label;
+ }
+
+ protected void updateWidth(final String time) {
+ mEm = mPaint.measureText(mWidest);
+ mLabelWidth = mLabel == null ? 0 : mPaintLabel.measureText(mLabel);
+ mWidth = time.length() * mEm;
+ }
+
+ protected void resetWidth() {
+ mWidth = mLabelWidth = 0;
+ }
+
+ public float calcTotalWidth(final String time) {
+ if (time != null) {
+ updateWidth(time);
+ return mWidth + mLabelWidth;
+ } else {
+ resetWidth();
+ return 0;
+ }
+ }
+
+ public float getWidth() {
+ return mWidth;
+ }
+
+ public float getLabelWidth() {
+ return mLabelWidth;
+ }
+
+ protected float drawTime(Canvas canvas, final String time, int ii, float x, float y) {
+ float textEm = mEm / 2f;
+ while (ii < time.length()) {
+ x += textEm;
+ canvas.drawText(time.substring(ii, ii + 1), x, y, mPaint);
+ x += textEm;
+ ii++;
+ }
+ return x;
+ }
+
+ public float draw(Canvas canvas, final String time, float x, float y, float yLabel) {
+ x = drawTime(canvas, time, 0, x, y);
+ if (mLabel != null ) {
+ canvas.drawText(mLabel, x, yLabel, mPaintLabel);
+ }
+ return x + getLabelWidth();
+ }
+ }
+
+ class Hundredths extends UnsignedTime {
+ public Hundredths(Paint paint, final String label, final String allDigits) {
+ super(paint, label, allDigits);
+ }
+
+ @Override
+ public float draw(Canvas canvas, final String time, float x, float y, float yLabel) {
+ if (mLabel != null) {
+ canvas.drawText(mLabel, x, yLabel, mPaintLabel);
+ }
+ return drawTime(canvas, time, 0, x + getLabelWidth(), y);
+ }
+ }
+
+ class SignedTime extends UnsignedTime {
+ private float mMinusWidth = 0;
+
+ public SignedTime(Paint paint, final String label, final String allDigits) {
+ super(paint, label, allDigits);
+ }
+
+ public SignedTime (SignedTime signedTime, final String label) {
+ super(signedTime, label);
+ }
+
+ @Override
+ protected void updateWidth(final String time) {
+ super.updateWidth(time);
+ if (time.contains("-")) {
+ mMinusWidth = mPaint.measureText("-");
+ mWidth += (mMinusWidth - mEm);
+ } else {
+ mMinusWidth = 0;
+ }
+ }
+
+ @Override
+ protected void resetWidth() {
+ super.resetWidth();
+ mMinusWidth = 0;
+ }
+
+ @Override
+ public float draw(Canvas canvas, final String time, float x, float y, float yLabel) {
+ int ii = 0;
+ if (mMinusWidth != 0f) {
+ float minusWidth = mMinusWidth / 2;
+ x += minusWidth;
+ canvas.drawText(time.substring(ii, ii + 1), x, y, mPaint);
+ x += minusWidth;
+ ii++;
+ }
+ x = drawTime(canvas, time, ii, x, y);
+ if (mLabel != null) {
+ canvas.drawText(mLabel, x, yLabel, mPaintLabel);
+ }
+ return x + getLabelWidth();
+ }
+ }
public CountingTimerView(Context context) {
this(context, null);
@@ -87,16 +235,16 @@
public CountingTimerView(Context context, AttributeSet attrs) {
super(context, attrs);
- mAndroidClockMonoThin = Typeface.createFromAsset(context.getAssets(),"fonts/AndroidClockMono-Thin.ttf");
- mAndroidClockMonoBold = Typeface.createFromAsset(context.getAssets(),"fonts/AndroidClockMono-Bold.ttf");
- mAndroidClockMonoLight = Typeface.createFromAsset(context.getAssets(),"fonts/AndroidClockMono-Light.ttf");
+ mAndroidClockMonoThin = Typeface.createFromAsset(
+ context.getAssets(), "fonts/AndroidClockMono-Thin.ttf");
+ mAndroidClockMonoBold = Typeface.createFromAsset(
+ context.getAssets(), "fonts/AndroidClockMono-Bold.ttf");
+ mAndroidClockMonoLight = Typeface.createFromAsset(
+ context.getAssets(), "fonts/AndroidClockMono-Light.ttf");
mAccessibilityManager =
(AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
mRobotoLabel= Typeface.create("sans-serif-condensed", Typeface.BOLD);
Resources r = context.getResources();
- mHoursLabel = r.getString(R.string.hours_label).toUpperCase();
- mMinutesLabel = r.getString(R.string.minutes_label).toUpperCase();
- mSecondsLabel = r.getString(R.string.seconds_label).toUpperCase();
mWhiteColor = r.getColor(R.color.clock_white);
mDefaultColor = mWhiteColor;
mPressedColor = r.getColor(Utils.getPressedColorId());
@@ -104,23 +252,20 @@
mPaintBig.setAntiAlias(true);
mPaintBig.setStyle(Paint.Style.STROKE);
- mPaintBig.setTextAlign(Paint.Align.LEFT);
+ mPaintBig.setTextAlign(Paint.Align.CENTER);
mPaintBig.setTypeface(mAndroidClockMonoBold);
- float bigFontSize = r.getDimension(R.dimen.big_font_size);
- mPaintBig.setTextSize(bigFontSize);
- mTextHeight = bigFontSize;
+ mBigFontSize = r.getDimension(R.dimen.big_font_size);
+ mSmallFontSize = r.getDimension(R.dimen.small_font_size);
mPaintBigThin.setAntiAlias(true);
mPaintBigThin.setStyle(Paint.Style.STROKE);
- mPaintBigThin.setTextAlign(Paint.Align.LEFT);
+ mPaintBigThin.setTextAlign(Paint.Align.CENTER);
mPaintBigThin.setTypeface(mAndroidClockMonoThin);
- mPaintBigThin.setTextSize(r.getDimension(R.dimen.big_font_size));
mPaintMed.setAntiAlias(true);
mPaintMed.setStyle(Paint.Style.STROKE);
- mPaintMed.setTextAlign(Paint.Align.LEFT);
+ mPaintMed.setTextAlign(Paint.Align.CENTER);
mPaintMed.setTypeface(mAndroidClockMonoLight);
- mPaintMed.setTextSize(r.getDimension(R.dimen.small_font_size));
mPaintLabel.setAntiAlias(true);
mPaintLabel.setStyle(Paint.Style.STROKE);
@@ -128,7 +273,25 @@
mPaintLabel.setTypeface(mRobotoLabel);
mPaintLabel.setTextSize(r.getDimension(R.dimen.label_font_size));
+ resetTextSize();
setTextColor(mDefaultColor);
+
+ // allDigits will contain ten digits: "0123456789" in the default locale
+ final String allDigits = String.format("%010d", 123456789);
+ mBigHours = new SignedTime(mPaintBig,
+ r.getString(R.string.hours_label).toUpperCase(), allDigits);
+ mBigMinutes = new SignedTime(mBigHours,
+ r.getString(R.string.minutes_label).toUpperCase());
+ mBigThinSeconds = new UnsignedTime(mPaintBigThin,
+ r.getString(R.string.seconds_label).toUpperCase(), allDigits);
+ mMedHundredths = new Hundredths(mPaintMed, HUNDREDTH_SEPERATOR, allDigits);
+ }
+
+ protected void resetTextSize() {
+ mPaintBig.setTextSize(mBigFontSize);
+ mTextHeight = mBigFontSize;
+ mPaintBigThin.setTextSize(mBigFontSize);
+ mPaintMed.setTextSize(mSmallFontSize);
}
protected void setTextColor(int textColor) {
@@ -152,7 +315,7 @@
seconds = seconds - minutes * 60;
hours = minutes / 60;
minutes = minutes - hours * 60;
- if (hours > 99) {
+ if (hours > 999) {
hours = 0;
}
// time may less than a second below zero, since we do not show fractions of seconds
@@ -160,7 +323,7 @@
if (hours ==0 && minutes == 0 && seconds == 0) {
showNeg = false;
}
- // TODO: must build to account for localization
+
if (!showHundredths) {
if (!neg && hundreds != 0) {
seconds++;
@@ -178,6 +341,8 @@
}
}
+ int oldLength = getDigitsLength();
+
if (hours >= 10) {
format = showNeg ? NEG_TWO_DIGITS : TWO_DIGITS;
mHours = String.format(format, hours);
@@ -198,11 +363,18 @@
mSeconds = String.format(TWO_DIGITS, seconds);
if (showHundredths) {
- mHunderdths = String.format(TWO_DIGITS, hundreds);
+ mHundredths = String.format(TWO_DIGITS, hundreds);
} else {
- mHunderdths = null;
+ mHundredths = null;
}
- mRemeasureText = true;
+
+ int newLength = getDigitsLength();
+ if (oldLength != newLength) {
+ if (oldLength > newLength) {
+ resetTextSize();
+ }
+ mRemeasureText = true;
+ }
if (update) {
setContentDescription(getTimeStringForAccessibility((int) hours, (int) minutes,
@@ -210,56 +382,47 @@
invalidate();
}
}
- private void setTotalTextWidth() {
- mTotalTextWidth = 0;
- if (mHours != null) {
- mHoursWidth = mPaintBig.measureText(mHours);
- mTotalTextWidth += mHoursWidth;
- mHoursLabelWidth = mPaintLabel.measureText(mHoursLabel);
- mTotalTextWidth += mHoursLabelWidth;
- }
- if (mMinutes != null) {
- mMinutesWidth = mPaintBig.measureText(mMinutes);
- mTotalTextWidth += mMinutesWidth;
- mMinutesLabelWidth = mPaintLabel.measureText(mMinutesLabel);
- mTotalTextWidth += mMinutesLabelWidth;
- }
- if (mSeconds != null) {
- mSecondsWidth = mPaintBigThin.measureText(mSeconds);
- mTotalTextWidth += mSecondsWidth;
- mSecondsLabelWidth = mPaintLabel.measureText(mSecondsLabel);
- mTotalTextWidth += mSecondsLabelWidth;
- }
- if (mHunderdths != null) {
- mHundredthsWidth = mPaintMed.measureText(mHunderdths);
- mTotalTextWidth += mHundredthsWidth;
- mHundredthsSepWidth = mPaintLabel.measureText(HUNDREDTH_SEPERATOR);
- mTotalTextWidth += mHundredthsSepWidth;
- }
- // This is a hack: if the text is too wide, reduce all the paint text sizes
+ private int getDigitsLength() {
+ return ((mHours == null) ? 0 : mHours.length())
+ + ((mMinutes == null) ? 0 : mMinutes.length())
+ + ((mSeconds == null) ? 0 : mSeconds.length())
+ + ((mHundredths == null) ? 0 : mHundredths.length());
+ }
+
+ private void calcTotalTextWidth() {
+ mTotalTextWidth = mBigHours.calcTotalWidth(mHours) + mBigMinutes.calcTotalWidth(mMinutes)
+ + mBigThinSeconds.calcTotalWidth(mSeconds)
+ + mMedHundredths.calcTotalWidth(mHundredths);
+ }
+
+ private void setTotalTextWidth() {
+ calcTotalTextWidth();
// To determine the maximum width, we find the minimum of the height and width (since the
// circle we are trying to fit the text into has its radius sized to the smaller of the
// two.
int width = Math.min(getWidth(), getHeight());
if (width != 0) {
- float ratio = mTotalTextWidth / width;
- if (ratio > TEXT_SIZE_TO_WIDTH_RATIO) {
- float sizeRatio = (TEXT_SIZE_TO_WIDTH_RATIO / ratio);
- mPaintBig.setTextSize( mPaintBig.getTextSize() * sizeRatio);
- mPaintBigThin.setTextSize( mPaintBigThin.getTextSize() * sizeRatio);
- mPaintMed.setTextSize( mPaintMed.getTextSize() * sizeRatio);
- mTotalTextWidth *= sizeRatio;
- mMinutesWidth *= sizeRatio;
- mHoursWidth *= sizeRatio;
- mSecondsWidth *= sizeRatio;
- mHundredthsWidth *= sizeRatio;
- mHundredthsSepWidth *= sizeRatio;
+ float wantWidth = (int)(TEXT_SIZE_TO_WIDTH_RATIO * width);
+ // If the text is too wide, reduce all the paint text sizes
+ while (mTotalTextWidth > wantWidth) {
+ // Get fixed and variant parts of the total size
+ float fixedWidths = mBigHours.getLabelWidth() + mBigMinutes.getLabelWidth()
+ + mBigThinSeconds.getLabelWidth() + mMedHundredths.getLabelWidth();
+ float varWidths = mBigHours.getWidth() + mBigMinutes.getWidth()
+ + mBigThinSeconds.getWidth() + mMedHundredths.getWidth();
+ // Avoid divide by zero || sizeRatio == 1 || sizeRatio <= 0
+ if (varWidths == 0 || fixedWidths == 0 || fixedWidths >= wantWidth) {
+ break;
+ }
+ // Variant-section reduction
+ float sizeRatio = (wantWidth - fixedWidths) / varWidths;
+ mPaintBig.setTextSize(mPaintBig.getTextSize() * sizeRatio);
+ mPaintBigThin.setTextSize(mPaintBigThin.getTextSize() * sizeRatio);
+ mPaintMed.setTextSize(mPaintMed.getTextSize() * sizeRatio);
//recalculate the new total text width and half text height
- mTotalTextWidth = mHoursWidth + mMinutesWidth + mSecondsWidth +
- mHundredthsWidth + mHundredthsSepWidth + mHoursLabelWidth +
- mMinutesLabelWidth + mSecondsLabelWidth;
mTextHeight = mPaintBig.getTextSize();
+ calcTotalTextWidth();
}
}
}
@@ -277,7 +440,6 @@
public void showTime(boolean visible) {
mShowTimeStr = visible;
invalidate();
- mRemeasureText = true;
}
public void redTimeStr(boolean red, boolean forceUpdate) {
@@ -289,10 +451,17 @@
}
public String getTimeString() {
- if (mHours == null) {
- return String.format("%s:%s.%s",mMinutes, mSeconds, mHunderdths);
+ // Though only called from Stopwatch Share, so hundredth are never null,
+ // protect the future and check for null mHundredths
+ if (mHundredths == null) {
+ if (mHours == null) {
+ return String.format("%s:%s", mMinutes, mSeconds);
+ }
+ return String.format("%s:%s:%s", mHours, mMinutes, mSeconds);
+ } else if (mHours == null) {
+ return String.format("%s:%s.%s", mMinutes, mSeconds, mHundredths);
}
- return String.format("%s:%s:%s.%s",mHours, mMinutes, mSeconds, mHunderdths);
+ return String.format("%s:%s:%s.%s", mHours, mMinutes, mSeconds, mHundredths);
}
private static String getTimeStringForAccessibility(int hours, int minutes, int seconds,
@@ -434,27 +603,18 @@
mPaintMed.setColor(textColor);
if (mHours != null) {
- canvas.drawText(mHours, textXstart, textYstart, mPaintBig);
- textXstart += mHoursWidth;
- canvas.drawText(mHoursLabel, textXstart, labelYStart, mPaintLabel);
- textXstart += mHoursLabelWidth;
+ textXstart = mBigHours.draw(canvas, mHours, textXstart, textYstart, labelYStart);
}
if (mMinutes != null) {
- canvas.drawText(mMinutes, textXstart, textYstart, mPaintBig);
- textXstart += mMinutesWidth;
- canvas.drawText(mMinutesLabel, textXstart, labelYStart, mPaintLabel);
- textXstart += mMinutesLabelWidth;
+ textXstart = mBigMinutes.draw(canvas, mMinutes, textXstart, textYstart, labelYStart);
}
if (mSeconds != null) {
- canvas.drawText(mSeconds, textXstart, textYstart, mPaintBigThin);
- textXstart += mSecondsWidth;
- canvas.drawText(mSecondsLabel, textXstart, labelYStart, mPaintLabel);
- textXstart += mSecondsLabelWidth;
+ textXstart = mBigThinSeconds.draw(canvas, mSeconds,
+ textXstart, textYstart, labelYStart);
}
- if (mHunderdths != null) {
- canvas.drawText(HUNDREDTH_SEPERATOR, textXstart, textYstart, mPaintLabel);
- textXstart += mHundredthsSepWidth;
- canvas.drawText(mHunderdths, textXstart, textYstart, mPaintMed);
+ if (mHundredths != null) {
+ textXstart = mMedHundredths.draw(canvas, mHundredths,
+ textXstart, textYstart, textYstart);
}
}
diff --git a/src/com/android/deskclock/timer/TimerFragment.java b/src/com/android/deskclock/timer/TimerFragment.java
index a2c6de9..b388da3 100644
--- a/src/com/android/deskclock/timer/TimerFragment.java
+++ b/src/com/android/deskclock/timer/TimerFragment.java
@@ -31,10 +31,8 @@
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.LayoutInflater;
-import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
-import android.view.View.OnTouchListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.animation.AccelerateInterpolator;
@@ -43,18 +41,17 @@
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageButton;
-import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
-import com.android.deskclock.DeskClock;
import com.android.deskclock.CircleButtonsLinearLayout;
+import com.android.deskclock.DeskClock;
+import com.android.deskclock.DeskClock.OnTapListener;
import com.android.deskclock.DeskClockFragment;
import com.android.deskclock.LabelDialogFragment;
import com.android.deskclock.R;
import com.android.deskclock.TimerSetupView;
import com.android.deskclock.Utils;
-import com.android.deskclock.DeskClock.OnTapListener;
import java.util.ArrayList;
import java.util.Collections;
@@ -117,13 +114,11 @@
class TimersListAdapter extends BaseAdapter {
ArrayList<TimerObj> mTimers = new ArrayList<TimerObj> ();
- private final LayoutInflater mInflater;
Context mContext;
SharedPreferences mmPrefs;
public TimersListAdapter(Context context, SharedPreferences prefs) {
mContext = context;
- mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mmPrefs = prefs;
}
@@ -148,11 +143,11 @@
public void deleteTimer(int id) {
for (int i = 0; i < mTimers.size(); i++) {
TimerObj t = mTimers.get(i);
-
+
if (t.mTimerId == id) {
- if(t.mView != null) {
- ((TimerListItem)t.mView).stop();
- }
+ if (t.mView != null) {
+ ((TimerListItem) t.mView).stop();
+ }
t.deleteFromSharedPref(mmPrefs);
mTimers.remove(i);
notifyDataSetChanged();
@@ -259,7 +254,7 @@
public void addTimer(TimerObj t) {
mTimers.add(0, t);
- notifyDataSetChanged();
+ sort();
}
public void onSaveInstanceState(Bundle outState) {
@@ -268,12 +263,50 @@
public void onRestoreInstanceState(Bundle outState) {
TimerObj.getTimersFromSharedPrefs(mmPrefs, mTimers);
- notifyDataSetChanged();
+ sort();
}
public void saveGlobalState() {
TimerObj.putTimersInSharedPrefs(mmPrefs, mTimers);
}
+
+ public void sort() {
+ if (getCount() > 0) {
+ Collections.sort(mTimers, mTimersCompare);
+ notifyDataSetChanged();
+ }
+ }
+
+ private final Comparator<TimerObj> mTimersCompare = new Comparator<TimerObj>() {
+ static final int BUZZING = 0;
+ static final int IN_USE = 1;
+ static final int NOT_USED = 2;
+
+ protected int getSection(TimerObj timerObj) {
+ switch (timerObj.mState) {
+ case TimerObj.STATE_TIMESUP:
+ return BUZZING;
+ case TimerObj.STATE_RUNNING:
+ case TimerObj.STATE_STOPPED:
+ return IN_USE;
+ default:
+ return NOT_USED;
+ }
+ }
+
+ @Override
+ public int compare(TimerObj o1, TimerObj o2) {
+ int section1 = getSection(o1);
+ int section2 = getSection(o2);
+ if (section1 != section2) {
+ return (section1 < section2) ? -1 : 1;
+ } else if (section1 == BUZZING || section1 == IN_USE) {
+ return (o1.mTimeLeft < o2.mTimeLeft) ? -1 : 1;
+ } else {
+ return (o1.mSetupLength < o2.mSetupLength) ? -1 : 1;
+ }
+ }
+ };
}
class TimesUpListAdapter extends TimersListAdapter {
@@ -305,7 +338,7 @@
Collections.sort(mTimers, new Comparator<TimerObj>() {
@Override
public int compare(TimerObj o1, TimerObj o2) {
- return (int)(o1.mTimeLeft - o2.mTimeLeft);
+ return (o1.mTimeLeft < o2.mTimeLeft) ? -1 : 1;
}
});
}
@@ -431,6 +464,7 @@
mAdapter.addTimer(t);
updateTimersState(t, Timers.START_TIMER);
gotoTimersView();
+ mTimersList.setSelection(mAdapter.findTimerPositionById(t.mTimerId));
}
});
@@ -462,6 +496,9 @@
@Override
public void onResume() {
+ if (getActivity() instanceof DeskClock) {
+ ((DeskClock)getActivity()).registerPageChangedListener(this);
+ }
super.onResume();
mPrefs.registerOnSharedPreferenceChangeListener(this);
@@ -502,6 +539,9 @@
@Override
public void onPause() {
+ if (getActivity() instanceof DeskClock) {
+ ((DeskClock)getActivity()).unregisterPageChangedListener(this);
+ }
super.onPause();
stopClockTicks();
if (mAdapter != null) {
@@ -511,6 +551,13 @@
}
@Override
+ public void onPageChanged(int page) {
+ if (page == DeskClock.TIMER_TAB_INDEX && mAdapter != null) {
+ mAdapter.sort();
+ }
+ }
+
+ @Override
public void onSaveInstanceState (Bundle outState) {
super.onSaveInstanceState(outState);
if (mAdapter != null) {
diff --git a/src/com/android/deskclock/timer/TimerObj.java b/src/com/android/deskclock/timer/TimerObj.java
index f8e7794..5f18d9e 100644
--- a/src/com/android/deskclock/timer/TimerObj.java
+++ b/src/com/android/deskclock/timer/TimerObj.java
@@ -265,12 +265,15 @@
}
}
- public static void cleanTimersFromSharedPrefs(SharedPreferences prefs) {
+ public static void resetTimersInSharedPrefs(SharedPreferences prefs) {
ArrayList<TimerObj> timers = new ArrayList<TimerObj>();
getTimersFromSharedPrefs(prefs, timers);
Iterator<TimerObj> i = timers.iterator();
while(i.hasNext()) {
- i.next().deleteFromSharedPref(prefs);
+ TimerObj t = i.next();
+ t.mState = TimerObj.STATE_RESTART;
+ t.mTimeLeft = t. mOriginalLength = t.mSetupLength;
+ t.writeToSharedPref(prefs);
}
}
diff --git a/src/com/android/deskclock/timer/TimerView.java b/src/com/android/deskclock/timer/TimerView.java
index 5ce38ec..310a957 100644
--- a/src/com/android/deskclock/timer/TimerView.java
+++ b/src/com/android/deskclock/timer/TimerView.java
@@ -33,6 +33,7 @@
private ZeroTopPaddingTextView mHoursTens, mMinutesTens;
private TextView mSeconds;
private final Typeface mAndroidClockMonoThin;
+ private Typeface mOriginalHoursTypeface;
private final int mWhiteColor, mGrayColor;
public TimerView(Context context) {
@@ -57,15 +58,8 @@
mHoursOnes = (ZeroTopPaddingTextView)findViewById(R.id.hours_ones);
mMinutesOnes = (ZeroTopPaddingTextView)findViewById(R.id.minutes_ones);
mSeconds = (TextView)findViewById(R.id.seconds);
- // If we have hours tens, we are in the alarm time picker, set the hours font to thin
- // to prevent the need to set the top paddings (see b/7407383).
- if (mHoursTens != null) {
- mHoursTens.setTypeface(mAndroidClockMonoThin);
- mHoursTens.updatePadding();
- if (mHoursOnes != null) {
- mHoursOnes.setTypeface(mAndroidClockMonoThin);
- mHoursOnes.updatePadding();
- }
+ if (mHoursOnes != null) {
+ mOriginalHoursTypeface = mHoursOnes.getTypeface();
}
// Set the lowest time unit with thin font (excluding hundredths)
if (mSeconds != null) {
@@ -91,21 +85,29 @@
mHoursTens.setVisibility(View.INVISIBLE);
} else if (hoursTensDigit == -1) {
mHoursTens.setText("-");
+ mHoursTens.setTypeface(mAndroidClockMonoThin);
mHoursTens.setTextColor(mGrayColor);
+ mHoursTens.updatePadding();
mHoursTens.setVisibility(View.VISIBLE);
} else {
mHoursTens.setText(String.format("%d",hoursTensDigit));
+ mHoursTens.setTypeface(mOriginalHoursTypeface);
mHoursTens.setTextColor(mWhiteColor);
+ mHoursTens.updatePadding();
mHoursTens.setVisibility(View.VISIBLE);
}
}
if (mHoursOnes != null) {
if (hoursOnesDigit == -1) {
mHoursOnes.setText("-");
+ mHoursOnes.setTypeface(mAndroidClockMonoThin);
mHoursOnes.setTextColor(mGrayColor);
+ mHoursOnes.updatePadding();
} else {
mHoursOnes.setText(String.format("%d",hoursOnesDigit));
+ mHoursOnes.setTypeface(mOriginalHoursTypeface);
mHoursOnes.setTextColor(mWhiteColor);
+ mHoursOnes.updatePadding();
}
}
if (mMinutesTens != null) {
diff --git a/src/com/android/deskclock/worldclock/Cities.java b/src/com/android/deskclock/worldclock/Cities.java
index c91eaeb..dbd017d 100644
--- a/src/com/android/deskclock/worldclock/Cities.java
+++ b/src/com/android/deskclock/worldclock/Cities.java
@@ -28,46 +28,45 @@
public static final String WORLDCLOCK_UPDATE_INTENT = "com.android.deskclock.worldclock.update";
private static final String NUMBER_OF_CITIES = "number_of_cities";
-
public static void saveCitiesToSharedPrefs(
SharedPreferences prefs, HashMap<String, CityObj> cities) {
- SharedPreferences.Editor editor = prefs.edit();
- editor.putInt(NUMBER_OF_CITIES, cities.size());
- Collection<CityObj> col = cities.values();
- Iterator<CityObj> i = col.iterator();
- int count = 0;
- while(i.hasNext()) {
- CityObj c = i.next();
- c.saveCityToSharedPrefs(editor, count);
- count ++;
- }
- editor.apply();
+ SharedPreferences.Editor editor = prefs.edit();
+ editor.putInt(NUMBER_OF_CITIES, cities.size());
+ Collection<CityObj> col = cities.values();
+ Iterator<CityObj> i = col.iterator();
+ int count = 0;
+ while (i.hasNext()) {
+ CityObj c = i.next();
+ c.saveCityToSharedPrefs(editor, count);
+ count++;
+ }
+ editor.apply();
}
public static HashMap<String, CityObj> readCitiesFromSharedPrefs(SharedPreferences prefs) {
- int size = prefs.getInt(NUMBER_OF_CITIES, -1);
- HashMap<String, CityObj> c = new HashMap<String, CityObj> ();
- if (size > 0) {
- for (int i = 0; i < size; i++) {
- CityObj o = new CityObj(prefs, i);
- if (o.mCityName != null && o.mTimeZone != null) {
- c.put(o.mCityId, o);
- }
- }
- }
- return c;
- }
-
- private static void dumpCities(SharedPreferences prefs, String title) {
int size = prefs.getInt(NUMBER_OF_CITIES, -1);
- Log.d("Cities","Selected Cities List " + title);
- Log.d("Cities","Number of cities " + size);
- HashMap<String, CityObj> c = new HashMap<String, CityObj> ();
+ HashMap<String, CityObj> c = new HashMap<String, CityObj>();
if (size > 0) {
for (int i = 0; i < size; i++) {
CityObj o = new CityObj(prefs, i);
if (o.mCityName != null && o.mTimeZone != null) {
- Log.d("Cities","Name " + o.mCityName + " tz " + o.mTimeZone);
+ c.put(o.mCityId, o);
+ }
+ }
+ }
+ return c;
+ }
+
+ private static void dumpCities(SharedPreferences prefs, String title) {
+ int size = prefs.getInt(NUMBER_OF_CITIES, -1);
+ Log.d("Cities", "Selected Cities List " + title);
+ Log.d("Cities", "Number of cities " + size);
+ HashMap<String, CityObj> c = new HashMap<String, CityObj>();
+ if (size > 0) {
+ for (int i = 0; i < size; i++) {
+ CityObj o = new CityObj(prefs, i);
+ if (o.mCityName != null && o.mTimeZone != null) {
+ Log.d("Cities", "Name " + o.mCityName + " tz " + o.mTimeZone);
}
}
}
diff --git a/src/com/android/deskclock/worldclock/CitiesActivity.java b/src/com/android/deskclock/worldclock/CitiesActivity.java
index ffabc76..02423b5 100644
--- a/src/com/android/deskclock/worldclock/CitiesActivity.java
+++ b/src/com/android/deskclock/worldclock/CitiesActivity.java
@@ -21,7 +21,6 @@
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
-import android.content.res.Resources;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.text.format.DateFormat;
@@ -40,16 +39,13 @@
import com.android.deskclock.Alarms;
import com.android.deskclock.DeskClock;
-import com.android.deskclock.Log;
import com.android.deskclock.R;
import com.android.deskclock.SettingsActivity;
import com.android.deskclock.Utils;
import java.text.Collator;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Calendar;
-import java.util.Comparator;
import java.util.HashMap;
import java.util.TimeZone;
@@ -68,8 +64,6 @@
private CityAdapter mAdapter;
private HashMap<String, CityObj> mUserSelectedCities;
private Calendar mCalendar;
- private final Collator mCollator = Collator.getInstance();
-
/***
* Adapter for a list of cities with the respected time zone.
@@ -98,12 +92,12 @@
@Override
public int getCount() {
- return mAllTheCitiesList.length;
+ return (mAllTheCitiesList != null) ? mAllTheCitiesList.length : 0;
}
@Override
public Object getItem(int p) {
- if (p >=0 && p < mAllTheCitiesList.length) {
+ if (mAllTheCitiesList != null && p >=0 && p < mAllTheCitiesList.length) {
return mAllTheCitiesList [p];
}
return null;
@@ -116,12 +110,12 @@
@Override
public boolean isEnabled(int p) {
- return ((CityObj)mAllTheCitiesList[p]).mCityId != null;
+ return mAllTheCitiesList != null && ((CityObj)mAllTheCitiesList[p]).mCityId != null;
}
@Override
public View getView(int position, View view, ViewGroup parent) {
- if (position < 0 || position >= mAllTheCitiesList.length) {
+ if (mAllTheCitiesList == null || position < 0 || position >= mAllTheCitiesList.length) {
return null;
}
CityObj c = (CityObj)mAllTheCitiesList [position];
@@ -157,27 +151,10 @@
}
private void loadCitiesDataBase(Context c) {
- Resources r = c.getResources();
- // Read strings array of name,timezone, id
- // make sure the list are the same length
- String [] cities = r.getStringArray(R.array.cities_names);
- String [] timezones = r.getStringArray(R.array.cities_tz);
- String [] ids = r.getStringArray(R.array.cities_id);
- if (cities.length != timezones.length || ids.length != cities.length) {
- Log.wtf("City lists sizes are not the same, cannot use the data");
+ CityObj[] tempList = Utils.loadCitiesDataBase(c);
+ if (tempList == null) {
return;
- }
- CityObj[] tempList = new CityObj [cities.length];
- for (int i = 0; i < cities.length; i++) {
- tempList[i] = new CityObj(cities[i], timezones[i], ids[i]);
- }
- // Sort alphabetically
- Arrays.sort(tempList, new Comparator<CityObj> () {
- @Override
- public int compare(CityObj c1, CityObj c2) {
- return mCollator.compare(c1.mCityName, c2.mCityName);
- }
- });
+ }
//Create section indexer and add headers to the cities list
String val = null;
ArrayList<String> sections = new ArrayList<String> ();
@@ -207,18 +184,21 @@
@Override
public int getPositionForSection(int section) {
- return (Integer) mSectionPositions[section];
+ return (mSectionPositions != null) ? (Integer) mSectionPositions[section] : 0;
}
@Override
public int getSectionForPosition(int p) {
- for (int i = 0; i < mSectionPositions.length - 1; i++) {
- if (p >= (Integer)mSectionPositions[i] && p < (Integer)mSectionPositions[i + 1]) {
- return i;
+ if (mSectionPositions != null) {
+ for (int i = 0; i < mSectionPositions.length - 1; i++) {
+ if (p >= (Integer) mSectionPositions[i]
+ && p < (Integer) mSectionPositions[i + 1]) {
+ return i;
+ }
}
- }
- if (p >= (Integer)mSectionPositions[mSectionPositions.length - 1]) {
- return mSectionPositions.length - 1;
+ if (p >= (Integer)mSectionPositions[mSectionPositions.length - 1]) {
+ return mSectionPositions.length - 1;
+ }
}
return 0;
}
diff --git a/src/com/android/deskclock/worldclock/WorldClockAdapter.java b/src/com/android/deskclock/worldclock/WorldClockAdapter.java
index c76407d..ac94d48 100644
--- a/src/com/android/deskclock/worldclock/WorldClockAdapter.java
+++ b/src/com/android/deskclock/worldclock/WorldClockAdapter.java
@@ -25,30 +25,34 @@
import android.widget.BaseAdapter;
import android.widget.TextView;
+import com.android.deskclock.AnalogClock;
+import com.android.deskclock.DigitalClock;
+import com.android.deskclock.R;
+import com.android.deskclock.SettingsActivity;
+import com.android.deskclock.Utils;
+
import java.text.Collator;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Comparator;
import java.util.Date;
+import java.util.HashMap;
import java.util.Locale;
import java.util.TimeZone;
-import com.android.deskclock.AnalogClock;
-import com.android.deskclock.DigitalClock;
-import com.android.deskclock.R;
-import com.android.deskclock.SettingsActivity;
-
public class WorldClockAdapter extends BaseAdapter {
protected Object [] mCitiesList;
private final LayoutInflater mInflater;
private final Context mContext;
private String mClockStyle;
private final Collator mCollator = Collator.getInstance();
+ protected HashMap<String, CityObj> mCitiesDb = new HashMap<String, CityObj>();
public WorldClockAdapter(Context context) {
super();
mContext = context;
loadData(context);
+ loadCitiesDb(context);
mInflater = LayoutInflater.from(context);
}
@@ -66,6 +70,19 @@
mCitiesList = addHomeCity();
}
+ public void loadCitiesDb(Context context) {
+ mCitiesDb.clear();
+ // Read the cities DB so that the names and timezones will be taken from the DB
+ // and not from the selected list so that change of locale or changes in the DB will
+ // be reflected.
+ CityObj[] cities = Utils.loadCitiesDataBase(context);
+ if (cities != null) {
+ for (int i = 0; i < cities.length; i ++) {
+ mCitiesDb.put(cities[i].mCityId, cities [i]);
+ }
+ }
+ }
+
/***
* Adds the home city as the first item of the adapter if the feature is on and the device time
* zone is different from the home time zone that was set by the user.
@@ -220,11 +237,16 @@
aclock.setVisibility(View.GONE);
dclock.setTimeZone(cityObj.mTimeZone);
}
- name.setText(cityObj.mCityName);
+ CityObj cityInDb = mCitiesDb.get(cityObj.mCityId);
+ // Home city or city not in DB , use data from the save selected cities list
+ name.setText(Utils.getCityName(cityObj, cityInDb));
+
final Calendar now = Calendar.getInstance();
now.setTimeZone(TimeZone.getDefault());
int myDayOfWeek = now.get(Calendar.DAY_OF_WEEK);
- now.setTimeZone(TimeZone.getTimeZone(cityObj.mTimeZone));
+ // Get timezone from cities DB if available
+ String cityTZ = (cityInDb != null) ? cityInDb.mTimeZone : cityObj.mTimeZone;
+ now.setTimeZone(TimeZone.getTimeZone(cityTZ));
int cityDayOfWeek = now.get(Calendar.DAY_OF_WEEK);
if (myDayOfWeek != cityDayOfWeek) {
dayOfWeek.setText(mContext.getString(R.string.world_day_of_week_label,