[Android] Restore loop not needed anymore and causing UI bug

Geoffrey Métais git at videolan.org
Tue Feb 10 11:09:37 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb  9 11:57:58 2015 +0100| [cb7ac396353506d5c9537ec0cda5c7b43abf13ac] | committer: Geoffrey Métais

Restore loop not needed anymore and causing UI bug

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

 vlc-android/src/org/videolan/vlc/gui/MainActivity.java |   14 --------------
 1 file changed, 14 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index d7b62de..b0570df 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -318,20 +318,6 @@ public class MainActivity extends ActionBarActivity implements OnItemClickListen
         }
 
         /**
-         * Let's see if Android recreated anything for us in the bundle.
-         * Prevent duplicate creation of fragments, since mSidebarAdapter might
-         * have been purged (losing state) when this activity was killed.
-         */
-        for(int i = 0; i < SidebarAdapter.entries.size(); i++) {
-            String fragmentTag = SidebarAdapter.entries.get(i).id;
-            Fragment fragment = getSupportFragmentManager().findFragmentByTag(fragmentTag);
-            if(fragment != null) {
-                Log.d(TAG, "Restoring automatically recreated fragment \"" + fragmentTag + "\"");
-                mSidebarAdapter.restoreFragment(fragmentTag, fragment);
-            }
-        }
-
-        /**
          * Restore the last view.
          *
          * Replace:



More information about the Android mailing list