Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Android] Some minor formatting styling.
Remove unnecessary this statements.
  • Loading branch information
lioncash committed Aug 29, 2013
1 parent ea671d6 commit c5a8861
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 25 deletions.
Expand Up @@ -33,7 +33,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
{
View rootView = inflater.inflate(R.layout.gamelist_listview, container, false);
mMainList = (ListView) rootView.findViewById(R.id.gamelist);

String yes = getString(R.string.yes);
String no = getString(R.string.no);

Expand All @@ -46,7 +46,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa

return mMainList;
}

@Override
public void onAttach(Activity activity)
{
Expand Down
Expand Up @@ -128,10 +128,10 @@ public void onCreate(Bundle savedInstanceState)
CopyAsset("dsp_rom.bin", GCDir + File.separator + "dsp_rom.bin");
CopyAsset("font_ansi.bin", GCDir + File.separator + "font_ansi.bin");
CopyAsset("font_sjis.bin", GCDir + File.separator + "font_sjis.bin");
CopyAsset("setting-eur.txt", WiiDir + File.separator + "setting-eur.txt");
CopyAsset("setting-jpn.txt", WiiDir + File.separator + "setting-jpn.txt");
CopyAsset("setting-kor.txt", WiiDir + File.separator + "setting-kor.txt");
CopyAsset("setting-usa.txt", WiiDir + File.separator + "setting-usa.txt");
CopyAsset("setting-eur.txt", WiiDir + File.separator + "setting-eur.txt");
CopyAsset("setting-jpn.txt", WiiDir + File.separator + "setting-jpn.txt");
CopyAsset("setting-kor.txt", WiiDir + File.separator + "setting-kor.txt");
CopyAsset("setting-usa.txt", WiiDir + File.separator + "setting-usa.txt");
}

// Load the configuration keys set in the Dolphin ini and gfx ini files
Expand Down Expand Up @@ -188,10 +188,9 @@ public boolean dispatchKeyEvent(KeyEvent event)
// Special catch for the back key
// Currently disabled because stopping and starting emulation is broken.
/*
if ( event.getSource() == InputDevice.SOURCE_KEYBOARD
&& event.getKeyCode() == KeyEvent.KEYCODE_BACK
&& event.getAction() == KeyEvent.ACTION_UP
)
if (event.getSource() == InputDevice.SOURCE_KEYBOARD
&& event.getKeyCode() == KeyEvent.KEYCODE_BACK
&& event.getAction() == KeyEvent.ACTION_UP)
{
if (Running)
NativeLibrary.StopEmulation();
Expand Down Expand Up @@ -232,7 +231,7 @@ public boolean dispatchGenericMotionEvent(MotionEvent event)

InputDevice input = event.getDevice();
List<InputDevice.MotionRange> motions = input.getMotionRanges();

for (InputDevice.MotionRange range : motions)
{
NativeLibrary.onGamePadMoveEvent(InputConfigFragment.getInputDesc(input), range.getAxis(), event.getAxisValue(range.getAxis()));
Expand Down
Expand Up @@ -101,8 +101,8 @@ public boolean isDirectory()

public int compareTo(FolderBrowserItem other)
{
if(this.name != null)
return this.name.toLowerCase().compareTo(other.getName().toLowerCase());
if(name != null)
return name.toLowerCase().compareTo(other.getName().toLowerCase());
else
throw new IllegalArgumentException();
}
Expand Down
Expand Up @@ -45,8 +45,6 @@ public final class GameListActivity extends Activity
private DrawerLayout mDrawerLayout;
private SideMenuAdapter mDrawerAdapter;
private ListView mDrawerList;



/**
* Called from the {@link GameListFragment}.
Expand Down
Expand Up @@ -51,10 +51,10 @@ public GameListItem(Context ctx, String name, String data, String path)
{
// Open the no banner icon.
InputStream noBannerPath = ctx.getAssets().open("NoBanner.png");

// Decode the bitmap.
image = BitmapFactory.decodeStream(noBannerPath);

// Scale the bitmap to match other banners.
image = Bitmap.createScaledBitmap(image, 96, 32, false);
}
Expand Down Expand Up @@ -114,8 +114,8 @@ public Bitmap getImage()

public int compareTo(GameListItem o)
{
if (this.name != null)
return this.name.toLowerCase().compareTo(o.getName().toLowerCase());
if (name != null)
return name.toLowerCase().compareTo(o.getName().toLowerCase());
else
throw new IllegalArgumentException();
}
Expand Down
Expand Up @@ -47,8 +47,8 @@ else if (Build.CPU_ABI.contains("arm"))
}
else
{
cpuCores.setEntries(R.array.emuCoreEntriesOther);
cpuCores.setEntryValues(R.array.emuCoreValuesOther);
cpuCores.setEntries(R.array.emuCoreEntriesOther);
cpuCores.setEntryValues(R.array.emuCoreValuesOther);
}
}

Expand Down
Expand Up @@ -91,7 +91,7 @@ public void onCreate(Bundle savedInstanceState)
pref.setSummary(binding);
}
}

@Override
public boolean onPreferenceTreeClick(final PreferenceScreen screen, final Preference pref)
{
Expand Down Expand Up @@ -204,7 +204,6 @@ public void onAttach(Activity activity)
m_activity = activity;
}


/**
* {@link AlertDialog} class derivative that allows the motion listener
* to be set anonymously, so the creation of an explicit class for
Expand Down Expand Up @@ -258,7 +257,7 @@ public boolean dispatchGenericMotionEvent(MotionEvent event)
{
if (motionListener.onMotion(event))
return true;

return super.dispatchGenericMotionEvent(event);
}
}
Expand Down
Expand Up @@ -50,7 +50,7 @@ public int getID()
public int compareTo(SideMenuItem o)
{
if (name != null)
return this.name.toLowerCase().compareTo(o.getName().toLowerCase());
return name.toLowerCase().compareTo(o.getName().toLowerCase());
else
throw new IllegalArgumentException();
}
Expand Down

0 comments on commit c5a8861

Please sign in to comment.