OSDN Git Service

auto import from //depot/cupcake/@137055
authorThe Android Open Source Project <initial-contribution@android.com>
Tue, 3 Mar 2009 06:54:42 +0000 (22:54 -0800)
committerThe Android Open Source Project <initial-contribution@android.com>
Tue, 3 Mar 2009 06:54:42 +0000 (22:54 -0800)
57 files changed:
res/drawable-finger/album_edges.9.png [deleted file]
res/drawable-finger/album_sheen.png [deleted file]
res/drawable-finger/gadget_background.png [deleted file]
res/drawable-finger/gadget_bg.9.png [new file with mode: 0644]
res/drawable-finger/gadget_button.xml [deleted file]
res/drawable-finger/gadget_inner.9.png [new file with mode: 0644]
res/drawable-finger/gadget_next.xml
res/drawable-finger/gadget_next_focused.png [deleted file]
res/drawable-finger/gadget_next_normal.png
res/drawable-finger/gadget_next_pressed.png
res/drawable-finger/gadget_no_art.png [deleted file]
res/drawable-finger/gadget_pause.xml
res/drawable-finger/gadget_pause_focused.png [deleted file]
res/drawable-finger/gadget_pause_normal.png
res/drawable-finger/gadget_pause_pressed.png
res/drawable-finger/gadget_play.xml
res/drawable-finger/gadget_play_focused.png [deleted file]
res/drawable-finger/gadget_play_normal.png
res/drawable-finger/gadget_play_pressed.png
res/drawable-finger/gadget_prev.xml [deleted file]
res/drawable-finger/gadget_prev_focused.png [deleted file]
res/drawable-finger/gadget_prev_normal.png [deleted file]
res/drawable-finger/gadget_prev_pressed.png [deleted file]
res/drawable-finger/ic_mp_current_playlist_btn.png
res/drawable-finger/ic_mp_partyshuffle_on_btn.png
res/drawable-finger/ic_mp_repeat_all_btn.png
res/drawable-finger/ic_mp_repeat_off_btn.png
res/drawable-finger/ic_mp_repeat_once_btn.png
res/drawable-finger/ic_mp_shuffle_off_btn.png
res/drawable-finger/ic_mp_shuffle_on_btn.png
res/drawable/gadget_progress.xml [deleted file]
res/layout-finger/gadget.xml
res/layout-finger/music_library.xml
res/layout-land-finger/gadget.xml [deleted file]
res/layout-land-finger/music_library.xml
res/values-es/strings.xml
res/values-fr-keysexposed/strings.xml
res/values-fr-keyshidden/strings.xml
res/values-fr/strings.xml
res/values-it/strings.xml
res/values-nb/strings.xml
res/values-nl/strings.xml
res/values-pl-keysexposed/strings.xml
res/values-pl-keyshidden/strings.xml
res/values-pl/strings.xml
res/values/colors.xml
res/xml/gadget_info.xml
res/xml/searchable.xml
src/com/android/music/AlbumBrowserActivity.java
src/com/android/music/ArtistAlbumBrowserActivity.java
src/com/android/music/MediaGadgetProvider.java
src/com/android/music/MediaPlaybackService.java
src/com/android/music/MusicBrowserActivity.java
src/com/android/music/PlaylistBrowserActivity.java
src/com/android/music/QueryBrowserActivity.java
src/com/android/music/TrackBrowserActivity.java
tests/src/com/android/music/MusicPlayerNames.java

diff --git a/res/drawable-finger/album_edges.9.png b/res/drawable-finger/album_edges.9.png
deleted file mode 100644 (file)
index 3480ed5..0000000
Binary files a/res/drawable-finger/album_edges.9.png and /dev/null differ
diff --git a/res/drawable-finger/album_sheen.png b/res/drawable-finger/album_sheen.png
deleted file mode 100644 (file)
index 6758845..0000000
Binary files a/res/drawable-finger/album_sheen.png and /dev/null differ
diff --git a/res/drawable-finger/gadget_background.png b/res/drawable-finger/gadget_background.png
deleted file mode 100644 (file)
index 8426e98..0000000
Binary files a/res/drawable-finger/gadget_background.png and /dev/null differ
diff --git a/res/drawable-finger/gadget_bg.9.png b/res/drawable-finger/gadget_bg.9.png
new file mode 100644 (file)
index 0000000..8930c08
Binary files /dev/null and b/res/drawable-finger/gadget_bg.9.png differ
diff --git a/res/drawable-finger/gadget_button.xml b/res/drawable-finger/gadget_button.xml
deleted file mode 100644 (file)
index c65e0b8..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_window_focused="false" android:state_enabled="true"
-        android:drawable="@android:color/transparent" />
-    <item android:state_window_focused="false" android:state_enabled="false"
-        android:drawable="@android:color/transparent" />
-    <item android:state_pressed="true" 
-        android:drawable="@android:drawable/btn_default" />
-    <item android:state_focused="true" android:state_enabled="true"
-        android:drawable="@android:drawable/btn_default" />
-    <item android:state_enabled="true"
-        android:drawable="@android:color/transparent" />
-    <item android:state_focused="true"
-        android:drawable="@android:color/transparent" />
-    <item
-        android:drawable="@android:color/transparent" />
-</selector>
diff --git a/res/drawable-finger/gadget_inner.9.png b/res/drawable-finger/gadget_inner.9.png
new file mode 100644 (file)
index 0000000..157afcf
Binary files /dev/null and b/res/drawable-finger/gadget_inner.9.png differ
index c795632..7066e1d 100644 (file)
@@ -20,7 +20,7 @@
     <item android:state_pressed="true"
         android:drawable="@drawable/gadget_next_pressed" />
     <item android:state_focused="true"
-        android:drawable="@drawable/gadget_next_focused" />
+        android:drawable="@drawable/gadget_next_pressed" />
     <item
          android:drawable="@drawable/gadget_next_normal" />
 </selector>
diff --git a/res/drawable-finger/gadget_next_focused.png b/res/drawable-finger/gadget_next_focused.png
deleted file mode 100644 (file)
index b653621..0000000
Binary files a/res/drawable-finger/gadget_next_focused.png and /dev/null differ
index 525a8da..072499e 100644 (file)
Binary files a/res/drawable-finger/gadget_next_normal.png and b/res/drawable-finger/gadget_next_normal.png differ
index 5d356ed..e8ae5d9 100644 (file)
Binary files a/res/drawable-finger/gadget_next_pressed.png and b/res/drawable-finger/gadget_next_pressed.png differ
diff --git a/res/drawable-finger/gadget_no_art.png b/res/drawable-finger/gadget_no_art.png
deleted file mode 100644 (file)
index 9ba727a..0000000
Binary files a/res/drawable-finger/gadget_no_art.png and /dev/null differ
index 82faea9..42d47cb 100644 (file)
@@ -20,7 +20,7 @@
     <item android:state_pressed="true"
         android:drawable="@drawable/gadget_pause_pressed" />
     <item android:state_focused="true"
-        android:drawable="@drawable/gadget_pause_focused" />
+        android:drawable="@drawable/gadget_pause_pressed" />
     <item
          android:drawable="@drawable/gadget_pause_normal" />
 </selector>
diff --git a/res/drawable-finger/gadget_pause_focused.png b/res/drawable-finger/gadget_pause_focused.png
deleted file mode 100644 (file)
index e0133ed..0000000
Binary files a/res/drawable-finger/gadget_pause_focused.png and /dev/null differ
index 7144a42..a40e247 100644 (file)
Binary files a/res/drawable-finger/gadget_pause_normal.png and b/res/drawable-finger/gadget_pause_normal.png differ
index 187d365..2a5116c 100644 (file)
Binary files a/res/drawable-finger/gadget_pause_pressed.png and b/res/drawable-finger/gadget_pause_pressed.png differ
index 1fc2ef2..4b330e9 100644 (file)
@@ -20,7 +20,7 @@
     <item android:state_pressed="true"
         android:drawable="@drawable/gadget_play_pressed" />
     <item android:state_focused="true"
-        android:drawable="@drawable/gadget_play_focused" />
+        android:drawable="@drawable/gadget_play_pressed" />
     <item
          android:drawable="@drawable/gadget_play_normal" />
 </selector>
diff --git a/res/drawable-finger/gadget_play_focused.png b/res/drawable-finger/gadget_play_focused.png
deleted file mode 100644 (file)
index d982984..0000000
Binary files a/res/drawable-finger/gadget_play_focused.png and /dev/null differ
index 7f12413..f812874 100644 (file)
Binary files a/res/drawable-finger/gadget_play_normal.png and b/res/drawable-finger/gadget_play_normal.png differ
index 7904297..747b5ae 100644 (file)
Binary files a/res/drawable-finger/gadget_play_pressed.png and b/res/drawable-finger/gadget_play_pressed.png differ
diff --git a/res/drawable-finger/gadget_prev.xml b/res/drawable-finger/gadget_prev.xml
deleted file mode 100644 (file)
index 3b9a13a..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_window_focused="false"
-        android:drawable="@drawable/gadget_prev_normal" />
-    <item android:state_pressed="true"
-        android:drawable="@drawable/gadget_prev_pressed" />
-    <item android:state_focused="true"
-        android:drawable="@drawable/gadget_prev_focused" />
-    <item
-         android:drawable="@drawable/gadget_prev_normal" />
-</selector>
diff --git a/res/drawable-finger/gadget_prev_focused.png b/res/drawable-finger/gadget_prev_focused.png
deleted file mode 100644 (file)
index 3502db9..0000000
Binary files a/res/drawable-finger/gadget_prev_focused.png and /dev/null differ
diff --git a/res/drawable-finger/gadget_prev_normal.png b/res/drawable-finger/gadget_prev_normal.png
deleted file mode 100644 (file)
index 64f8eeb..0000000
Binary files a/res/drawable-finger/gadget_prev_normal.png and /dev/null differ
diff --git a/res/drawable-finger/gadget_prev_pressed.png b/res/drawable-finger/gadget_prev_pressed.png
deleted file mode 100644 (file)
index 0eff95e..0000000
Binary files a/res/drawable-finger/gadget_prev_pressed.png and /dev/null differ
index 0d86e77..35449b3 100755 (executable)
Binary files a/res/drawable-finger/ic_mp_current_playlist_btn.png and b/res/drawable-finger/ic_mp_current_playlist_btn.png differ
index 7d89adb..18f09b1 100755 (executable)
Binary files a/res/drawable-finger/ic_mp_partyshuffle_on_btn.png and b/res/drawable-finger/ic_mp_partyshuffle_on_btn.png differ
index fe043c6..d1f1e60 100755 (executable)
Binary files a/res/drawable-finger/ic_mp_repeat_all_btn.png and b/res/drawable-finger/ic_mp_repeat_all_btn.png differ
index a7516d0..02fbd81 100755 (executable)
Binary files a/res/drawable-finger/ic_mp_repeat_off_btn.png and b/res/drawable-finger/ic_mp_repeat_off_btn.png differ
index 8950734..549da31 100755 (executable)
Binary files a/res/drawable-finger/ic_mp_repeat_once_btn.png and b/res/drawable-finger/ic_mp_repeat_once_btn.png differ
index f515df9..635fac0 100755 (executable)
Binary files a/res/drawable-finger/ic_mp_shuffle_off_btn.png and b/res/drawable-finger/ic_mp_shuffle_off_btn.png differ
index 9c18be6..92bd59d 100755 (executable)
Binary files a/res/drawable-finger/ic_mp_shuffle_on_btn.png and b/res/drawable-finger/ic_mp_shuffle_on_btn.png differ
diff --git a/res/drawable/gadget_progress.xml b/res/drawable/gadget_progress.xml
deleted file mode 100644 (file)
index ba99f60..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <item android:id="@android:id/background">
-        <shape>
-            <corners android:radius="6dip" />
-            <gradient
-                    android:startColor="@color/gadget_progress_bg_start"
-                    android:centerColor="@color/gadget_progress_bg_center"
-                    android:endColor="@color/gadget_progress_bg_end"
-                    android:centerY="0.4"
-                    android:angle="270"
-            />
-        </shape>
-    </item>
-
-    <item android:id="@android:id/progress">
-        <clip>
-            <shape>
-                <corners android:radius="6dip" />
-                <gradient
-                        android:startColor="@color/gadget_progress_fg_start"
-                        android:centerColor="@color/gadget_progress_fg_center"
-                        android:endColor="@color/gadget_progress_fg_end"
-                        android:centerY="0.15"
-                        android:angle="270"
-                />
-            </shape>
-        </clip>
-    </item>
-
-</layer-list>
index 2878ade..0786d06 100644 (file)
 
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/album_gadget"
-    android:layout_width="240dip"
-    android:layout_height="270dip"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
     >
 
-    <ImageView
-        android:id="@+id/outline"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentTop="true"
-        android:layout_centerHorizontal="true"
-        android:src="@drawable/gadget_background"
-        />
-
-    <ImageView
-        android:id="@+id/artwork"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentTop="true"
-        android:layout_centerHorizontal="true"
-        android:layout_marginTop="24dip"
-        />
-
-    <ImageView
-        android:id="@+id/no_artwork"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentTop="true"
-        android:layout_centerHorizontal="true"
-        android:layout_marginTop="35dip"
-        android:src="@drawable/gadget_no_art"
-        android:visibility="gone"
-        />
-
-    <com.android.internal.widget.TextProgressBar
-        android:id="@+id/progress_group"
+    <FrameLayout
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="50dip"
-        android:layout_marginLeft="50dip"
-        android:layout_marginRight="50dip"
-        android:padding="4dip"
-        android:gravity="center_vertical"
+        android:layout_centerVertical="true"
+        android:layout_marginLeft="9dip"
+        android:layout_marginRight="10dip"
+        android:background="@drawable/gadget_bg"
         >
 
-        <Chronometer
-            android:id="@android:id/text1"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:gravity="center_horizontal"
-            android:padding="2dip"
-            android:textColor="@color/gadget_text"
-            android:textSize="12sp"
-            android:textStyle="bold"
-            android:shadowColor="@color/gadget_text_shadow"
-            android:shadowRadius="2.75"
-            />
-
-        <ProgressBar
-            android:id="@android:id/progress"
+        <LinearLayout
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
-            android:layout_below="@android:id/text1"
-            android:indeterminateOnly="false"
-            android:progressDrawable="@drawable/gadget_progress"
-            android:minHeight="12dip"
-            android:maxHeight="12dip"
-            />
+            android:orientation="vertical"
+            android:background="@drawable/gadget_inner"
+            >
 
-    </com.android.internal.widget.TextProgressBar>
+            <TextView
+                android:id="@+id/title"
+                android:layout_width="fill_parent"
+                android:layout_height="0dip"
+                android:layout_weight="1"
+                android:gravity="bottom|left"
+                android:textColor="@color/gadget_text"
+                android:textStyle="bold"
+                android:textSize="11sp"
+                android:singleLine="true"
+                android:ellipsize="marquee"
+                android:fadingEdge="horizontal"
+                />
 
-    <TextView
-        android:id="@+id/title"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="12dip"
-        android:layout_marginLeft="34dip"
-        android:layout_marginRight="34dip"
-        android:layout_below="@id/progress_group"
-        android:textColor="@color/gadget_text"
-        android:textSize="14sp"
-        android:singleLine="true"
-        android:ellipsize="marquee"
-        android:fadingEdge="horizontal"
-        android:shadowColor="@color/gadget_text_shadow"
-        android:shadowRadius="2.75"
-        />
+            <TextView
+                android:id="@+id/artist"
+                android:layout_width="fill_parent"
+                android:layout_height="0dip"
+                android:layout_weight="1"
+                android:gravity="top|left"
+                android:textColor="@color/gadget_text"
+                android:textSize="11dip"
+                android:singleLine="true"
+                android:ellipsize="marquee"
+                android:fadingEdge="horizontal"
+                />
 
-    <TextView
-        android:id="@+id/artist"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="34dip"
-        android:layout_marginRight="34dip"
-        android:layout_marginBottom="12dip"
-        android:layout_below="@id/title"
-        android:textColor="@color/gadget_text"
-        android:textStyle="bold"
-        android:textSize="14dip"
-        android:singleLine="true"
-        android:ellipsize="marquee"
-        android:fadingEdge="horizontal"
-        android:shadowColor="@color/gadget_text_shadow"
-        android:shadowRadius="2.75"
-        />
+        </LinearLayout>
 
-    <ImageButton
-        android:id="@+id/control_prev"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/artist"
-        android:layout_alignParentLeft="true"
-        android:layout_marginLeft="14dip"
-        android:src="@drawable/gadget_prev"
-        android:background="@android:color/transparent"
-        />
+    </FrameLayout>
 
     <ImageButton
         android:id="@+id/control_next"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/artist"
+        android:layout_height="fill_parent"
         android:layout_alignParentRight="true"
-        android:layout_marginRight="14dip"
+        android:layout_centerVertical="true"
+        android:paddingRight="25dip"
+        android:paddingLeft="10dip"
         android:src="@drawable/gadget_next"
         android:background="@android:color/transparent"
         />
         android:id="@+id/control_play"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_centerHorizontal="true"
-        android:layout_below="@id/artist"
-        android:layout_marginTop="15dip"
-        android:nextFocusUp="@id/control_next"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentBottom="true"
+        android:paddingLeft="16dip"
+        android:paddingRight="10dip"
+        android:paddingBottom="3dip"
+        android:paddingTop="10dip"
         android:src="@drawable/gadget_play"
         android:background="@android:color/transparent"
         />
index 2bcc378..25737aa 100644 (file)
@@ -46,7 +46,7 @@
                 android:text="@string/browse_menu"
                 android:ellipsize="marquee"
                 android:textAppearance="?android:attr/textAppearanceMedium"
-                android:textColor="?android:attr/textColorPrimary"
+                android:textColor="?android:attr/textColorPrimaryDisableOnly"
                 android:singleLine="true"
                 android:layout_marginBottom="35dip"
             />
@@ -60,7 +60,7 @@
                 android:text="@string/tracks_menu"
                 android:ellipsize="marquee"
                 android:textAppearance="?android:attr/textAppearanceMedium"
-                android:textColor="?android:attr/textColorPrimary"
+                android:textColor="?android:attr/textColorPrimaryDisableOnly"
                 android:singleLine="true"
                 android:layout_marginBottom="35dip"
             />
@@ -84,7 +84,7 @@
                 android:text="@string/albums_menu"
                 android:ellipsize="marquee"
                 android:textAppearance="?android:attr/textAppearanceMedium"
-                android:textColor="?android:attr/textColorPrimary"
+                android:textColor="?android:attr/textColorPrimaryDisableOnly"
                 android:singleLine="true"
                 android:layout_marginBottom="35dip"
             />
@@ -98,7 +98,7 @@
                 android:text="@string/playlists_menu"
                 android:ellipsize="marquee"
                 android:textAppearance="?android:attr/textAppearanceMedium"
-                android:textColor="?android:attr/textColorPrimary"
+                android:textColor="?android:attr/textColorPrimaryDisableOnly"
                 android:singleLine="true"
                 android:layout_marginBottom="35dip"
             />
diff --git a/res/layout-land-finger/gadget.xml b/res/layout-land-finger/gadget.xml
deleted file mode 100644 (file)
index e3946f6..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/album_gadget"
-    android:layout_width="220dip"
-    android:layout_height="220dip"
-    >
-
-    <ImageView
-        android:id="@+id/outline"
-        android:layout_width="220dip"
-        android:layout_height="220dip"
-        android:layout_alignParentTop="true"
-        android:layout_centerHorizontal="true"
-        android:src="@drawable/gadget_background"
-        />
-
-    <ImageView
-        android:id="@+id/artwork"
-        android:layout_width="182dip"
-        android:layout_height="182dip"
-        android:layout_alignParentTop="true"
-        android:layout_centerHorizontal="true"
-        android:layout_marginTop="22dip"
-        />
-
-    <ImageView
-        android:id="@+id/no_artwork"
-        android:layout_width="0dip"
-        android:layout_height="0dip"
-        android:visibility="gone"
-        />
-
-    <com.android.internal.widget.TextProgressBar
-        android:id="@+id/progress_group"
-        android:layout_width="0dip"
-        android:layout_height="0dip"
-        android:visibility="gone"
-        >
-
-        <Chronometer
-            android:id="@android:id/text1"
-            android:layout_width="0dip"
-            android:layout_height="0dip"
-            />
-
-        <ProgressBar
-            android:id="@android:id/progress"
-            android:layout_width="0dip"
-            android:layout_height="0dip"
-            />
-
-    </com.android.internal.widget.TextProgressBar>
-
-    <TextView
-        android:id="@+id/title"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="60dip"
-        android:layout_marginLeft="40dip"
-        android:layout_marginRight="40dip"
-        android:layout_below="@id/progress_group"
-        android:textColor="@color/gadget_text"
-        android:textSize="14sp"
-        android:singleLine="true"
-        android:ellipsize="marquee"
-        android:fadingEdge="horizontal"
-        android:shadowColor="@color/gadget_text_shadow"
-        android:shadowRadius="2.75"
-        />
-
-    <TextView
-        android:id="@+id/artist"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:layout_centerHorizontal="true"
-        android:layout_marginLeft="40dip"
-        android:layout_marginRight="40dip"
-        android:layout_marginBottom="7dip"
-        android:layout_below="@id/title"
-        android:textColor="@color/gadget_text"
-        android:textStyle="bold"
-        android:textSize="14sp"
-        android:singleLine="true"
-        android:ellipsize="marquee"
-        android:fadingEdge="horizontal"
-        android:shadowColor="@color/gadget_text_shadow"
-        android:shadowRadius="2.75"
-        />
-
-    <ImageButton
-        android:id="@+id/control_prev"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/artist"
-        android:layout_alignParentLeft="true"
-        android:src="@drawable/gadget_prev"
-        android:background="@android:color/transparent"
-        />
-
-    <ImageButton
-        android:id="@+id/control_next"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/artist"
-        android:layout_alignParentRight="true"
-        android:src="@drawable/gadget_next"
-        android:background="@android:color/transparent"
-        />
-
-    <ImageButton
-        android:id="@+id/control_play"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_centerHorizontal="true"
-        android:layout_below="@id/artist"
-        android:layout_marginTop="15dip"
-        android:nextFocusUp="@id/control_next"
-        android:src="@drawable/gadget_play"
-        android:background="@android:color/transparent"
-        />
-
-</RelativeLayout>
index 14f49a5..2f3019f 100644 (file)
@@ -38,7 +38,7 @@
             android:text="@string/browse_menu"
             android:ellipsize="marquee"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            android:textColor="?android:attr/textColorPrimary"
+            android:textColor="?android:attr/textColorPrimaryDisableOnly"
             android:singleLine="true"
             android:layout_marginBottom="35dip"
             android:layout_marginRight="10dip"
@@ -53,7 +53,7 @@
             android:text="@string/albums_menu"
             android:ellipsize="marquee"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            android:textColor="?android:attr/textColorPrimary"
+            android:textColor="?android:attr/textColorPrimaryDisableOnly"
             android:singleLine="true"
             android:layout_marginBottom="35dip"
             android:layout_marginRight="10dip"
@@ -68,7 +68,7 @@
             android:text="@string/tracks_menu"
             android:ellipsize="marquee"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            android:textColor="?android:attr/textColorPrimary"
+            android:textColor="?android:attr/textColorPrimaryDisableOnly"
             android:singleLine="true"
             android:layout_marginBottom="35dip"
             android:layout_marginRight="10dip"
@@ -83,7 +83,7 @@
             android:text="@string/playlists_menu"
             android:ellipsize="marquee"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            android:textColor="?android:attr/textColorPrimary"
+            android:textColor="?android:attr/textColorPrimaryDisableOnly"
             android:singleLine="true"
             android:layout_marginBottom="35dip"
         />
index ed8e825..00c743f 100644 (file)
@@ -67,8 +67,8 @@
     <string name="recentlyadded_title">"Añadidos recientemente"</string>
     <string name="podcasts_listitem">"Podcasts"</string>
     <string name="podcasts_title">"Podcasts"</string>
-    <string name="sdcard_missing_title">"Ninguna tarjeta SD"</string>
-    <string name="sdcard_missing_message">"No hay ninguna tarjeta SD en el teléfono."</string>
+    <string name="sdcard_missing_title">"Falta la tarjeta SD"</string>
+    <string name="sdcard_missing_message">"Falta la tarjeta SD en el teléfono"</string>
     <string name="sdcard_busy_title">"Tarjeta SD no disponible"</string>
     <string name="sdcard_busy_message">"La tarjeta SD está ocupada."</string>
     <string name="sdcard_error_title">"Error de tarjeta SD"</string>
index dd5e261..9fa5d9d 100644 (file)
@@ -15,7 +15,7 @@
 -->
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="create_playlist_create_text_prompt">"Nom de la liste de lecture"</string>
+    <string name="create_playlist_create_text_prompt">"Nom de la playlist"</string>
     <string name="rename_playlist_same_prompt">"Renommer \"<xliff:g id="PLAYLIST">%s</xliff:g>\" en"</string>
     <string name="rename_playlist_diff_prompt">"Renommer \"<xliff:g id="PLAYLIST">%s</xliff:g>\" en"</string>
 </resources>
index 98283b3..2ee347c 100644 (file)
@@ -15,7 +15,7 @@
 -->
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="create_playlist_create_text_prompt">"Ouvrez le clavier afin de saisir un nom pour votre nouvelle liste de lecture ou sélectionnez Enregistrer pour lui attribuer le nom \"%s\"."</string>
-    <string name="rename_playlist_same_prompt">"Ouvrez le clavier pour renommer la liste de lecture \"<xliff:g id="PLAYLIST">%s</xliff:g>\"."</string>
-    <string name="rename_playlist_diff_prompt">"Ouvrez le clavier afin de saisir un nom pour votre nouvelle liste de lecture \"<xliff:g id="PLAYLIST">%s</xliff:g>\" ou sélectionnez Enregistrer pour lui attribuer le nom \"%s\"."</string>
+    <string name="create_playlist_create_text_prompt">"Ouvrez le clavier afin de saisir un nom pour votre nouvelle playlist ou sélectionnez Enregistrer pour la nommer \"%s\"."</string>
+    <string name="rename_playlist_same_prompt">"Ouvrez le clavier pour renommer la playlist \"<xliff:g id="PLAYLIST">%s</xliff:g>\"."</string>
+    <string name="rename_playlist_diff_prompt">"Ouvrez le clavier pour saisir un nouveau nom pour la playlist \"<xliff:g id="PLAYLIST">%s</xliff:g>\" ou sélectionnez Enregistrer pour la nommer \"%s\"."</string>
 </resources>
index 4c48229..b434be0 100644 (file)
@@ -34,7 +34,7 @@
     <string name="shuffle_all">"Lecture aléatoire de toutes les chansons"</string>
     <string name="play_all">"Tout lire"</string>
     <string name="delete_artist_desc">"Toutes les chansons de <xliff:g id="ARTIST">%s</xliff:g> seront définitivement supprimées de la carte SD."</string>
-    <string name="delete_album_desc">"L\' intégralité de l\'album \"<xliff:g id="ALBUM">%s</xliff:g>\" sera définitivement supprimé de la carte SD."</string>
+    <string name="delete_album_desc">"L\'intégralité de l\'album \"<xliff:g id="ALBUM">%s</xliff:g>\" sera définitivement supprimée de la carte SD."</string>
     <string name="delete_song_desc">"La chanson \"<xliff:g id="SONG">%s</xliff:g>\" sera définitivement supprimée de la carte SD."</string>
     <string name="delete_confirm_button_text">"OK"</string>
   <plurals name="NNNtracksdeleted">
     <string name="albums_title">"Albums"</string>
     <string name="tracks_menu">"Chansons"</string>
     <string name="tracks_title">"Chansons"</string>
-    <string name="playlists_menu">"Listes de lecture"</string>
-    <string name="playlists_title">"Listes de lecture"</string>
+    <string name="playlists_menu">"Playlists"</string>
+    <string name="playlists_title">"Playlists"</string>
     <string name="videos_title">"Vidéos"</string>
-    <string name="all_title">"Tous les médias"</string>
+    <string name="all_title">"Tous le multimédia"</string>
     <string name="browse_menu">"Artistes"</string>
-    <string name="search_title">"Recherche"</string>
+    <string name="search_title">"Rechercher"</string>
     <string name="no_tracks_title">"Aucune chanson"</string>
     <string name="no_videos_title">"Aucune vidéo trouvée"</string>
-    <string name="no_playlists_title">"Aucune liste de lecture trouvée"</string>
+    <string name="no_playlists_title">"Aucune playlist trouvée"</string>
     <string name="delete_playlist_menu">"Supprimer"</string>
     <string name="edit_playlist_menu">"Modifier"</string>
     <string name="rename_playlist_menu">"Renommer"</string>
-    <string name="playlist_deleted_message">"La liste de lecture a été supprimée."</string>
-    <string name="playlist_renamed_message">"La liste de lecture a été renommée."</string>
+    <string name="playlist_deleted_message">"La playlist a été supprimée."</string>
+    <string name="playlist_renamed_message">"La playlist a été renommée."</string>
     <string name="recentlyadded">"Ajoutés récemment"</string>
     <string name="recentlyadded_title">"Playlist récente"</string>
     <string name="podcasts_listitem">"Podcasts"</string>
     <string name="sdcard_error_message">"Une erreur s\'est produite sur votre carte SD."</string>
     <string name="unknown_artist_name">"Artiste inconnu"</string>
     <string name="unknown_album_name">"Album inconnu"</string>
-    <string name="shuffle_on_notif">"La lecture aléatoire est activé."</string>
+    <string name="shuffle_on_notif">"La lecture aléatoire est activée."</string>
     <string name="shuffle_off_notif">"Le mode aléatoire est désactivé."</string>
     <string name="repeat_off_notif">"La lecture en boucle est désactivée."</string>
-    <string name="repeat_current_notif">"Lecture en boucle de la chanson en écoute"</string>
+    <string name="repeat_current_notif">"Lecture en boucle de la chanson en écoute."</string>
     <string name="repeat_all_notif">"Lecture en boucle de toutes les chansons"</string>
-    <string name="ringtone_menu">"Utiliser comme sonnerie du téléphone"</string>
-    <string name="ringtone_menu_short">"Utiliser comme sonnerie"</string>
+    <string name="ringtone_menu">"Utiliser comme sonnerie"</string>
+    <string name="ringtone_menu_short">"Définir comme sonnerie"</string>
     <string name="ringtone_set">"\"%s\" a été défini comme sonnerie."</string>
     <string name="play_selection">"Lire"</string>
-    <string name="add_to_playlist">"Ajouter à la liste de lecture"</string>
-    <string name="queue">"Liste de lecture actuelle"</string>
+    <string name="add_to_playlist">"Ajouter à la playlist"</string>
+    <string name="queue">"Playlist actuelle"</string>
     <string name="new_playlist">"Nouveau"</string>
-    <string name="new_playlist_name_template">"Nouvelle liste de lecture <xliff:g id="NUMBER">%d</xliff:g>"</string>
+    <string name="new_playlist_name_template">"Nouvelle playlist <xliff:g id="NUMBER">%d</xliff:g>"</string>
   <plurals name="NNNtrackstoplaylist">
-    <item quantity="one">"1 chanson a été ajoutée à la liste de lecture."</item>
-    <item quantity="other">"%d chansons ont été ajoutées à la liste de lecture."</item>
+    <item quantity="one">"1 chanson a été ajoutée à la playlist."</item>
+    <item quantity="other">"%d chansons ont été ajoutées à la playlist."</item>
   </plurals>
-    <string name="emptyplaylist">"La liste de lecture sélectionnée est vide."</string>
+    <string name="emptyplaylist">"La playlist sélectionnée est vide."</string>
     <string name="create_playlist_create_text">"Enregistrer"</string>
-    <string name="create_playlist_overwrite_text">"Écraser"</string>
+    <string name="create_playlist_overwrite_text">"Remplacer"</string>
     <string name="service_start_error_title">"Erreur de lecture"</string>
     <string name="service_start_error_msg">"Désolé, la chanson n\'a pas pu être lue."</string>
     <string name="service_start_error_button">"OK"</string>
   <string-array name="weeklist">
-    <item>"1 semaine"</item>
-    <item>"2 semaines"</item>
-    <item>"3 semaines"</item>
-    <item>"4 semaines"</item>
-    <item>"5 semaines"</item>
-    <item>"6 semaines"</item>
-    <item>"7 semaines"</item>
-    <item>"8 semaines"</item>
-    <item>"9 semaines"</item>
-    <item>"10 semaines"</item>
-    <item>"11 semaines"</item>
-    <item>"12 semaines"</item>
+    <item>"1 sem."</item>
+    <item>"2 sem."</item>
+    <item>"3 sem."</item>
+    <item>"4 sem."</item>
+    <item>"5 sem."</item>
+    <item>"6 sem."</item>
+    <item>"7 sem."</item>
+    <item>"8 sem."</item>
+    <item>"9 sem."</item>
+    <item>"10 sem."</item>
+    <item>"11 sem."</item>
+    <item>"12 sem."</item>
   </string-array>
     <string name="weekpicker_set">"OK"</string>
     <string name="weekpicker_title">"Définir la durée"</string>
-    <string name="save_as_playlist">"Enregistrer en tant que liste de lecture"</string>
-    <string name="clear_playlist">"Effacer la liste de lecture"</string>
+    <string name="save_as_playlist">"Enregistrer comme playlist"</string>
+    <string name="clear_playlist">"Effacer la playlist"</string>
     <string name="musicbrowserlabel">"Musique"</string>
-    <string name="musicshortcutlabel">"Liste de lecture musicale"</string>
+    <string name="musicshortcutlabel">"Playlist musicale"</string>
     <string name="mediaplaybacklabel">"Musique"</string>
     <string name="videobrowserlabel">"Vidéos"</string>
     <string name="mediapickerlabel">"Musique"</string>
     <string name="playback_failed">"Désolé, le lecteur ne prend pas en charge ce type de fichier audio."</string>
     <string name="cancel">"Annuler"</string>
-    <string name="remove_from_playlist">"Supprimer de la liste de lecture"</string>
+    <string name="remove_from_playlist">"Supprimer de la playlist"</string>
     <string name="streamloadingtext">"Connexion à <xliff:g id="HOST">%s</xliff:g>"</string>
     <string name="mediasearch">"Rechercher %s à l\'aide de :"</string>
     <string name="working_artists">"Artistes…"</string>
index 73f9171..2a730e9 100644 (file)
@@ -29,7 +29,7 @@
     <string name="goto_start">"Raccolta"</string>
     <string name="goto_playback">"Riproduci"</string>
     <string name="party_shuffle">"Party shuffle"</string>
-    <string name="party_shuffle_off">"Party shuffle off"</string>
+    <string name="party_shuffle_off">"Party shuffle non attiva"</string>
     <string name="delete_item">"Elimina"</string>
     <string name="shuffle_all">"Ripr. casuale"</string>
     <string name="play_all">"Riprod. tutti"</string>
@@ -86,7 +86,7 @@
     <string name="play_selection">"Riprod."</string>
     <string name="add_to_playlist">"Aggiungi a playlist"</string>
     <string name="queue">"Playlist corrente"</string>
-    <string name="new_playlist">"Nuovo"</string>
+    <string name="new_playlist">"Nuova"</string>
     <string name="new_playlist_name_template">"Nuova playlist <xliff:g id="NUMBER">%d</xliff:g>"</string>
   <plurals name="NNNtrackstoplaylist">
     <item quantity="one">"1 brano aggiunto alla playlist."</item>
index bf9dc97..4adf891 100644 (file)
@@ -34,8 +34,8 @@
     <string name="shuffle_all">"Stokk alle"</string>
     <string name="play_all">"Spill alle"</string>
     <string name="delete_artist_desc">"Alle sanger av <xliff:g id="ARTIST">%s</xliff:g> vil vil bli slettet permanent fra minnekortet."</string>
-    <string name="delete_album_desc">"Hele albumet \\\\\\\"<xliff:g id="ALBUM">%s</xliff:g>\\\\\\\" vil bli slettet permanent fra minnekortet."</string>
-    <string name="delete_song_desc">"\\\\\\\"<xliff:g id="SONG">%s</xliff:g>\\\\\\\" vil bli slettet permanent fra minnekortet."</string>
+    <string name="delete_album_desc">"Hele albumet \"<xliff:g id="ALBUM">%s</xliff:g>\" vil bli slettet permanent fra minnekortet."</string>
+    <string name="delete_song_desc">"\"<xliff:g id="SONG">%s</xliff:g>\" vil bli slettet permanent fra minnekortet."</string>
     <string name="delete_confirm_button_text">"OK"</string>
   <plurals name="NNNtracksdeleted">
     <item quantity="one">"1 sang ble slettet."</item>
@@ -82,7 +82,7 @@
     <string name="repeat_all_notif">"Gjentar alle sanger."</string>
     <string name="ringtone_menu">"Bruk som telefonringetone"</string>
     <string name="ringtone_menu_short">"Bruk som ringetone"</string>
-    <string name="ringtone_set">"\\\\\\\"%s\\\\\\\" valgt som telefonringetone."</string>
+    <string name="ringtone_set">"\"%s\" valgt som telefonringetone."</string>
     <string name="play_selection">"Spill"</string>
     <string name="add_to_playlist">"Legg til spillelisten"</string>
     <string name="queue">"Gjeldende spilleliste"</string>
index 458581b..830b1f7 100644 (file)
@@ -35,7 +35,7 @@
     <string name="play_all">"Alles afspelen"</string>
     <string name="delete_artist_desc">"Alle nummers van <xliff:g id="ARTIST">%s</xliff:g> worden definitief van de SD-kaart verwijderd."</string>
     <string name="delete_album_desc">"Het hele album \'<xliff:g id="ALBUM">%s</xliff:g>\' wordt definitief van de SD-kaart verwijderd."</string>
-    <string name="delete_song_desc">"\'<xliff:g id="SONG">%s</xliff:g>\' wordt definitief van de SD-kaart verwijderd."</string>
+    <string name="delete_song_desc">"<xliff:g id="SONG">%s</xliff:g>\' wordt definitief van de SD-kaart verwijderd."</string>
     <string name="delete_confirm_button_text">"OK"</string>
   <plurals name="NNNtracksdeleted">
     <item quantity="one">"1 nummer is verwijderd."</item>
@@ -82,7 +82,7 @@
     <string name="repeat_all_notif">"Alle nummers worden herhaald."</string>
     <string name="ringtone_menu">"Gebruiken als beltoon van telefoon"</string>
     <string name="ringtone_menu_short">"Gebruiken als beltoon"</string>
-    <string name="ringtone_set">"\'%s\' ingesteld als beltoon van telefoon."</string>
+    <string name="ringtone_set">"%s\' ingesteld als beltoon van telefoon."</string>
     <string name="play_selection">"Afspelen"</string>
     <string name="add_to_playlist">"Toevoegen aan afspeellijst"</string>
     <string name="queue">"Huidige afspeellijst"</string>
index b1052ad..d4294bb 100644 (file)
@@ -15,7 +15,7 @@
 -->
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="create_playlist_create_text_prompt">"Nazwa listy odtwarzania"</string>
+    <string name="create_playlist_create_text_prompt">"Nazwa playlisty"</string>
     <string name="rename_playlist_same_prompt">"Zmień nazwę „<xliff:g id="PLAYLIST">%s</xliff:g>” na"</string>
     <string name="rename_playlist_diff_prompt">"Zmień nazwę „<xliff:g id="PLAYLIST">%s</xliff:g>” na"</string>
 </resources>
index 143b50e..8dcbae0 100644 (file)
@@ -15,7 +15,7 @@
 -->
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="create_playlist_create_text_prompt">"Otwórz klawiaturę, aby nazwać nową listę odtwarzania lub wybierz polecenie Zapisz, aby nazwać ją „%s”."</string>
-    <string name="rename_playlist_same_prompt">"Otwórz klawiaturę, aby nadać nową nazwę liście odtwarzania „<xliff:g id="PLAYLIST">%s</xliff:g>”."</string>
-    <string name="rename_playlist_diff_prompt">"Otwórz klawiaturę, aby nadać liście odtwarzania „<xliff:g id="PLAYLIST">%s</xliff:g>” nową nazwę lub wybierz polecenie Zapisz, aby nazwać ją „%s”."</string>
+    <string name="create_playlist_create_text_prompt">"Otwórz klawiaturę, aby nazwać nową playlistę lub wybierz polecenie Zapisz, aby nazwać ją „%s”."</string>
+    <string name="rename_playlist_same_prompt">"Otwórz klawiaturę, aby nadać nową nazwę playliście „<xliff:g id="PLAYLIST">%s</xliff:g>”."</string>
+    <string name="rename_playlist_diff_prompt">"Otwórz klawiaturę, aby nadać playliście „<xliff:g id="PLAYLIST">%s</xliff:g>” nową nazwę lub wybierz polecenie Zapisz, aby nazwać ją „%s”."</string>
 </resources>
index 80f577b..1b5a390 100644 (file)
   </plurals>
     <string name="goto_start">"Biblioteka"</string>
     <string name="goto_playback">"Odtwórz"</string>
-    <string name="party_shuffle">"Odtwarzaj losowo w trybie przyjęcia"</string>
-    <string name="party_shuffle_off">"Odtwarzanie losowe w trybie przyjęcia jest wyłączone"</string>
+    <string name="party_shuffle">"Losowo w trybie imprezy"</string>
+    <string name="party_shuffle_off">"Wyłączono losowe odtwarzanie w trybie imprezy"</string>
     <string name="delete_item">"Usuń"</string>
-    <string name="shuffle_all">"Odtwarzaj losowo wszystkie"</string>
+    <string name="shuffle_all">"Wszystkie losowo"</string>
     <string name="play_all">"Odtwórz wszystko"</string>
     <string name="delete_artist_desc">"Wszystkie utwory wykonawcy <xliff:g id="ARTIST">%s</xliff:g> zostaną na stałe usunięte z karty SD."</string>
     <string name="delete_album_desc">"Cały album „<xliff:g id="ALBUM">%s</xliff:g>” zostanie na stałe usunięty z karty SD."</string>
   </plurals>
     <string name="scanning">"Skanowanie karty SD..."</string>
     <string name="nowplaying_title">"Teraz odtwarzane"</string>
-    <string name="partyshuffle_title">"Odtwarzaj losowo w trybie przyjęcia"</string>
+    <string name="partyshuffle_title">"Losowo w trybie imprezy"</string>
     <string name="artists_title">"Wykonawcy"</string>
     <string name="albums_menu">"Albumy"</string>
     <string name="albums_title">"Albumy"</string>
     <string name="tracks_menu">"Utwory"</string>
     <string name="tracks_title">"Utwory"</string>
-    <string name="playlists_menu">"Listy odtwarzania"</string>
-    <string name="playlists_title">"Listy odtwarzania"</string>
+    <string name="playlists_menu">"Playlisty"</string>
+    <string name="playlists_title">"Playlisty"</string>
     <string name="videos_title">"Filmy wideo"</string>
     <string name="all_title">"Wszystkie multimedia"</string>
     <string name="browse_menu">"Wykonawcy"</string>
     <string name="search_title">"Szukaj"</string>
     <string name="no_tracks_title">"Brak utworów"</string>
     <string name="no_videos_title">"Brak filmów wideo"</string>
-    <string name="no_playlists_title">"Brak list odtwarzania"</string>
+    <string name="no_playlists_title">"Brak playlist"</string>
     <string name="delete_playlist_menu">"Usuń"</string>
     <string name="edit_playlist_menu">"Edytuj"</string>
     <string name="rename_playlist_menu">"Zmień nazwę"</string>
-    <string name="playlist_deleted_message">"Lista odtwarzania została usunięta."</string>
-    <string name="playlist_renamed_message">"Nazwa listy odtwarzania została zmieniona."</string>
+    <string name="playlist_deleted_message">"Playlista została usunięta."</string>
+    <string name="playlist_renamed_message">"Zmieniono nazwę playlisty."</string>
     <string name="recentlyadded">"Ostatnio dodane"</string>
     <string name="recentlyadded_title">"Ostatnio dodane"</string>
     <string name="podcasts_listitem">"Podcasty"</string>
     <string name="sdcard_error_message">"Napotkano błąd na karcie SD."</string>
     <string name="unknown_artist_name">"Nieznany wykonawca"</string>
     <string name="unknown_album_name">"Nieznany album"</string>
-    <string name="shuffle_on_notif">"Odtwarzanie losowe jest włączone."</string>
-    <string name="shuffle_off_notif">"Odtwarzanie losowe jest wyłączone."</string>
+    <string name="shuffle_on_notif">"Odtwarzanie losowe włączone"</string>
+    <string name="shuffle_off_notif">"Odtwarzanie losowe wyłączone"</string>
     <string name="repeat_off_notif">"Powtarzanie jest wyłączone."</string>
     <string name="repeat_current_notif">"Powtarzanie obecnego utworu."</string>
     <string name="repeat_all_notif">"Powtarzanie wszystkich utworów."</string>
-    <string name="ringtone_menu">"Zastosuj jako dzwonek telefonu"</string>
-    <string name="ringtone_menu_short">"Zastosuj jako dzwonek"</string>
+    <string name="ringtone_menu">"Ustaw jako dzwonek telefonu"</string>
+    <string name="ringtone_menu_short">"Ustaw jako dzwonek"</string>
     <string name="ringtone_set">"„%s” ustawiono jako dzwonek telefonu."</string>
     <string name="play_selection">"Odtwórz"</string>
-    <string name="add_to_playlist">"Dodaj do listy odtwarzania"</string>
-    <string name="queue">"Obecna lista odtwarzania"</string>
+    <string name="add_to_playlist">"Dodaj do playlisty"</string>
+    <string name="queue">"Bieżąca playlista"</string>
     <string name="new_playlist">"Nowy"</string>
-    <string name="new_playlist_name_template">"Nowa lista odtwarzania <xliff:g id="NUMBER">%d</xliff:g>"</string>
+    <string name="new_playlist_name_template">"Nowa playlista <xliff:g id="NUMBER">%d</xliff:g>"</string>
   <plurals name="NNNtrackstoplaylist">
-    <item quantity="one">"1 utwór został dodany do listy odtwarzania."</item>
+    <item quantity="one">"Dodano 1 utwór do playlisty."</item>
     <item quantity="other">"%d utworów dodano do listy odtwarzania."</item>
   </plurals>
-    <string name="emptyplaylist">"Wybrana lista odtwarzania jest pusta."</string>
+    <string name="emptyplaylist">"Wybrana playlista jest pusta."</string>
     <string name="create_playlist_create_text">"Zapisz"</string>
     <string name="create_playlist_overwrite_text">"Zastąp"</string>
     <string name="service_start_error_title">"Problem z odtwarzaniem"</string>
   </string-array>
     <string name="weekpicker_set">"Gotowe"</string>
     <string name="weekpicker_title">"Ustaw czas"</string>
-    <string name="save_as_playlist">"Zapisz jako listę odtwarzania"</string>
-    <string name="clear_playlist">"Wyczyść listę odtwarzania"</string>
+    <string name="save_as_playlist">"Zapisz jako playlistę"</string>
+    <string name="clear_playlist">"Wyczyść playlistę"</string>
     <string name="musicbrowserlabel">"Muzyka"</string>
-    <string name="musicshortcutlabel">"Lista odtwarzania muzyki"</string>
+    <string name="musicshortcutlabel">"Playlista muzyczna"</string>
     <string name="mediaplaybacklabel">"Muzyka"</string>
     <string name="videobrowserlabel">"Filmy wideo"</string>
     <string name="mediapickerlabel">"Muzyka"</string>
     <string name="playback_failed">"Niestety, odtwarzacz nie obsługuje plików audio tego typu."</string>
     <string name="cancel">"Anuluj"</string>
-    <string name="remove_from_playlist">"Usuń z listy odtwarzania"</string>
+    <string name="remove_from_playlist">"Usuń z playlisty"</string>
     <string name="streamloadingtext">"Łączenie z: <xliff:g id="HOST">%s</xliff:g>"</string>
     <string name="mediasearch">"Wyszukaj %s z wykorzystaniem:"</string>
     <string name="working_artists">"Wykonawcy…"</string>
index bba7af7..5ebc209 100644 (file)
 -->
 
 <resources>
-    <color name="gadget_progress_bg_start">#ffc2c7bc</color>
-    <color name="gadget_progress_bg_center">#fff8fff1</color>
-    <color name="gadget_progress_bg_end">#ffe9f0e9</color>
-    <color name="gadget_progress_fg_start">#ff8aa841</color>
-    <color name="gadget_progress_fg_center">#ffadd252</color>
-    <color name="gadget_progress_fg_end">#ffadd252</color>
-
-    <color name="gadget_text">#ff003533</color>
-    <color name="gadget_text_shadow">#ffffffff</color>
+    <color name="gadget_text">#ffffffff</color>
 </resources>
 
index fa2d2d4..bbaeaa3 100644 (file)
@@ -15,8 +15,8 @@
 -->
 
 <gadget-provider xmlns:android="http://schemas.android.com/apk/res/android"
-    android:minWidth="220dip"
-    android:minHeight="220dip"
+    android:minWidth="294dip"
+    android:minHeight="72dip"
     android:updatePeriodMillis="0"
     android:initialLayout="@layout/gadget"
     >
index a3cf199..1bff884 100644 (file)
@@ -19,4 +19,5 @@
 
     android:searchSuggestAuthority="media"
     android:searchSuggestPath="external/audio"
+    android:searchSuggestIntentAction="android.intent.action.VIEW"
 />
index 805dbe9..c28b7da 100644 (file)
@@ -468,6 +468,8 @@ public class AlbumBrowserActivity extends ListActivity
         private AlphabetIndexer mIndexer;
         private AlbumBrowserActivity mActivity;
         private AsyncQueryHandler mQueryHandler;
+        private String mConstraint = null;
+        private boolean mConstraintIsValid = false;
         
         class ViewHolder {
             TextView line1;
@@ -604,7 +606,16 @@ public class AlbumBrowserActivity extends ListActivity
         
         @Override
         public Cursor runQueryOnBackgroundThread(CharSequence constraint) {
-            return mActivity.getAlbumCursor(null, constraint.toString());
+            String s = constraint.toString();
+            if (mConstraintIsValid && (
+                    (s == null && mConstraint == null) ||
+                    (s != null && s.equals(mConstraint)))) {
+                return getCursor();
+            }
+            Cursor c = mActivity.getAlbumCursor(null, s);
+            mConstraint = s;
+            mConstraintIsValid = true;
+            return c;
         }
         
         public Object[] getSections() {
index e1d96dc..2ed367b 100644 (file)
@@ -515,6 +515,8 @@ public class ArtistAlbumBrowserActivity extends ExpandableListActivity
         private MusicAlphabetIndexer mIndexer;
         private ArtistAlbumBrowserActivity mActivity;
         private AsyncQueryHandler mQueryHandler;
+        private String mConstraint = null;
+        private boolean mConstraintIsValid = false;
         
         class ViewHolder {
             TextView line1;
@@ -785,7 +787,16 @@ public class ArtistAlbumBrowserActivity extends ExpandableListActivity
         
         @Override
         public Cursor runQueryOnBackgroundThread(CharSequence constraint) {
-            return mActivity.getArtistCursor(null, constraint.toString());
+            String s = constraint.toString();
+            if (mConstraintIsValid && (
+                    (s == null && mConstraint == null) ||
+                    (s != null && s.equals(mConstraint)))) {
+                return getCursor();
+            }
+            Cursor c = mActivity.getArtistCursor(null, s);
+            mConstraint = s;
+            mConstraintIsValid = true;
+            return c;
         }
 
         public Object[] getSections() {
index 8a7e241..46ba391 100644 (file)
@@ -32,6 +32,7 @@ import android.graphics.PorterDuff;
 import android.graphics.PorterDuffXfermode;
 import android.graphics.Rect;
 import android.media.MediaFile;
+import android.os.Environment;
 import android.os.SystemClock;
 import android.util.Config;
 import android.util.Log;
@@ -47,6 +48,19 @@ public class MediaGadgetProvider extends GadgetProvider {
     
     public static final String CMDGADGETUPDATE = "gadgetupdate";
     
+    static final ComponentName THIS_GADGET =
+        new ComponentName("com.android.music",
+                "com.android.music.MediaGadgetProvider");
+    
+    private static MediaGadgetProvider sInstance;
+    
+    static synchronized MediaGadgetProvider getInstance() {
+        if (sInstance == null) {
+            sInstance = new MediaGadgetProvider();
+        }
+        return sInstance;
+    }
+
     @Override
     public void onUpdate(Context context, GadgetManager gadgetManager, int[] gadgetIds) {
         defaultGadget(context, gadgetIds);
@@ -65,14 +79,17 @@ public class MediaGadgetProvider extends GadgetProvider {
      * Initialize given gadgets to default state, where we launch Music on default click
      * and hide actions if service not running.
      */
-    static void defaultGadget(Context context, int[] gadgetIds) {
+    private void defaultGadget(Context context, int[] gadgetIds) {
+        final Resources res = context.getResources();
         final RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.gadget);
+        
+        views.setTextViewText(R.id.title, res.getText(R.string.emptyplaylist));
 
-        linkButtons(context, views, false /* not from service */);
+        linkButtons(context, views, false /* not playing */);
         pushUpdate(context, gadgetIds, views);
     }
     
-    private static void pushUpdate(Context context, int[] gadgetIds, RemoteViews views) {
+    private void pushUpdate(Context context, int[] gadgetIds, RemoteViews views) {
         // Update specific list of gadgetIds if given, otherwise default to all
         final GadgetManager gm = GadgetManager.getInstance(context);
         if (gadgetIds != null) {
@@ -85,55 +102,62 @@ public class MediaGadgetProvider extends GadgetProvider {
     }
     
     /**
+     * Check against {@link GadgetManager} if there are any instances of this gadget.
+     */
+    private boolean hasInstances(Context context) {
+        GadgetManager gadgetManager = GadgetManager.getInstance(context);
+        int[] gadgetIds = gadgetManager.getGadgetIds(THIS_GADGET);
+        return (gadgetIds.length > 0);
+    }
+
+    /**
+     * Handle a change notification coming over from {@link MediaPlaybackService}
+     */
+    void notifyChange(MediaPlaybackService service, String what) {
+        if (hasInstances(service)) {
+            if (MediaPlaybackService.PLAYBACK_COMPLETE.equals(what) ||
+                    MediaPlaybackService.META_CHANGED.equals(what) ||
+                    MediaPlaybackService.PLAYSTATE_CHANGED.equals(what)) {
+                performUpdate(service, null);
+            }
+        }
+    }
+    
+    /**
      * Update all active gadget instances by pushing changes 
-     * @param metaChanged
      */
-    static void updateAllGadgets(MediaPlaybackService service, int[] gadgetIds) {
+    void performUpdate(MediaPlaybackService service, int[] gadgetIds) {
         final Resources res = service.getResources();
         final RemoteViews views = new RemoteViews(service.getPackageName(), R.layout.gadget);
         
         final int track = service.getQueuePosition() + 1;
         final String titleName = service.getTrackName();
         final String artistName = service.getArtistName();
-        final String albumName = service.getAlbumName();
         
-        int albumId = service.getAlbumId();
-        if (MediaFile.UNKNOWN_STRING.equals(albumName)) {
-            albumId = -1;
-        }
-        
-        // Try loading album artwork and resize if found
-        Bitmap artwork = MusicUtils.getArtwork(service, albumId, false);
-        if (artwork != null) {
-            artwork = scaleArtwork(artwork, service);
-            views.setImageViewBitmap(R.id.artwork, artwork);
-            views.setViewVisibility(R.id.artwork, View.VISIBLE);
-            views.setViewVisibility(R.id.no_artwork, View.GONE);
+        // Format title string with track number, or show SD card message
+        CharSequence titleString = "";
+        String status = Environment.getExternalStorageState();
+        if (titleName != null) {
+            titleString = res.getString(R.string.gadget_track_num_title, track, titleName);
+        } else if (status.equals(Environment.MEDIA_SHARED) ||
+                status.equals(Environment.MEDIA_UNMOUNTED)) {
+            titleString = res.getText(R.string.sdcard_busy_title);
+        } else if (status.equals(Environment.MEDIA_REMOVED)) {
+            titleString = res.getText(R.string.sdcard_missing_title);
         } else {
-            views.setViewVisibility(R.id.artwork, View.GONE);
-            views.setViewVisibility(R.id.no_artwork, View.VISIBLE);
+            titleString = res.getText(R.string.emptyplaylist);
         }
         
-        // Format title string with track number
-        final String titleString = res.getString(R.string.gadget_track_num_title, track, titleName);
-        
         views.setTextViewText(R.id.title, titleString);
         views.setTextViewText(R.id.artist, artistName);
         
-        // Set chronometer to correct value
-        final boolean playing = service.isPlaying();
-        final long start = SystemClock.elapsedRealtime() - service.position();
-        final long end = start + service.duration();
-        
-        views.setChronometer(android.R.id.text1, start, null, playing);
-        views.setLong(R.id.progress_group, "setDurationBase", end);
-
         // Set correct drawable for pause state
+        final boolean playing = service.isPlaying();
         views.setImageViewResource(R.id.control_play, playing ?
                 R.drawable.gadget_pause : R.drawable.gadget_play);
 
         // Link actions buttons to intents
-        linkButtons(service, views, true /* not from service */);
+        linkButtons(service, views, playing);
         
         pushUpdate(service, gadgetIds, views);
     }
@@ -141,83 +165,39 @@ public class MediaGadgetProvider extends GadgetProvider {
     /**
      * Link up various button actions using {@link PendingIntents}.
      * 
-     * @param fromService If false, {@link MediaPlaybackService} isn't running,
-     *            and we should link the play button to start that service.
-     *            Otherwise, we assume the service is awake and send broadcast
-     *            Intents instead.
+     * @param playerActive True if player is active in background, which means
+     *            gadget click will launch {@link MediaPlaybackActivity},
+     *            otherwise we launch {@link MusicBrowserActivity}.
      */
-    private static void linkButtons(Context context, RemoteViews views, boolean fromService) {
+    private void linkButtons(Context context, RemoteViews views, boolean playerActive) {
         // Connect up various buttons and touch events
         Intent intent;
         PendingIntent pendingIntent;
         
-        intent = new Intent(context, MediaPlaybackActivity.class);
-        pendingIntent = PendingIntent.getActivity(context,
-                0 /* no requestCode */, intent, 0 /* no flags */);
-        views.setOnClickPendingIntent(R.id.album_gadget, pendingIntent);
+        final ComponentName serviceName = new ComponentName(context, MediaPlaybackService.class);
         
-        intent = new Intent(MediaPlaybackService.PREVIOUS_ACTION);
-        pendingIntent = PendingIntent.getBroadcast(context,
-                0 /* no requestCode */, intent, 0 /* no flags */);
-        views.setOnClickPendingIntent(R.id.control_prev, pendingIntent);
-
-        // Use broadcast to trigger play/pause, otherwise 
-        if (fromService) {
-            intent = new Intent(MediaPlaybackService.TOGGLEPAUSE_ACTION);
-            pendingIntent = PendingIntent.getBroadcast(context,
+        if (playerActive) {
+            intent = new Intent(context, MediaPlaybackActivity.class);
+            pendingIntent = PendingIntent.getActivity(context,
                     0 /* no requestCode */, intent, 0 /* no flags */);
-            views.setOnClickPendingIntent(R.id.control_play, pendingIntent);
+            views.setOnClickPendingIntent(R.id.album_gadget, pendingIntent);
         } else {
-            intent = new Intent(MediaPlaybackService.TOGGLEPAUSE_ACTION);
-            intent.setComponent(new ComponentName(context, MediaPlaybackService.class));
-            pendingIntent = PendingIntent.getService(context,
+            intent = new Intent(context, MusicBrowserActivity.class);
+            pendingIntent = PendingIntent.getActivity(context,
                     0 /* no requestCode */, intent, 0 /* no flags */);
-            views.setOnClickPendingIntent(R.id.control_play, pendingIntent);
+            views.setOnClickPendingIntent(R.id.album_gadget, pendingIntent);
         }
         
+        intent = new Intent(MediaPlaybackService.TOGGLEPAUSE_ACTION);
+        intent.setComponent(serviceName);
+        pendingIntent = PendingIntent.getService(context,
+                0 /* no requestCode */, intent, 0 /* no flags */);
+        views.setOnClickPendingIntent(R.id.control_play, pendingIntent);
+        
         intent = new Intent(MediaPlaybackService.NEXT_ACTION);
-        pendingIntent = PendingIntent.getBroadcast(context,
+        intent.setComponent(serviceName);
+        pendingIntent = PendingIntent.getService(context,
                 0 /* no requestCode */, intent, 0 /* no flags */);
         views.setOnClickPendingIntent(R.id.control_next, pendingIntent);
     }
-    
-    /**
-     * Scale and chop given album artwork to prepare as gadget background.
-     */
-    private static Bitmap scaleArtwork(Bitmap bitmap, Context context) {
-        final int cutoutSize = (int) context.getResources().getDimension(R.dimen.gadget_cutout);
-        final int srcWidth = bitmap.getWidth();
-        final int srcHeight = bitmap.getHeight();
-        final int srcDiameter = Math.min(srcWidth, srcHeight);
-        
-        // Figure out best circle size
-        final Rect src = new Rect((srcWidth - srcDiameter) / 2,
-                (srcHeight - srcDiameter) / 2, srcDiameter, srcDiameter);
-        final Rect dest = new Rect(0, 0, cutoutSize, cutoutSize);
-        
-        final Bitmap thumb = Bitmap.createBitmap(cutoutSize, cutoutSize,
-                Bitmap.Config.ARGB_8888);
-
-        final Canvas canvas = new Canvas(thumb);
-        final Paint paint = new Paint();
-        
-        paint.setAntiAlias(true);
-        
-        // Draw a mask circle using default paint
-        final int radius = cutoutSize / 2;
-        canvas.drawCircle(radius, radius, radius, paint);
-        
-        paint.setDither(false);
-        paint.setFilterBitmap(true);
-        paint.setAlpha(96);
-        
-        // Draw the actual album art, using the mask circle from earlier. Using
-        // this approach allows us to alpha-blend the circle edges, which isn't
-        // possible with Canvas.clipPath()
-        paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
-        canvas.drawBitmap(bitmap, src, dest, paint);
-        
-        return thumb;
-    }
-    
 }
index 44539d2..449f27b 100644 (file)
@@ -146,6 +146,8 @@ public class MediaPlaybackService extends Service {
     // This will have to change if we want to support multiple simultaneous cards.
     private int mCardId;
     
+    private MediaGadgetProvider mGadgetProvider = MediaGadgetProvider.getInstance();
+    
     // interval after which we stop the service when idle
     private static final int IDLE_DELAY = 60000; 
 
@@ -226,7 +228,6 @@ public class MediaPlaybackService extends Service {
                         next(false);
                     } else {
                         notifyChange(PLAYBACK_COMPLETE);
-                        pushGadgetUpdate();
                     }
                     break;
                 case RELEASE_WAKELOCK:
@@ -262,7 +263,7 @@ public class MediaPlaybackService extends Service {
                 // Someone asked us to refresh a set of specific gadgets, probably
                 // because they were just added.
                 int[] gadgetIds = intent.getIntArrayExtra(GadgetManager.EXTRA_GADGET_IDS);
-                MediaGadgetProvider.updateAllGadgets(MediaPlaybackService.this, gadgetIds);
+                mGadgetProvider.performUpdate(MediaPlaybackService.this, gadgetIds);
             }
         }
     };
@@ -588,7 +589,6 @@ public class MediaPlaybackService extends Service {
         stop(true);
         notifyChange(QUEUE_CHANGED);
         notifyChange(META_CHANGED);
-        pushGadgetUpdate();
     }
 
     /**
@@ -614,7 +614,6 @@ public class MediaPlaybackService extends Service {
                         reloadQueue();
                         notifyChange(QUEUE_CHANGED);
                         notifyChange(META_CHANGED);
-                        pushGadgetUpdate();
                     }
                 }
             };
@@ -659,6 +658,9 @@ public class MediaPlaybackService extends Service {
         } else {
             saveQueue(false);
         }
+        
+        // Share this notification directly with our gadgets
+        mGadgetProvider.notifyChange(this, what);
     }
 
     private void ensurePlayListCapacity(int size) {
@@ -723,18 +725,16 @@ public class MediaPlaybackService extends Service {
                 if (action == NOW) {
                     mPlayPos = mPlayListLen - list.length;
                     openCurrent();
-                    play(false /* we push update */);
+                    play();
                     notifyChange(META_CHANGED);
-                    pushGadgetUpdate();
                     return;
                 }
             }
             if (mPlayPos < 0) {
                 mPlayPos = 0;
                 openCurrent();
-                play(false /* we push update */);
+                play();
                 notifyChange(META_CHANGED);
-                pushGadgetUpdate();
             }
         }
     }
@@ -966,11 +966,10 @@ public class MediaPlaybackService extends Service {
     /**
      * Starts playback of a previously opened file.
      */
-    public void play(boolean shouldPushUpdate) {
+    public void play() {
         if (mPlayer.isInitialized()) {
             mPlayer.start();
             setForeground(true);
-            mWasPlaying = true;
 
             NotificationManager nm = (NotificationManager)
             getSystemService(Context.NOTIFICATION_SERVICE);
@@ -1006,10 +1005,10 @@ public class MediaPlaybackService extends Service {
             status.contentIntent = PendingIntent.getActivity(this, 0,
                     new Intent("com.android.music.PLAYBACK_VIEWER"), 0);
             nm.notify(PLAYBACKSERVICE_STATUS, status);
-            notifyChange(PLAYSTATE_CHANGED);
-            if (shouldPushUpdate) {
-                pushGadgetUpdate();
+            if (!mWasPlaying) {
+                notifyChange(PLAYSTATE_CHANGED);
             }
+            mWasPlaying = true;
         } else if (mPlayListLen <= 0) {
             // This is mostly so that if you press 'play' on a bluetooth headset
             // without every having played anything before, it will still play
@@ -1018,21 +1017,6 @@ public class MediaPlaybackService extends Service {
         }
     }
     
-    /**
-     * Starts playback of a previously opened file.
-     */
-    public void play() {
-        // Default play action should push gadget updates
-        play(true);
-    }
-    
-    /**
-     * Push an update to all music gadgets.
-     */
-    private void pushGadgetUpdate() {
-        MediaGadgetProvider.updateAllGadgets(this, null);
-    }
-
     private void stop(boolean remove_status_icon) {
         if (mPlayer.isInitialized()) {
             mPlayer.stop();
@@ -1046,7 +1030,9 @@ public class MediaPlaybackService extends Service {
             gotoIdleState();
         }
         setForeground(false);
-        mWasPlaying = false;
+        if (remove_status_icon) {
+            mWasPlaying = false;
+        }
     }
 
     /**
@@ -1067,7 +1053,6 @@ public class MediaPlaybackService extends Service {
             mWasPlaying = false;
             notifyChange(PLAYSTATE_CHANGED);
             saveBookmarkIfNeeded();
-            pushGadgetUpdate();
         }
     }
 
@@ -1133,9 +1118,8 @@ public class MediaPlaybackService extends Service {
             saveBookmarkIfNeeded();
             stop(false);
             openCurrent();
-            play(false /* we push update */);
+            play();
             notifyChange(META_CHANGED);
-            pushGadgetUpdate();
         }
     }
 
@@ -1215,7 +1199,6 @@ public class MediaPlaybackService extends Service {
                         // all done
                         gotoIdleState();
                         notifyChange(PLAYBACK_COMPLETE);
-                        pushGadgetUpdate();
                         return;
                     } else if (mRepeatMode == REPEAT_ALL || force) {
                         mPlayPos = 0;
@@ -1227,9 +1210,8 @@ public class MediaPlaybackService extends Service {
             saveBookmarkIfNeeded();
             stop(false);
             openCurrent();
-            play(false /* we push update */);
+            play();
             notifyChange(META_CHANGED);
-            pushGadgetUpdate();
         }
     }
     
@@ -1426,9 +1408,8 @@ public class MediaPlaybackService extends Service {
                     doAutoShuffleUpdate();
                     mPlayPos = 0;
                     openCurrent();
-                    play(false /* we push update */);
+                    play();
                     notifyChange(META_CHANGED);
-                    pushGadgetUpdate();
                     return;
                 } else {
                     // failed to build a list of files to shuffle
@@ -1496,9 +1477,8 @@ public class MediaPlaybackService extends Service {
             stop(false);
             mPlayPos = pos;
             openCurrent();
-            play(false /* we push update */);
+            play();
             notifyChange(META_CHANGED);
-            pushGadgetUpdate();
         }
     }
 
index c45d4da..632db1e 100644 (file)
@@ -259,8 +259,10 @@ public class MusicBrowserActivity extends Activity
                 Drawable dr = getResources().getDrawable(android.R.drawable.menuitem_background);
                 dr.setState(new int[] { android.R.attr.state_focused});
                 mNowPlayingView.setBackgroundDrawable(dr);
+                mNowPlayingView.setSelected(true);
             } else {
                 mNowPlayingView.setBackgroundDrawable(mBack);
+                mNowPlayingView.setSelected(false);
             }
         }
     };
index bbb4073..aa0525e 100644 (file)
@@ -510,6 +510,8 @@ public class PlaylistBrowserActivity extends ListActivity
         int mIdIdx;
         private PlaylistBrowserActivity mActivity = null;
         private AsyncQueryHandler mQueryHandler;
+        private String mConstraint = null;
+        private boolean mConstraintIsValid = false;
 
         class QueryHandler extends AsyncQueryHandler {
             QueryHandler(ContentResolver res) {
@@ -585,7 +587,16 @@ public class PlaylistBrowserActivity extends ListActivity
         
         @Override
         public Cursor runQueryOnBackgroundThread(CharSequence constraint) {
-            return mActivity.getPlaylistCursor(null, constraint.toString());
+            String s = constraint.toString();
+            if (mConstraintIsValid && (
+                    (s == null && mConstraint == null) ||
+                    (s != null && s.equals(mConstraint)))) {
+                return getCursor();
+            }
+            Cursor c = mActivity.getPlaylistCursor(null, s);
+            mConstraint = s;
+            mConstraintIsValid = true;
+            return c;
         }
     }
     
index e44f814..2a482ae 100644 (file)
@@ -289,6 +289,8 @@ public class QueryBrowserActivity extends ListActivity implements MusicUtils.Def
     static class QueryListAdapter extends SimpleCursorAdapter {
         private QueryBrowserActivity mActivity = null;
         private AsyncQueryHandler mQueryHandler;
+        private String mConstraint = null;
+        private boolean mConstraintIsValid = false;
 
         class QueryHandler extends AsyncQueryHandler {
             QueryHandler(ContentResolver res) {
@@ -400,7 +402,16 @@ public class QueryBrowserActivity extends ListActivity implements MusicUtils.Def
         }
         @Override
         public Cursor runQueryOnBackgroundThread(CharSequence constraint) {
-            return mActivity.getQueryCursor(null, constraint.toString());
+            String s = constraint.toString();
+            if (mConstraintIsValid && (
+                    (s == null && mConstraint == null) ||
+                    (s != null && s.equals(mConstraint)))) {
+                return getCursor();
+            }
+            Cursor c = mActivity.getQueryCursor(null, s);
+            mConstraint = s;
+            mConstraintIsValid = true;
+            return c;
         }
     }
 
index 389bb1d..58f556c 100644 (file)
@@ -147,18 +147,6 @@ public class TrackBrowserActivity extends ListActivity
                 MediaStore.Audio.Playlists.Members.AUDIO_ID
         };
 
-        MusicUtils.bindToService(this, this);
-    }
-
-    public void onServiceConnected(ComponentName name, IBinder service)
-    {
-        IntentFilter f = new IntentFilter();
-        f.addAction(Intent.ACTION_MEDIA_SCANNER_STARTED);
-        f.addAction(Intent.ACTION_MEDIA_SCANNER_FINISHED);
-        f.addAction(Intent.ACTION_MEDIA_UNMOUNTED);
-        f.addDataScheme("file");
-        registerReceiver(mScanListener, f);
-
         setContentView(R.layout.media_picker_activity);
         mTrackList = getListView();
         mTrackList.setOnCreateContextMenuListener(this);
@@ -171,6 +159,23 @@ public class TrackBrowserActivity extends ListActivity
             mTrackList.setTextFilterEnabled(true);
         }
         mAdapter = (TrackListAdapter) getLastNonConfigurationInstance();
+        
+        if (mAdapter != null) {
+            mAdapter.setActivity(this);
+            setListAdapter(mAdapter);
+        }
+        MusicUtils.bindToService(this, this);
+    }
+
+    public void onServiceConnected(ComponentName name, IBinder service)
+    {
+        IntentFilter f = new IntentFilter();
+        f.addAction(Intent.ACTION_MEDIA_SCANNER_STARTED);
+        f.addAction(Intent.ACTION_MEDIA_SCANNER_FINISHED);
+        f.addAction(Intent.ACTION_MEDIA_UNMOUNTED);
+        f.addDataScheme("file");
+        registerReceiver(mScanListener, f);
+
         if (mAdapter == null) {
             //Log.i("@@@", "starting query");
             mAdapter = new TrackListAdapter(
@@ -187,8 +192,6 @@ public class TrackBrowserActivity extends ListActivity
             setTitle(R.string.working_songs);
             getTrackCursor(mAdapter.getQueryHandler(), null);
         } else {
-            mAdapter.setActivity(this);
-            setListAdapter(mAdapter);
             mTrackCursor = mAdapter.getCursor();
             // If mTrackCursor is null, this can be because it doesn't have
             // a cursor yet (because the initial query that sets its cursor
@@ -1255,6 +1258,8 @@ public class TrackBrowserActivity extends ListActivity
         
         private TrackBrowserActivity mActivity = null;
         private AsyncQueryHandler mQueryHandler;
+        private String mConstraint = null;
+        private boolean mConstraintIsValid = false;
         
         class ViewHolder {
             TextView line1;
@@ -1421,7 +1426,16 @@ public class TrackBrowserActivity extends ListActivity
         
         @Override
         public Cursor runQueryOnBackgroundThread(CharSequence constraint) {
-            return mActivity.getTrackCursor(null, constraint.toString());
+            String s = constraint.toString();
+            if (mConstraintIsValid && (
+                    (s == null && mConstraint == null) ||
+                    (s != null && s.equals(mConstraint)))) {
+                return getCursor();
+            }
+            Cursor c = mActivity.getTrackCursor(null, s);
+            mConstraint = s;
+            mConstraintIsValid = true;
+            return c;
         }
         
         // SectionIndexer methods
index abd3cae..f5f5d48 100644 (file)
@@ -54,8 +54,8 @@ public class MusicPlayerNames {
     public static int NO_SKIPPING_SONGS = 500;
     
     public static final String DELETESONG = "/sdcard/toBeDeleted.amr"; 
-    public static final String GOLDENSONG = "/sdcard/music/AMRNB.amr";
+    public static final String GOLDENSONG = "/sdcard/media_api/music/AMRNB.amr";
     public static final String TOBEDELETESONGNAME = "toBeDeleted";   
     
-    public static int EXPECTED_NO_RINGTONE = 23;
+    public static int EXPECTED_NO_RINGTONE = 1;
 }