[Android] Simpler call

Geoffrey Métais git at videolan.org
Thu Apr 21 14:22:13 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Apr 21 12:02:39 2016 +0200| [c2614a8f112e127c29b9bb6aeb594adca6a7be04] | committer: Geoffrey Métais

Simpler call

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 559c817..fe5d491 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -801,14 +801,10 @@ public class MainActivity extends AudioPlayerContainerActivity implements Filter
                     /* Cancel any upcoming visibility change */
                         removeMessages(ACTIVITY_SHOW_INFOLAYOUT);
                         ma.mInfoLayout.setVisibility(View.GONE);
-                    }
-                    else {
+                    } else {
                     /* Slightly delay the appearance of the progress bar to avoid unnecessary flickering */
-                        if (!hasMessages(ACTIVITY_SHOW_INFOLAYOUT)) {
-                            Message m = new Message();
-                            m.what = ACTIVITY_SHOW_INFOLAYOUT;
-                            sendMessageDelayed(m, 300);
-                        }
+                        if (!hasMessages(ACTIVITY_SHOW_INFOLAYOUT))
+                            sendEmptyMessageDelayed(ACTIVITY_SHOW_INFOLAYOUT, 300);
                     }
                     break;
             }



More information about the Android mailing list