Fixed bug in the mediaplayer
This commit is contained in:
parent
d8d4d28602
commit
7cd38e53a7
|
@ -21,7 +21,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:text="left" />
|
android:text="@string/position_default_label" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtvLength"
|
android:id="@+id/txtvLength"
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:text="right" />
|
android:text="@string/position_default_label" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtvStatus"
|
android:id="@+id/txtvStatus"
|
||||||
|
|
|
@ -58,4 +58,5 @@
|
||||||
<string name="mark_all_read_label">Mark all read</string>
|
<string name="mark_all_read_label">Mark all read</string>
|
||||||
<string name="show_info_label">Show information</string>
|
<string name="show_info_label">Show information</string>
|
||||||
<string name="remove_feed_label">Remove Feed</string>
|
<string name="remove_feed_label">Remove Feed</string>
|
||||||
|
<string name="position_default_label">00:00:00</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -59,8 +59,16 @@ public class MediaplayerActivity extends SherlockActivity {
|
||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
Log.d(TAG, "Activity stopped");
|
Log.d(TAG, "Activity stopped");
|
||||||
|
try {
|
||||||
unregisterReceiver(statusUpdate);
|
unregisterReceiver(statusUpdate);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
try {
|
||||||
unbindService(mConnection);
|
unbindService(mConnection);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
if (positionObserver != null) {
|
if (positionObserver != null) {
|
||||||
positionObserver.cancel(true);
|
positionObserver.cancel(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue