[Android] Remove redundant call

Geoffrey Métais git at videolan.org
Wed May 31 13:39:39 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed May 31 11:48:48 2017 +0200| [5fb9bf64021c9f5ec8d8cf86164bd4a4aeff7d66] | committer: Geoffrey Métais

Remove redundant call

> https://code.videolan.org/videolan/vlc-android/commit/5fb9bf64021c9f5ec8d8cf86164bd4a4aeff7d66
---

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
index 4ab7f55a5..8a5c924f2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
@@ -130,8 +130,9 @@ public class NetworkBrowserFragment extends BaseBrowserFragment {
                 }
             });
         else {
-            if (!mAdapter.isEmpty())
-                mAdapter.removeItem(mAdapter.getItemCount() - 1);
+            int itemCount = mAdapter.getItemCount();
+            if (itemCount > 0)
+                mAdapter.removeItem(itemCount - 1);
             mHandler.sendEmptyMessage(BrowserFragmentHandler.MSG_HIDE_LOADING);
         }
     }



More information about the Android mailing list