From 4fe8bb1ca7fc5092c7f85832c74cd6b5cd097204 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 14 Nov 2014 13:03:51 -0500 Subject: [PATCH 1/5] Android: Compress an if statement in FolderBrowser --- .../dolphinemu/folderbrowser/FolderBrowser.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java index 97400c23b8..669ffe0094 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java @@ -144,14 +144,7 @@ public final class FolderBrowser extends ListFragment { String isoPath = NativeLibrary.GetConfig("Dolphin.ini", "General", "ISOPath" + i, ""); - if (isoPath.equals(currentDir.getPath())) - { - pathNotPresent = false; - } - else - { - pathNotPresent = true; - } + pathNotPresent = !isoPath.equals(currentDir.getPath()); } // User doesn't have this path in the config, so add it. From 5b1f734695fa40c0c14237ef4b2106771ed35a28 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 14 Nov 2014 13:21:14 -0500 Subject: [PATCH 2/5] Android: Prevent instantiation of utility classes --- .../Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java | 5 +++++ .../org/dolphinemu/dolphinemu/settings/UserPreferences.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java b/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java index b66aa0a84f..769595c1b4 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java @@ -53,6 +53,11 @@ public final class NativeLibrary public static final int PRESSED = 1; } + private NativeLibrary() + { + // Disallows instantiation. + } + /** * Default touchscreen device */ diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java b/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java index 49ae2bfebd..d2ae56b40f 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java @@ -21,6 +21,11 @@ import android.preference.PreferenceManager; */ public final class UserPreferences { + private UserPreferences() + { + // Disallows instantiation. + } + /** * Loads the settings stored in the Dolphin ini config files to the shared preferences of this front-end. * From 4d6bc39e2fc3fcf12d9c1a5e88a452817b0804d3 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 14 Nov 2014 13:25:30 -0500 Subject: [PATCH 3/5] AndroidManifest: Increment the minimum and target SDK values --- Source/Android/AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Android/AndroidManifest.xml b/Source/Android/AndroidManifest.xml index 12fa07c71b..3877bac4b4 100644 --- a/Source/Android/AndroidManifest.xml +++ b/Source/Android/AndroidManifest.xml @@ -6,8 +6,8 @@ android:installLocation="auto"> + android:minSdkVersion="17" + android:targetSdkVersion="21" /> From cc62cb881806e31dd25e8cf49b2a06ee0944c423 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 14 Nov 2014 13:39:15 -0500 Subject: [PATCH 4/5] Android: Support RTL language translations If someone wants to do a translation for an Arabic language, Hebrew, etc, it will now display correctly. --- Source/Android/AndroidManifest.xml | 3 ++- Source/Android/res/layout/about_layout.xml | 4 ++-- Source/Android/res/layout/folderbrowser_list_item.xml | 10 +++++----- Source/Android/res/layout/gamelist_list_item.xml | 10 +++++----- Source/Android/res/layout/sidemenu.xml | 2 +- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Source/Android/AndroidManifest.xml b/Source/Android/AndroidManifest.xml index 3877bac4b4..e1c08cf332 100644 --- a/Source/Android/AndroidManifest.xml +++ b/Source/Android/AndroidManifest.xml @@ -19,7 +19,8 @@ + android:allowBackup="true" + android:supportsRtl="true"> @@ -18,7 +18,7 @@ android:id="@+id/AboutItemSubTitle" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="15dip" + android:layout_marginStart="15dip" android:textAppearance="?android:attr/textAppearanceSmall"/> \ No newline at end of file diff --git a/Source/Android/res/layout/folderbrowser_list_item.xml b/Source/Android/res/layout/folderbrowser_list_item.xml index 15877bb64a..318efc75ec 100644 --- a/Source/Android/res/layout/folderbrowser_list_item.xml +++ b/Source/Android/res/layout/folderbrowser_list_item.xml @@ -14,7 +14,7 @@ android:layout_alignParentTop="true" android:layout_alignParentBottom="true" - android:layout_marginRight="6dip"/> + android:layout_marginEnd="6dip"/> + android:layout_marginEnd="6dip"/> Date: Fri, 14 Nov 2014 14:01:11 -0500 Subject: [PATCH 5/5] Android: Remove unused imports in GameListItem --- .../src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java index 6459eda8d8..6e25a33804 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java @@ -8,12 +8,8 @@ package org.dolphinemu.dolphinemu.gamelist; import android.content.Context; import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.util.Log; import java.io.File; -import java.io.IOException; -import java.io.InputStream; import org.dolphinemu.dolphinemu.NativeLibrary;