[Android] MainActivity: code cosmetics

Jean-Baptiste Kempf git at videolan.org
Mon Jun 25 00:20:44 CEST 2012


android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Jun 25 00:15:30 2012 +0200| [3ef7a9dd6bdbe537a1e9bca992436e9e50058384] | committer: Jean-Baptiste Kempf

MainActivity: code cosmetics

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

 vlc-android/src/org/videolan/vlc/gui/MainActivity.java |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index f413545..df9c9ad 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -141,15 +141,14 @@ public class MainActivity extends SherlockFragmentActivity {
 
         /* Set up the mini audio player */
         mAudioPlayer = new AudioMiniPlayer();
-
-        FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
-        ft.replace(R.id.audio_mini_player, mAudioPlayer);
-        ft.commit();
-
         mAudioController = AudioServiceController.getInstance();
         mAudioPlayer.setAudioPlayerControl(mAudioController);
         mAudioPlayer.update();
 
+        getSupportFragmentManager().beginTransaction()
+            .replace(R.id.audio_mini_player, mAudioPlayer)
+            .commit();
+
         /* Show info/alpha/beta Warning */
         PackageInfo pinfo = null;
         try {



More information about the Android mailing list