[Android] Tune app launch
Geoffrey Métais
git at videolan.org
Thu Mar 15 12:02:25 CET 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Mar 15 12:02:11 2018 +0100| [ebf2006c3168e60eec206b6c8a1436e98149efda] | committer: Geoffrey Métais
Tune app launch
> https://code.videolan.org/videolan/vlc-android/commit/ebf2006c3168e60eec206b6c8a1436e98149efda
---
vlc-android/src/org/videolan/vlc/VLCApplication.java | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/VLCApplication.java b/vlc-android/src/org/videolan/vlc/VLCApplication.java
index 77a65a3e2..d22365c46 100644
--- a/vlc-android/src/org/videolan/vlc/VLCApplication.java
+++ b/vlc-android/src/org/videolan/vlc/VLCApplication.java
@@ -86,11 +86,19 @@ public class VLCApplication extends Application {
private static int sDialogCounter = 0;
+ public VLCApplication() {
+ super();
+ instance = this;
+ }
+
@Override
public void onCreate() {
- instance = this;
super.onCreate();
sSettings = PreferenceManager.getDefaultSharedPreferences(this);
+ sTV = AndroidDevices.isAndroidTv || (!AndroidDevices.isChromeBook && !AndroidDevices.hasTsp);
+
+ // Disable remote control receiver on Fire TV.
+ if (!AndroidDevices.hasTsp) AndroidDevices.setRemoteControlReceiverEnabled(false);
setLocale();
@@ -102,14 +110,8 @@ public class VLCApplication extends Application {
// Prepare cache folder constants
AudioUtil.prepareCacheFolder(instance);
- sTV = AndroidDevices.isAndroidTv || (!AndroidDevices.isChromeBook && !AndroidDevices.hasTsp);
-
if (!VLCInstance.testCompatibleCPU(instance)) return;
Dialog.setCallbacks(VLCInstance.get(), mDialogCallbacks);
-
- // Disable remote control receiver on Fire TV.
- if (!AndroidDevices.hasTsp)
- AndroidDevices.setRemoteControlReceiverEnabled(false);
}
});
More information about the Android
mailing list