From 6336934c49336270f773acd0e2a36a8f1745c38c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 6 Nov 2014 09:53:14 -0500 Subject: [PATCH] Android: Disallow explicit instantiation of utility classes --- .../src/com/retroarch/browser/NativeInterface.java | 12 +++++++++--- .../browser/preferences/util/UserPreferences.java | 5 +++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/android/phoenix/src/com/retroarch/browser/NativeInterface.java b/android/phoenix/src/com/retroarch/browser/NativeInterface.java index 31f16f5d6a..f266eadca1 100644 --- a/android/phoenix/src/com/retroarch/browser/NativeInterface.java +++ b/android/phoenix/src/com/retroarch/browser/NativeInterface.java @@ -3,12 +3,18 @@ package com.retroarch.browser; /** * Helper class which calls into JNI for various tasks. */ -public final class NativeInterface { - - static { +public final class NativeInterface +{ + static + { System.loadLibrary("retroarch-jni"); } + // Disallow explicit instantiation. + private NativeInterface() + { + } + public static native boolean extractArchiveTo(String archive, String subDirectory, String destinationFolder); } diff --git a/android/phoenix/src/com/retroarch/browser/preferences/util/UserPreferences.java b/android/phoenix/src/com/retroarch/browser/preferences/util/UserPreferences.java index 4aeed6feea..1ba05359e6 100644 --- a/android/phoenix/src/com/retroarch/browser/preferences/util/UserPreferences.java +++ b/android/phoenix/src/com/retroarch/browser/preferences/util/UserPreferences.java @@ -26,6 +26,11 @@ public final class UserPreferences // Logging tag. private static final String TAG = "UserPreferences"; + // Disallow explicit instantiation. + private UserPreferences() + { + } + /** * Retrieves the path to the default location of the libretro config. *