[Android] Bind/unbind are designed for activities, it should not be used on fragments .

Sébastien Toque git at videolan.org
Fri Jun 22 00:06:41 CEST 2012


android | branch: master | Sébastien Toque <xilasz at gmail.com> | Fri Jun 22 00:04:15 2012 +0200| [1de7c78d6fb9c2d1f027fa2ed102a0d7cc1e4b49] | committer: Sébastien Toque

Bind/unbind are designed for activities, it should not be used on fragments.

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=1de7c78d6fb9c2d1f027fa2ed102a0d7cc1e4b49
---

 .../src/org/videolan/vlc/gui/audio/AudioListFragment.java  |   12 ------------
 1 file changed, 12 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java
index 01181d4..f1d2199 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java
@@ -102,18 +102,6 @@ public class AudioListFragment extends SherlockListFragment {
     }
 
     @Override
-    public void onResume() {
-        AudioServiceController.getInstance().bindAudioService(getActivity());
-        super.onResume();
-    }
-
-    @Override
-    public void onPause() {
-        AudioServiceController.getInstance().unbindAudioService(getActivity());
-        super.onPause();
-    }
-
-    @Override
     public void onDestroy() {
         mMediaLibrary.removeUpdateHandler(mHandler);
         mSongsAdapter.clear();



More information about the Android mailing list