Android: Disallow explicit instantiation of utility classes

This commit is contained in:
Lioncash 2014-11-06 09:53:14 -05:00
parent 0bb3999e18
commit 6336934c49
2 changed files with 14 additions and 3 deletions

View File

@ -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);
}

View File

@ -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.
*