Skip to content
Snippets Groups Projects
Commit 01e36e7d authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Fix cast of Application instance

parent 6a5075f4
No related branches found
No related tags found
No related merge requests found
Pipeline #5594 passed with stage
in 3 minutes and 51 seconds
......@@ -58,7 +58,7 @@ public class VLCApplication extends Application {
public final static String TAG = "VLC/VLCApplication";
public final static String ACTION_MEDIALIBRARY_READY = "VLC/VLCApplication";
private static volatile VLCApplication instance;
private static volatile Application instance;
public final static String SLEEP_INTENT = Strings.buildPkgString("SleepIntent");
......@@ -143,7 +143,7 @@ public class VLCApplication extends Application {
if (instance != null) return instance;
else {
try {
instance = (VLCApplication) Class.forName("android.app.ActivityThread").getDeclaredMethod("currentApplication").invoke(null);
instance = (Application) Class.forName("android.app.ActivityThread").getDeclaredMethod("currentApplication").invoke(null);
} catch (IllegalAccessException ignored) {}
catch (InvocationTargetException ignored) {}
catch (NoSuchMethodException ignored) {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment