[Android] [PATCH 1/2] VLCApplication: deprecate runBackground

Thomas Guillem thomas at gllm.fr
Wed Jun 22 23:11:26 CEST 2016


---
 vlc-android/src/org/videolan/vlc/VLCApplication.java | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/VLCApplication.java b/vlc-android/src/org/videolan/vlc/VLCApplication.java
index 613fd86..d501133 100644
--- a/vlc-android/src/org/videolan/vlc/VLCApplication.java
+++ b/vlc-android/src/org/videolan/vlc/VLCApplication.java
@@ -165,10 +165,17 @@ public class VLCApplication extends Application {
         return sTV || mSettings.getBoolean("tv_ui", false);
     }
 
+    /*
+     * @deprecated
+     * Use an Android AsyncTask instead. This class allows to perform background operations and
+     * publish results on the UI thread without having to manipulate threads and/or handlers.
+     */
+    @Deprecated
     public static void runBackground(Runnable runnable) {
         instance.mThreadPool.execute(runnable);
     }
 
+    @Deprecated
     public static boolean removeTask(Runnable runnable) {
         return instance.mThreadPool.remove(runnable);
     }
-- 
2.8.1



More information about the Android mailing list