195 Commits

Author SHA1 Message Date
Christopher Eby
696e65a18a Cancel the notification through updateState on service destruction
The avoids a flicker to the paused notification if destroyed while playing
2010-03-21 17:43:32 -05:00
Christopher Eby
1d629c7fa2 Update the notification properly when the song changes
Clearly I don't look at the notification very often :)
2010-03-21 17:41:45 -05:00
Christopher Eby
f19927e97e Increase the double-tap time for the widget
This really just needs to be a long press... but I don't think there is any way
to accomplish this inside a RemoteView
2010-03-21 17:31:49 -05:00
Christopher Eby
0542c93faf Don't clear covers on stop 2010-03-21 17:21:29 -05:00
Christopher Eby
c5bf6837c0 Move common setService code into PlaybackActivity
This removes the condition where the mini activity finishes when the service is
set to null. I'm not aware of any time this actually occurs, anyway...
2010-03-21 17:19:03 -05:00
Christopher Eby
e6412a9001 Simplify the way the message overlay works
Take advantage of addContentView and just leave the view around when done with
it; it's not too heavy
2010-03-21 17:10:10 -05:00
Christopher Eby
9e1aff4645 Fix some crashers that show up with no media
Because I never seem to test this code path :)
2010-03-21 17:08:44 -05:00
Christopher Eby
8b9e7a63b7 Rename the main activities to be more consitent
NowPlayingActivity -> FullPlaybackActivity
RemoteActivity -> MiniPlaybackActivity

Also renamed referenced layouts and move the MiniPlaybackActivity layout inside
the main activity file
2010-03-21 16:43:52 -05:00
Christopher Eby
4a24644485 Defer some service startup code
The main advantage to this is the notification will now be executed after any
pending go messages are sent; there won't be a sudden change in the notification
when a play message is sent on startup
2010-03-21 16:29:02 -05:00
Christopher Eby
d936e35483 Don't worry about unsetting the service in unbindService
This isn't necessary now that this only occurs when the activity finishes
2010-03-21 16:26:30 -05:00
Christopher Eby
ff91e51451 Just look for the handler on startup instead of a custom variable
We depend on mHandler to begin with, so the variable could cause trouble
2010-03-21 16:23:52 -05:00
Christopher Eby
a091aabc31 Move quit to ContextApplication 2010-03-21 16:15:00 -05:00
Christopher Eby
41e63e331f Make SongSelector a dialog
This prevents the NowPlayingActivity from being stopped, so the covers will
update in the background when a song is selected in the song selector.
2010-03-21 16:12:17 -05:00
Christopher Eby
adfbe7f78e Set state to paused on service destruction 2010-03-20 19:33:38 -05:00
Christopher Eby
09070cd065 Allow the widget to start the playback service 2010-03-20 19:33:13 -05:00
Christopher Eby
bae99ac33f Update the notification on initial load 2010-03-20 19:06:21 -05:00
Christopher Eby
d1aa74df89 Remove SongData.Field 2010-03-20 18:47:53 -05:00
Christopher Eby
6878e6e37a Don't hide MediaViews when we are not going to reshow them 2010-03-20 17:52:44 -05:00
Christopher Eby
2dcb8eb0e4 Add an expand menu action 2010-03-20 17:21:52 -05:00
Christopher Eby
5fda18dc67 Remove unneeded use of SongData.Field 2010-03-20 16:55:14 -05:00
Christopher Eby
cb013cc51e Integrate MediaView into MediaAdapter 2010-03-20 16:50:06 -05:00
Christopher Eby
9b7254cd5c Replace the stop service function with an exit function 2010-03-20 16:14:15 -05:00
Christopher Eby
cc953001b8 Set a foreground image instead of background image in the widget
This has proper scaling and can be set in RemoteViews. Curiously, it requires
that the transparent placeholder be the same size as the icon---the image size
doesn't seem to be updated when the drawable state changes
2010-03-20 15:24:16 -05:00
Christopher Eby
5fde2d3b82 Enable seeking while paused
I am not too sure why I had this disabled to begin with
2010-03-20 00:30:26 -05:00
Christopher Eby
7f3dd9544d Make updateState thread-safe 2010-03-19 23:54:06 -05:00
Christopher Eby
827a626895 Relocate scrobbling code 2010-03-19 10:27:45 -05:00
Christopher Eby
32ce1f7120 Update widget play/pause icon according to state 2010-03-18 20:19:53 -05:00
Christopher Eby
18f1f7b8a7 Initialize the widget even when the service is dead 2010-03-18 20:00:23 -05:00
Christopher Eby
eb88179297 Don't crash when the service is already disconnected and update state to allow reconnection 2010-03-18 19:59:06 -05:00
Christopher Eby
adde0a4e95 Split service state handling code into discrete class 2010-03-18 19:49:11 -05:00
Christopher Eby
11d175cb94 Listen for song change in AppWidgetProvider 2010-03-18 19:33:01 -05:00
Christopher Eby
4acc55f25b Convert MediaView into a single view 2010-03-18 08:42:56 -05:00
Christopher Eby
35181cc141 Ignore case in comparisons 2010-03-18 01:03:47 -05:00
Christopher Eby
dd0640fdb4 Avoid referencing issue 2010-03-18 01:00:26 -05:00
Christopher Eby
c41507ddbf Set right expander listener 2010-03-18 00:45:03 -05:00
Christopher Eby
cff0461931 Remove dead file 2010-03-18 00:42:31 -05:00
Christopher Eby
cc0320ba16 Split Song into Song and SongData 2010-03-18 00:38:49 -05:00
Christopher Eby
6bbd34952a Make limiters work again 2010-03-17 18:04:23 -05:00
Christopher Eby
ab543e3871 Combine stateChanged and songChanged events
In addition, move some of this event handling code into the
PlaybackServiceActivity superclass
2010-03-17 12:42:56 -05:00
Christopher Eby
fdc1a87301 Spin the notification off into its own class 2010-03-13 01:26:57 -06:00
Christopher Eby
7e05f88c4a Don't autoconnect to service if it was explicity stopped within the application 2010-03-12 23:42:26 -06:00
Christopher Eby
93d59aca7a Share connect service code 2010-03-12 23:23:35 -06:00
Christopher Eby
ca7fcd82c6 Long press back finish activity and disconnects from service 2010-03-12 22:45:19 -06:00
Christopher Eby
f1e7c0d425 Update the filter for all lists 2010-03-12 22:26:29 -06:00
Christopher Eby
1b1b83127c Defer to TabHost to retrieve MediaAdapters 2010-03-12 22:12:52 -06:00
Christopher Eby
ebcae9e507 Move limiters to their own layer 2010-03-11 20:29:40 -06:00
Christopher Eby
d955dd3fa6 Version 0.1 build 10 2010-03-11 02:33:49 -06:00
Christopher Eby
fa0376318d Scale the widget resolution 2010-03-11 02:08:48 -06:00
Christopher Eby
74664dbb2b Only empty the view on tab change
Previously it was done when removing a limiter which caused a brief flicker
2010-03-11 02:03:35 -06:00
Christopher Eby
03821bbae5 Avoid using getTag(id)
It's not in Android 1.5
2010-03-11 02:00:38 -06:00