[Android] Clear browser handler on user calls
Geoffrey Métais
git at videolan.org
Thu Mar 16 15:48:10 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Mar 16 15:47:11 2017 +0100| [935eaf482d15b0674fe4c141abc0ca710ed812cb] | committer: Geoffrey Métais
Clear browser handler on user calls
> https://code.videolan.org/videolan/vlc-android/commit/935eaf482d15b0674fe4c141abc0ca710ed812cb
---
.../src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
index 0a26207..1d8658c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -181,7 +181,6 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
@Override
public void onStart() {
super.onStart();
- sBrowserHandler.removeCallbacksAndMessages(null);
if (!mRoot && mFabPlay != null) {
mFabPlay.setImageResource(R.drawable.ic_fab_play);
updateFab();
@@ -255,7 +254,8 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
getActivity().finish();
}
- public void browse (MediaWrapper media, int position, boolean save){
+ public void browse (MediaWrapper media, int position, boolean save) {
+ sBrowserHandler.removeCallbacksAndMessages(null);
FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
Fragment next = createFragment();
Bundle args = new Bundle();
@@ -342,6 +342,7 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
@Override
public void refresh() {
+ sBrowserHandler.removeCallbacksAndMessages(null);
mHandler.sendEmptyMessageDelayed(BrowserFragmentHandler.MSG_SHOW_LOADING, 300);
mAdapter.clear();
runOnBrowserThread(new Runnable() {
More information about the Android
mailing list