summaryrefslogtreecommitdiff
path: root/Source/Android/src/org
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2013-08-23 10:26:15 -0400
committerLioncash <mathew1800@gmail.com>2013-08-23 10:26:15 -0400
commitc2aef25f4c504bd1d0de6777b54e104227b8bee5 (patch)
tree12847225bc211ad3cfca3a41d2fb78717104019d /Source/Android/src/org
parent70dab0d8396db540b8759307f7d19384cb1f960e (diff)
[Android] Since we don't show invalid filetypes in the file browser anymore, there's no need to check if a file is valid or not since they're all valid now.
Diffstat (limited to 'Source/Android/src/org')
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java4
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java12
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserAdapter.java5
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java23
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java2
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java14
6 files changed, 10 insertions, 50 deletions
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java
index 41e347a697..1f35a58f76 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java
@@ -36,8 +36,8 @@ public final class AboutFragment extends Fragment
String no = getString(R.string.no);
List<FolderBrowserItem> Input = new ArrayList<FolderBrowserItem>();
- Input.add(new FolderBrowserItem(getString(R.string.build_revision), NativeLibrary.GetVersionString(), "", true));
- Input.add(new FolderBrowserItem(getString(R.string.supports_gles3), VideoSettingsFragment.SupportsGLES3() ? yes : no, "", true));
+ Input.add(new FolderBrowserItem(getString(R.string.build_revision), NativeLibrary.GetVersionString(), ""));
+ Input.add(new FolderBrowserItem(getString(R.string.supports_gles3), VideoSettingsFragment.SupportsGLES3() ? yes : no, ""));
adapter = new FolderBrowserAdapter(m_activity, R.layout.about_layout, Input);
mMainList.setAdapter(adapter);
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java
index 26e170c6e0..55f88b3931 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java
@@ -10,7 +10,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ListView;
-import android.widget.Toast;
import java.io.File;
import java.util.*;
@@ -64,13 +63,13 @@ public final class FolderBrowser extends Fragment
{
if(entry.isDirectory())
{
- dir.add(new FolderBrowserItem(entryName, entry.getAbsolutePath(), true));
+ dir.add(new FolderBrowserItem(entryName, entry.getAbsolutePath()));
}
else if (entry.isFile() && hasExtension)
{
if (validExts.contains(entryName.toLowerCase().substring(entryName.lastIndexOf('.'))))
{
- fls.add(new FolderBrowserItem(entryName, getString(R.string.file_size)+entry.length(), entry.getAbsolutePath(), true));
+ fls.add(new FolderBrowserItem(entryName, getString(R.string.file_size)+entry.length(), entry.getAbsolutePath()));
}
}
}
@@ -87,7 +86,7 @@ public final class FolderBrowser extends Fragment
// Check for a parent directory to the one we're currently in.
if (!currDir.getPath().equalsIgnoreCase("/"))
- dir.add(0, new FolderBrowserItem("..", getString(R.string.parent_directory), currDir.getParent(), true));
+ dir.add(0, new FolderBrowserItem("..", getString(R.string.parent_directory), currDir.getParent()));
adapter = new FolderBrowserAdapter(m_activity, R.layout.folderbrowser, dir);
mDrawerList = (ListView) rootView.findViewById(R.id.gamelist);
@@ -119,10 +118,7 @@ public final class FolderBrowser extends Fragment
}
else
{
- if (item.isValid())
- FolderSelected();
- else
- Toast.makeText(m_activity, getString(R.string.cant_use_compressed_filetypes), Toast.LENGTH_LONG).show();
+ FolderSelected();
}
}
};
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserAdapter.java b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserAdapter.java
index e77205b527..6de1fbcb79 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserAdapter.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserAdapter.java
@@ -58,11 +58,6 @@ public final class FolderBrowserAdapter extends ArrayAdapter<FolderBrowserItem>
if(mainText != null)
{
mainText.setText(item.getName());
-
- if (!item.isValid())
- {
- mainText.setTextColor(0xFFFF0000);
- }
}
if(subtitleText != null)
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java
index ebff901961..00e41852fa 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java
@@ -10,7 +10,6 @@ public final class FolderBrowserItem implements Comparable<FolderBrowserItem>
private final String name;
private final String subtitle;
private final String path;
- private final boolean isValid;
private final File underlyingFile;
/**
@@ -19,14 +18,12 @@ public final class FolderBrowserItem implements Comparable<FolderBrowserItem>
* @param name The name of the file/folder represented by this item.
* @param subtitle The subtitle of this FolderBrowserItem to display.
* @param path The path of the file/folder represented by this item.
- * @param isValid Whether or not this item represents a file type that can be handled.
*/
- public FolderBrowserItem(String name, String subtitle, String path, boolean isValid)
+ public FolderBrowserItem(String name, String subtitle, String path)
{
this.name = name;
this.subtitle = subtitle;
this.path = path;
- this.isValid = isValid;
this.underlyingFile = new File(path);
}
@@ -35,14 +32,12 @@ public final class FolderBrowserItem implements Comparable<FolderBrowserItem>
*
* @param name The name of the file/folder represented by this item.
* @param path The path of the file/folder represented by this item.
- * @param isValid Whether or not this item represents a file type that can be handled.
*/
- public FolderBrowserItem(String name, String path, boolean isValid)
+ public FolderBrowserItem(String name, String path)
{
this.name = name;
this.subtitle = "";
this.path = path;
- this.isValid = isValid;
this.underlyingFile = new File(path);
}
@@ -77,20 +72,6 @@ public final class FolderBrowserItem implements Comparable<FolderBrowserItem>
}
/**
- * Gets whether or not the file represented
- * by this FolderBrowserItem is supported
- * and can be handled correctly.
- *
- * @return whether or not the file represented
- * by this FolderBrowserItem is supported
- * and can be handled correctly.
- */
- public boolean isValid()
- {
- return isValid;
- }
-
- /**
* Gets the {@link File} representation of the underlying file/folder
* represented by this FolderBrowserItem.
*
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java
index 5b42fe73c9..0866deba7a 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java
@@ -77,7 +77,7 @@ public final class GameListFragment extends Fragment
if (!entry.isDirectory())
{
if (exts.contains(entryName.toLowerCase().substring(entryName.lastIndexOf('.'))))
- fls.add(new GameListItem(mMe.getApplicationContext(), entryName, getString(R.string.file_size)+entry.length(),entry.getAbsolutePath(), true));
+ fls.add(new GameListItem(mMe.getApplicationContext(), entryName, getString(R.string.file_size)+entry.length(),entry.getAbsolutePath()));
}
}
}
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java
index 16ba06a65a..9ecff70b9b 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java
@@ -25,7 +25,6 @@ public final class GameListItem implements Comparable<GameListItem>
private String name;
private final String data;
private final String path;
- private final boolean isValid;
private Bitmap image;
/**
@@ -37,12 +36,11 @@ public final class GameListItem implements Comparable<GameListItem>
* @param path The file path for the game represented by this GameListItem.
* @param isValid Whether or not the emulator can handle this file.
*/
- public GameListItem(Context ctx, String name, String data, String path, boolean isValid)
+ public GameListItem(Context ctx, String name, String data, String path)
{
this.name = name;
this.data = data;
this.path = path;
- this.isValid = isValid;
File file = new File(path);
if (!file.isDirectory() && !path.equals(""))
@@ -115,16 +113,6 @@ public final class GameListItem implements Comparable<GameListItem>
return image;
}
- /**
- * Gets whether or not the emulator can handle this GameListItem.
- *
- * @return true, if this GameListItem can be handled by the emulator; false, otherwise.
- */
- public boolean isValid()
- {
- return isValid;
- }
-
public int compareTo(GameListItem o)
{
if (this.name != null)