[Android] Format all Java files to be consistent.
This commit is contained in:
parent
f09cafb2be
commit
7c99b0650b
|
@ -21,8 +21,8 @@ import org.dolphinemu.dolphinemu.settings.UserPreferences;
|
|||
|
||||
public final class DolphinEmulator<MainActivity> extends Activity
|
||||
{
|
||||
static private NativeGLSurfaceView GLview = null;
|
||||
static private boolean Running = false;
|
||||
private static NativeGLSurfaceView GLview = null;
|
||||
private static boolean Running = false;
|
||||
|
||||
private float screenWidth;
|
||||
private float screenHeight;
|
||||
|
@ -40,7 +40,7 @@ public final class DolphinEmulator<MainActivity> extends Activity
|
|||
in.close();
|
||||
out.close();
|
||||
}
|
||||
catch(IOException e)
|
||||
catch (IOException e)
|
||||
{
|
||||
Log.e("DolphinEmulator", "Failed to copy asset file: " + asset, e);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public final class DolphinEmulator<MainActivity> extends Activity
|
|||
byte[] buffer = new byte[1024];
|
||||
int read;
|
||||
|
||||
while((read = in.read(buffer)) != -1)
|
||||
while ((read = in.read(buffer)) != -1)
|
||||
{
|
||||
out.write(buffer, 0, read);
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ import android.view.SurfaceView;
|
|||
|
||||
public final class NativeGLSurfaceView extends SurfaceView
|
||||
{
|
||||
static private Thread myRun;
|
||||
static private boolean Running = false;
|
||||
static private boolean Created = false;
|
||||
private static Thread myRun;
|
||||
private static boolean Running = false;
|
||||
private static boolean Created = false;
|
||||
|
||||
public NativeGLSurfaceView(Context context)
|
||||
{
|
||||
|
@ -23,7 +23,8 @@ public final class NativeGLSurfaceView extends SurfaceView
|
|||
}
|
||||
};
|
||||
|
||||
getHolder().addCallback(new SurfaceHolder.Callback() {
|
||||
getHolder().addCallback(new SurfaceHolder.Callback()
|
||||
{
|
||||
public void surfaceCreated(SurfaceHolder holder)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
|
|
@ -82,7 +82,6 @@ public final class FolderBrowserAdapter extends ArrayAdapter<FolderBrowserItem>
|
|||
iconView.setImageResource(R.drawable.ic_menu_file);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ public final class FolderBrowserItem implements Comparable<FolderBrowserItem>
|
|||
/**
|
||||
* Constructor. Initializes a FolderBrowserItem with an empty subtitle.
|
||||
*
|
||||
* @param ctx Context this FolderBrowserItem is being used in.
|
||||
* @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.
|
||||
|
|
|
@ -271,5 +271,4 @@ public final class GameListActivity extends Activity
|
|||
|
||||
return super.dispatchKeyEvent(event);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -48,13 +48,13 @@ public final class GameListAdapter extends ArrayAdapter<GameListItem>
|
|||
TextView subtitle = (TextView) v.findViewById(R.id.GameItemSubText);
|
||||
ImageView icon = (ImageView) v.findViewById(R.id.GameItemIcon);
|
||||
|
||||
if(title != null)
|
||||
if (title != null)
|
||||
title.setText(item.getName());
|
||||
|
||||
if(subtitle != null)
|
||||
if (subtitle != null)
|
||||
subtitle.setText(item.getData());
|
||||
|
||||
if(icon != null)
|
||||
if (icon != null)
|
||||
{
|
||||
icon.setImageBitmap(item.getImage());
|
||||
icon.getLayoutParams().width = (int) ((860 / c.getResources().getDisplayMetrics().density) + 0.5);
|
||||
|
|
|
@ -60,13 +60,13 @@ public final class GameListFragment extends Fragment
|
|||
File[] dirs = currentDir.listFiles();
|
||||
try
|
||||
{
|
||||
for(File entry : dirs)
|
||||
for (File entry : dirs)
|
||||
{
|
||||
String entryName = entry.getName();
|
||||
|
||||
if (entryName.charAt(0) != '.')
|
||||
{
|
||||
if(!entry.isDirectory())
|
||||
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));
|
||||
|
@ -74,7 +74,7 @@ public final class GameListFragment extends Fragment
|
|||
}
|
||||
}
|
||||
}
|
||||
catch(Exception ignored)
|
||||
catch (Exception ignored)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ public final class GameListFragment extends Fragment
|
|||
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
|
||||
{
|
||||
GameListItem o = mGameAdapter.getItem(position);
|
||||
if(!(o.getData().equalsIgnoreCase(getString(R.string.folder))||o.getData().equalsIgnoreCase(getString(R.string.parent_directory))))
|
||||
if (!(o.getData().equalsIgnoreCase(getString(R.string.folder))||o.getData().equalsIgnoreCase(getString(R.string.parent_directory))))
|
||||
{
|
||||
onFileClick(o.getPath());
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@ public final class GameListItem implements Comparable<GameListItem>
|
|||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -85,7 +84,7 @@ public final class GameListItem implements Comparable<GameListItem>
|
|||
|
||||
public int compareTo(GameListItem o)
|
||||
{
|
||||
if(this.name != null)
|
||||
if (this.name != null)
|
||||
return this.name.toLowerCase().compareTo(o.getName().toLowerCase());
|
||||
else
|
||||
throw new IllegalArgumentException();
|
||||
|
|
|
@ -51,10 +51,10 @@ public final class InputConfigAdapter extends ArrayAdapter<InputConfigItem>
|
|||
TextView title = (TextView) v.findViewById(R.id.FolderTitle);
|
||||
TextView subtitle = (TextView) v.findViewById(R.id.FolderSubTitle);
|
||||
|
||||
if(title != null)
|
||||
if (title != null)
|
||||
title.setText(item.getName());
|
||||
|
||||
if(subtitle != null)
|
||||
if (subtitle != null)
|
||||
subtitle.setText(item.getBind());
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ public final class InputConfigFragment extends Fragment
|
|||
return fakeid;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
||||
{
|
||||
|
@ -116,7 +117,7 @@ public final class InputConfigFragment extends Fragment
|
|||
// Called from GameListActivity
|
||||
public boolean onMotionEvent(MotionEvent event)
|
||||
{
|
||||
if (((event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) == 0))
|
||||
if ((event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) == 0)
|
||||
return false;
|
||||
|
||||
InputDevice input = event.getDevice();
|
||||
|
|
|
@ -41,7 +41,7 @@ public final class InputConfigItem implements Comparable<InputConfigItem>
|
|||
|
||||
/**
|
||||
* Constructor that creates an InputConfigItem
|
||||
* that has a default binding of "None"
|
||||
* that has a default binding of "None".
|
||||
*
|
||||
* @param name Name of the input config item.
|
||||
* @param config Name of the key in the configuration file that this control modifies.
|
||||
|
@ -72,7 +72,7 @@ public final class InputConfigItem implements Comparable<InputConfigItem>
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the currently set binding of this InputConfigItem
|
||||
* Gets the currently set binding of this InputConfigItem.
|
||||
*
|
||||
* @return the currently set binding of this InputConfigItem
|
||||
*/
|
||||
|
@ -93,7 +93,7 @@ public final class InputConfigItem implements Comparable<InputConfigItem>
|
|||
|
||||
public int compareTo(InputConfigItem o)
|
||||
{
|
||||
if(this.m_name != null)
|
||||
if (this.m_name != null)
|
||||
return this.m_name.toLowerCase().compareTo(o.getName().toLowerCase());
|
||||
else
|
||||
throw new IllegalArgumentException();
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
package org.dolphinemu.dolphinemu.settings;
|
||||
|
||||
import org.dolphinemu.dolphinemu.R;
|
||||
import org.dolphinemu.dolphinemu.inputconfig.InputConfigFragment;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.ActionBar.Tab;
|
||||
|
@ -72,8 +73,8 @@ public final class PrefsActivity extends Activity implements ActionBar.TabListen
|
|||
// the TabListener interface, as the callback (listener) for when
|
||||
// this tab is selected.
|
||||
actionBar.addTab(actionBar.newTab().setText(R.string.cpu_settings).setTabListener(this));
|
||||
actionBar.addTab(actionBar.newTab().setText("Input Settings").setTabListener(this));
|
||||
actionBar.addTab(actionBar.newTab().setText(R.string.video_settings).setTabListener(this));
|
||||
|
||||
}
|
||||
|
||||
public void onTabReselected(Tab arg0, FragmentTransaction arg1)
|
||||
|
@ -96,9 +97,8 @@ public final class PrefsActivity extends Activity implements ActionBar.TabListen
|
|||
* A {@link FragmentPagerAdapter} that returns a fragment corresponding to one of the
|
||||
* sections/tabs/pages.
|
||||
*/
|
||||
public class SectionsPagerAdapter extends FragmentPagerAdapter
|
||||
public final class SectionsPagerAdapter extends FragmentPagerAdapter
|
||||
{
|
||||
|
||||
public SectionsPagerAdapter(FragmentManager fm)
|
||||
{
|
||||
super(fm);
|
||||
|
@ -113,6 +113,9 @@ public final class PrefsActivity extends Activity implements ActionBar.TabListen
|
|||
return new CPUSettingsFragment();
|
||||
|
||||
case 1:
|
||||
return new InputConfigFragment();
|
||||
|
||||
case 2:
|
||||
return new VideoSettingsFragment();
|
||||
|
||||
default: // Should never happen.
|
||||
|
@ -124,7 +127,7 @@ public final class PrefsActivity extends Activity implements ActionBar.TabListen
|
|||
public int getCount()
|
||||
{
|
||||
// Show total pages.
|
||||
return 2;
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -136,6 +139,9 @@ public final class PrefsActivity extends Activity implements ActionBar.TabListen
|
|||
return getString(R.string.cpu_settings).toUpperCase();
|
||||
|
||||
case 1:
|
||||
return "Input Settings";//getString(R.string)
|
||||
|
||||
case 2:
|
||||
return getString(R.string.video_settings).toUpperCase();
|
||||
|
||||
default: // Should never happen.
|
||||
|
|
|
@ -27,7 +27,7 @@ public final class VideoSettingsFragment extends PreferenceFragment
|
|||
{
|
||||
private Activity m_activity;
|
||||
|
||||
static public class VersionCheck
|
||||
public static class VersionCheck
|
||||
{
|
||||
EGL10 mEGL;
|
||||
EGLDisplay mEGLDisplay;
|
||||
|
@ -107,7 +107,7 @@ public final class VideoSettingsFragment extends PreferenceFragment
|
|||
}
|
||||
}
|
||||
|
||||
static public boolean SupportsGLES3()
|
||||
public static boolean SupportsGLES3()
|
||||
{
|
||||
VersionCheck mbuffer = new VersionCheck();
|
||||
String m_GLVersion = mbuffer.getVersion();
|
||||
|
|
|
@ -45,7 +45,7 @@ public final class SideMenuAdapter extends ArrayAdapter<SideMenuItem>
|
|||
{
|
||||
TextView title = (TextView) v.findViewById(R.id.SideMenuTitle);
|
||||
|
||||
if(title != null)
|
||||
if (title != null)
|
||||
title.setText(item.getName());
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public final class SideMenuItem implements Comparable<SideMenuItem>
|
|||
|
||||
public int compareTo(SideMenuItem o)
|
||||
{
|
||||
if(this.m_name != null)
|
||||
if (this.m_name != null)
|
||||
return this.m_name.toLowerCase().compareTo(o.getName().toLowerCase());
|
||||
else
|
||||
throw new IllegalArgumentException();
|
||||
|
|
Loading…
Reference in New Issue