Fixed bug in the mediaplayer

This commit is contained in:
daniel oeh 2012-06-24 13:01:44 +02:00
parent d8d4d28602
commit 7cd38e53a7
3 changed files with 14 additions and 5 deletions

View File

@ -21,7 +21,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="left" />
android:text="@string/position_default_label" />
<TextView
android:id="@+id/txtvLength"
@ -29,7 +29,7 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="right" />
android:text="@string/position_default_label" />
<TextView
android:id="@+id/txtvStatus"

View File

@ -58,4 +58,5 @@
<string name="mark_all_read_label">Mark all read</string>
<string name="show_info_label">Show information</string>
<string name="remove_feed_label">Remove Feed</string>
<string name="position_default_label">00:00:00</string>
</resources>

View File

@ -59,8 +59,16 @@ public class MediaplayerActivity extends SherlockActivity {
protected void onStop() {
super.onStop();
Log.d(TAG, "Activity stopped");
try {
unregisterReceiver(statusUpdate);
} catch (IllegalArgumentException e) {
// ignore
}
try {
unbindService(mConnection);
} catch (IllegalArgumentException e) {
// ignore
}
if (positionObserver != null) {
positionObserver.cancel(true);
}