[Android] Cosmetic change

Geoffrey Métais git at videolan.org
Tue Jul 18 14:21:48 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jul 18 14:15:19 2017 +0200| [89d13cc8c290d1b0abb61972a703a2cba72ff5be] | committer: Geoffrey Métais

Cosmetic change

> https://code.videolan.org/videolan/vlc-android/commit/89d13cc8c290d1b0abb61972a703a2cba72ff5be
---

 .../org/videolan/vlc/gui/SecondaryActivity.java    | 33 +++++++++++++---------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.java b/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.java
index 66ee655ba..5118d94bd 100644
--- a/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.java
@@ -136,20 +136,25 @@ public class SecondaryActivity extends AudioPlayerContainerActivity {
     }
 
     public void fetchSecondaryFragment(String id) {
-        if (id.equals(ALBUMS_SONGS)) {
-            mFragment = new AudioAlbumsSongsFragment();
-            Bundle args = new Bundle();
-            args.putParcelable(AudioBrowserFragment.TAG_ITEM, getIntent().getParcelableExtra(AudioBrowserFragment.TAG_ITEM));
-            mFragment.setArguments(args);
-        } else if(id.equals(ABOUT)) {
-            mFragment = new AboutFragment();
-        } else if(id.equals(VIDEO_GROUP_LIST)) {
-            mFragment = new VideoGridFragment();
-            ((VideoGridFragment) mFragment).setGroup(getIntent().getStringExtra("param"));
-        } else if (id.equals(STORAGE_BROWSER)){
-            mFragment = new StorageBrowserFragment();
-        } else {
-            throw new IllegalArgumentException("Wrong fragment id.");
+        switch (id) {
+            case ALBUMS_SONGS:
+                mFragment = new AudioAlbumsSongsFragment();
+                Bundle args = new Bundle();
+                args.putParcelable(AudioBrowserFragment.TAG_ITEM, getIntent().getParcelableExtra(AudioBrowserFragment.TAG_ITEM));
+                mFragment.setArguments(args);
+                break;
+            case ABOUT:
+                mFragment = new AboutFragment();
+                break;
+            case VIDEO_GROUP_LIST:
+                mFragment = new VideoGridFragment();
+                ((VideoGridFragment) mFragment).setGroup(getIntent().getStringExtra("param"));
+                break;
+            case STORAGE_BROWSER:
+                mFragment = new StorageBrowserFragment();
+                break;
+            default:
+                throw new IllegalArgumentException("Wrong fragment id.");
         }
     }
 }



More information about the Android mailing list