[Android] Simplification

Ludovic Fauvet git at videolan.org
Wed May 29 14:27:50 CEST 2013


vlc-ports/android | branch: master | Ludovic Fauvet <etix at videolan.org> | Wed May 29 14:08:30 2013 +0200| [6592ef8cae0043dae7811f573f09f16d0e687efe] | committer: Ludovic Fauvet

Simplification

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=6592ef8cae0043dae7811f573f09f16d0e687efe
---

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 89e1901..456f985 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -53,6 +53,7 @@ import android.os.Bundle;
 import android.os.Handler;
 import android.preference.PreferenceManager;
 import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentTransaction;
 import android.util.Log;
 import android.view.Display;
@@ -203,9 +204,7 @@ public class MainActivity extends SherlockFragmentActivity {
                  * activating an old backstack, when a user hits the back button
                  * to quit
                  */
-                for(int i = 0; i < getSupportFragmentManager().getBackStackEntryCount(); i++) {
-                    getSupportFragmentManager().popBackStack();
-                }
+                getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
 
                 /**
                  * Do not move this getFragment("audio")!



More information about the Android mailing list