The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.android.music; |
| 18 | |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 19 | import android.app.Activity; |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 20 | import android.content.ContentResolver; |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 21 | import android.content.Context; |
| 22 | import android.content.Intent; |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 23 | import android.content.SharedPreferences; |
| 24 | import android.content.SharedPreferences.Editor; |
| 25 | import android.content.res.Resources; |
| 26 | import android.database.Cursor; |
| 27 | import android.graphics.Bitmap; |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 28 | import android.graphics.Canvas; |
| 29 | import android.graphics.ColorFilter; |
| 30 | import android.graphics.PixelFormat; |
| 31 | import android.graphics.drawable.BitmapDrawable; |
| 32 | import android.graphics.drawable.Drawable; |
Jack He | f02d3c6 | 2017-02-21 00:39:22 -0500 | [diff] [blame] | 33 | import android.media.MediaMetadata; |
| 34 | import android.media.session.MediaController; |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 35 | import android.net.Uri; |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 36 | import android.provider.MediaStore; |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 37 | import android.view.View; |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 38 | import android.widget.TabWidget; |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 39 | import android.widget.TextView; |
Jack He | f02d3c6 | 2017-02-21 00:39:22 -0500 | [diff] [blame] | 40 | import com.android.music.utils.LogHelper; |
| 41 | import com.android.music.utils.MusicProvider; |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 42 | |
Marco Nelissen | 7a16cc7 | 2009-06-16 08:54:17 -0700 | [diff] [blame] | 43 | import java.util.Formatter; |
Jack He | f02d3c6 | 2017-02-21 00:39:22 -0500 | [diff] [blame] | 44 | import java.util.Iterator; |
Marco Nelissen | 7a16cc7 | 2009-06-16 08:54:17 -0700 | [diff] [blame] | 45 | import java.util.Locale; |
| 46 | |
Jack He | f02d3c6 | 2017-02-21 00:39:22 -0500 | [diff] [blame] | 47 | /* |
| 48 | Static methods useful for activities |
| 49 | */ |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 50 | public class MusicUtils { |
Jack He | f02d3c6 | 2017-02-21 00:39:22 -0500 | [diff] [blame] | 51 | private static final String TAG = LogHelper.makeLogTag(MusicUtils.class); |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 52 | |
Jack He | f02d3c6 | 2017-02-21 00:39:22 -0500 | [diff] [blame] | 53 | public static final String TAG_MEDIA_ID = "__MEDIA_ID"; |
| 54 | public static final String TAG_PARENT_ITEM = "__PARENT_ITEM"; |
| 55 | public static final String TAG_WITH_TABS = "__WITH_TABS"; |
| 56 | |
| 57 | // A really simple BitmapDrawable-like class, that doesn't do |
| 58 | // scaling, dithering or filtering. |
| 59 | private static class FastBitmapDrawable extends Drawable { |
| 60 | private Bitmap mBitmap; |
| 61 | public FastBitmapDrawable(Bitmap b) { |
| 62 | mBitmap = b; |
| 63 | } |
| 64 | @Override |
| 65 | public void draw(Canvas canvas) { |
| 66 | canvas.drawBitmap(mBitmap, 0, 0, null); |
| 67 | } |
| 68 | @Override |
| 69 | public int getOpacity() { |
| 70 | return PixelFormat.OPAQUE; |
| 71 | } |
| 72 | @Override |
| 73 | public void setAlpha(int alpha) {} |
| 74 | @Override |
| 75 | public void setColorFilter(ColorFilter cf) {} |
| 76 | } |
| 77 | |
| 78 | public static Bitmap resizeBitmap(Bitmap bitmap, Bitmap ref) { |
| 79 | int w = ref.getWidth(); |
| 80 | int h = ref.getHeight(); |
| 81 | return Bitmap.createScaledBitmap(bitmap, w, h, false); |
| 82 | } |
| 83 | |
| 84 | public static Drawable getDrawableBitmap(Bitmap bitmap, BitmapDrawable defaultArtwork) { |
| 85 | final Bitmap icon = defaultArtwork.getBitmap(); |
| 86 | int w = icon.getWidth(); |
| 87 | int h = icon.getHeight(); |
| 88 | bitmap = Bitmap.createScaledBitmap(bitmap, w, h, false); |
| 89 | return new FastBitmapDrawable(bitmap); |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 90 | } |
| 91 | |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 92 | public static String makeAlbumsLabel( |
| 93 | Context context, int numalbums, int numsongs, boolean isUnknown) { |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 94 | // There are two formats for the albums/songs information: |
| 95 | // "N Song(s)" - used for unknown artist/album |
| 96 | // "N Album(s)" - used for known albums |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 97 | |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 98 | StringBuilder songs_albums = new StringBuilder(); |
| 99 | |
| 100 | Resources r = context.getResources(); |
| 101 | if (isUnknown) { |
| 102 | if (numsongs == 1) { |
| 103 | songs_albums.append(context.getString(R.string.onesong)); |
| 104 | } else { |
| 105 | String f = r.getQuantityText(R.plurals.Nsongs, numsongs).toString(); |
| 106 | sFormatBuilder.setLength(0); |
| 107 | sFormatter.format(f, Integer.valueOf(numsongs)); |
| 108 | songs_albums.append(sFormatBuilder); |
| 109 | } |
| 110 | } else { |
| 111 | String f = r.getQuantityText(R.plurals.Nalbums, numalbums).toString(); |
| 112 | sFormatBuilder.setLength(0); |
| 113 | sFormatter.format(f, Integer.valueOf(numalbums)); |
| 114 | songs_albums.append(sFormatBuilder); |
| 115 | songs_albums.append(context.getString(R.string.albumsongseparator)); |
| 116 | } |
| 117 | return songs_albums.toString(); |
| 118 | } |
| 119 | |
| 120 | /** |
| 121 | * This is now only used for the query screen |
| 122 | */ |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 123 | public static String makeAlbumsSongsLabel( |
| 124 | Context context, int numalbums, int numsongs, boolean isUnknown) { |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 125 | // There are several formats for the albums/songs information: |
| 126 | // "1 Song" - used if there is only 1 song |
| 127 | // "N Songs" - used for the "unknown artist" item |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 128 | // "1 Album"/"N Songs" |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 129 | // "N Album"/"M Songs" |
| 130 | // Depending on locale, these may need to be further subdivided |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 131 | |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 132 | StringBuilder songs_albums = new StringBuilder(); |
| 133 | |
| 134 | if (numsongs == 1) { |
| 135 | songs_albums.append(context.getString(R.string.onesong)); |
| 136 | } else { |
| 137 | Resources r = context.getResources(); |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 138 | if (!isUnknown) { |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 139 | String f = r.getQuantityText(R.plurals.Nalbums, numalbums).toString(); |
| 140 | sFormatBuilder.setLength(0); |
| 141 | sFormatter.format(f, Integer.valueOf(numalbums)); |
| 142 | songs_albums.append(sFormatBuilder); |
| 143 | songs_albums.append(context.getString(R.string.albumsongseparator)); |
| 144 | } |
| 145 | String f = r.getQuantityText(R.plurals.Nsongs, numsongs).toString(); |
| 146 | sFormatBuilder.setLength(0); |
| 147 | sFormatter.format(f, Integer.valueOf(numsongs)); |
| 148 | songs_albums.append(sFormatBuilder); |
| 149 | } |
| 150 | return songs_albums.toString(); |
| 151 | } |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 152 | |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 153 | /* Try to use String.format() as little as possible, because it creates a |
| 154 | * new Formatter every time you call it, which is very inefficient. |
| 155 | * Reusing an existing Formatter more than tripled the speed of |
| 156 | * makeTimeString(). |
| 157 | * This Formatter/StringBuilder are also used by makeAlbumSongsLabel() |
| 158 | */ |
| 159 | private static StringBuilder sFormatBuilder = new StringBuilder(); |
| 160 | private static Formatter sFormatter = new Formatter(sFormatBuilder, Locale.getDefault()); |
| 161 | private static final Object[] sTimeArgs = new Object[5]; |
| 162 | |
| 163 | public static String makeTimeString(Context context, long secs) { |
Marco Nelissen | 1e5a567 | 2009-09-02 11:09:15 -0700 | [diff] [blame] | 164 | String durationformat = context.getString( |
| 165 | secs < 3600 ? R.string.durationformatshort : R.string.durationformatlong); |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 166 | |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 167 | /* Provide multiple arguments so the format can be changed easily |
| 168 | * by modifying the xml. |
| 169 | */ |
| 170 | sFormatBuilder.setLength(0); |
| 171 | |
| 172 | final Object[] timeArgs = sTimeArgs; |
| 173 | timeArgs[0] = secs / 3600; |
| 174 | timeArgs[1] = secs / 60; |
| 175 | timeArgs[2] = (secs / 60) % 60; |
| 176 | timeArgs[3] = secs; |
| 177 | timeArgs[4] = secs % 60; |
| 178 | |
| 179 | return sFormatter.format(durationformat, timeArgs).toString(); |
| 180 | } |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 181 | |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 182 | static int getIntPref(Context context, String name, int def) { |
| 183 | SharedPreferences prefs = |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 184 | context.getSharedPreferences(context.getPackageName(), Context.MODE_PRIVATE); |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 185 | return prefs.getInt(name, def); |
| 186 | } |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 187 | |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 188 | static void setIntPref(Context context, String name, int value) { |
| 189 | SharedPreferences prefs = |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 190 | context.getSharedPreferences(context.getPackageName(), Context.MODE_PRIVATE); |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 191 | Editor ed = prefs.edit(); |
| 192 | ed.putInt(name, value); |
Brad Fitzpatrick | 14c3cae | 2010-09-10 09:38:57 -0700 | [diff] [blame] | 193 | SharedPreferencesCompat.apply(ed); |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 194 | } |
| 195 | |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 196 | static int sActiveTabIndex = -1; |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 197 | |
Marco Nelissen | 19cea9e | 2009-12-14 15:59:30 -0800 | [diff] [blame] | 198 | static boolean updateButtonBar(Activity a, int highlight) { |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 199 | final TabWidget ll = (TabWidget) a.findViewById(R.id.buttonbar); |
| 200 | boolean withtabs = false; |
| 201 | Intent intent = a.getIntent(); |
| 202 | if (intent != null) { |
Jack He | f02d3c6 | 2017-02-21 00:39:22 -0500 | [diff] [blame] | 203 | withtabs = intent.getBooleanExtra(MusicUtils.TAG_WITH_TABS, false); |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 204 | } |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 205 | |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 206 | if (highlight == 0 || !withtabs) { |
| 207 | ll.setVisibility(View.GONE); |
Marco Nelissen | 19cea9e | 2009-12-14 15:59:30 -0800 | [diff] [blame] | 208 | return withtabs; |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 209 | } else if (withtabs) { |
| 210 | ll.setVisibility(View.VISIBLE); |
| 211 | } |
| 212 | for (int i = ll.getChildCount() - 1; i >= 0; i--) { |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 213 | View v = ll.getChildAt(i); |
| 214 | boolean isActive = (v.getId() == highlight); |
| 215 | if (isActive) { |
| 216 | ll.setCurrentTab(i); |
| 217 | sActiveTabIndex = i; |
| 218 | } |
Jeff Hamilton | 333bf19 | 2009-12-14 00:48:30 -0600 | [diff] [blame] | 219 | v.setTag(i); |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 220 | v.setOnFocusChangeListener(new View.OnFocusChangeListener() { |
| 221 | |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 222 | public void onFocusChange(View v, boolean hasFocus) { |
| 223 | if (hasFocus) { |
| 224 | for (int i = 0; i < ll.getTabCount(); i++) { |
| 225 | if (ll.getChildTabViewAt(i) == v) { |
| 226 | ll.setCurrentTab(i); |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 227 | processTabClick((Activity) ll.getContext(), v, |
| 228 | ll.getChildAt(sActiveTabIndex).getId()); |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 229 | break; |
| 230 | } |
| 231 | } |
| 232 | } |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 233 | } |
| 234 | }); |
| 235 | |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 236 | v.setOnClickListener(new View.OnClickListener() { |
| 237 | |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 238 | public void onClick(View v) { |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 239 | processTabClick( |
| 240 | (Activity) ll.getContext(), v, ll.getChildAt(sActiveTabIndex).getId()); |
| 241 | } |
| 242 | }); |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 243 | } |
Marco Nelissen | 19cea9e | 2009-12-14 15:59:30 -0800 | [diff] [blame] | 244 | return withtabs; |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 245 | } |
| 246 | |
| 247 | static void processTabClick(Activity a, View v, int current) { |
| 248 | int id = v.getId(); |
| 249 | if (id == current) { |
| 250 | return; |
| 251 | } |
Jeff Hamilton | 333bf19 | 2009-12-14 00:48:30 -0600 | [diff] [blame] | 252 | |
| 253 | final TabWidget ll = (TabWidget) a.findViewById(R.id.buttonbar); |
Jeff Hamilton | 333bf19 | 2009-12-14 00:48:30 -0600 | [diff] [blame] | 254 | |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 255 | activateTab(a, id); |
| 256 | if (id != R.id.nowplayingtab) { |
Marco Nelissen | 38bcd92 | 2010-03-19 13:00:37 -0700 | [diff] [blame] | 257 | ll.setCurrentTab((Integer) v.getTag()); |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 258 | setIntPref(a, "activetab", id); |
| 259 | } |
| 260 | } |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 261 | |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 262 | static void activateTab(Activity a, int id) { |
| 263 | Intent intent = new Intent(Intent.ACTION_PICK); |
| 264 | switch (id) { |
| 265 | case R.id.artisttab: |
| 266 | intent.setDataAndType(Uri.EMPTY, "vnd.android.cursor.dir/artistalbum"); |
| 267 | break; |
| 268 | case R.id.albumtab: |
| 269 | intent.setDataAndType(Uri.EMPTY, "vnd.android.cursor.dir/album"); |
| 270 | break; |
| 271 | case R.id.songtab: |
| 272 | intent.setDataAndType(Uri.EMPTY, "vnd.android.cursor.dir/track"); |
| 273 | break; |
| 274 | case R.id.playlisttab: |
| 275 | intent.setDataAndType(Uri.EMPTY, MediaStore.Audio.Playlists.CONTENT_TYPE); |
| 276 | break; |
| 277 | case R.id.nowplayingtab: |
| 278 | intent = new Intent(a, MediaPlaybackActivity.class); |
| 279 | a.startActivity(intent); |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 280 | // fall through and return |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 281 | default: |
| 282 | return; |
| 283 | } |
Jack He | f02d3c6 | 2017-02-21 00:39:22 -0500 | [diff] [blame] | 284 | intent.putExtra(MusicUtils.TAG_WITH_TABS, true); |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 285 | intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); |
| 286 | a.startActivity(intent); |
| 287 | a.finish(); |
| 288 | a.overridePendingTransition(0, 0); |
| 289 | } |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 290 | |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 291 | static void updateNowPlaying(Activity a) { |
| 292 | View nowPlayingView = a.findViewById(R.id.nowplaying); |
| 293 | if (nowPlayingView == null) { |
| 294 | return; |
| 295 | } |
Jack He | f02d3c6 | 2017-02-21 00:39:22 -0500 | [diff] [blame] | 296 | MediaController controller = a.getMediaController(); |
| 297 | if (controller != null) { |
| 298 | MediaMetadata metadata = controller.getMetadata(); |
| 299 | if (metadata != null) { |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 300 | TextView title = (TextView) nowPlayingView.findViewById(R.id.title); |
| 301 | TextView artist = (TextView) nowPlayingView.findViewById(R.id.artist); |
Jack He | f02d3c6 | 2017-02-21 00:39:22 -0500 | [diff] [blame] | 302 | title.setText(metadata.getString(MediaMetadata.METADATA_KEY_TITLE)); |
| 303 | String artistName = metadata.getString(MediaMetadata.METADATA_KEY_ARTIST); |
| 304 | if (MusicProvider.UNKOWN.equals(artistName)) { |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 305 | artistName = a.getString(R.string.unknown_artist_name); |
| 306 | } |
| 307 | artist.setText(artistName); |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 308 | nowPlayingView.setVisibility(View.VISIBLE); |
| 309 | nowPlayingView.setOnClickListener(new View.OnClickListener() { |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 310 | public void onClick(View v) { |
| 311 | Context c = v.getContext(); |
| 312 | c.startActivity(new Intent(c, MediaPlaybackActivity.class)); |
Jack He | b0fba8b | 2017-01-26 15:54:38 -0800 | [diff] [blame] | 313 | } |
| 314 | }); |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 315 | return; |
| 316 | } |
Marco Nelissen | ec0c57a | 2009-12-12 12:27:11 -0800 | [diff] [blame] | 317 | } |
| 318 | nowPlayingView.setVisibility(View.GONE); |
| 319 | } |
The Android Open Source Project | 792a220 | 2009-03-03 19:32:30 -0800 | [diff] [blame] | 320 | } |