Android: Remove an otherwise unused parameter
This commit is contained in:
parent
6578b1b7c4
commit
352a319086
|
@ -57,7 +57,6 @@ public class FileBrowser extends Fragment {
|
|||
|
||||
private Vibrator vib;
|
||||
private Drawable orig_bg;
|
||||
private boolean ImgBrowse;
|
||||
private boolean games;
|
||||
private String searchQuery = null;
|
||||
private OnItemSelectedListener mCallback;
|
||||
|
@ -77,7 +76,6 @@ public class FileBrowser extends Fragment {
|
|||
|
||||
Bundle b = getArguments();
|
||||
if (b != null) {
|
||||
ImgBrowse = b.getBoolean("ImgBrowse", true);
|
||||
if (games = b.getBoolean("games_entry", false)) {
|
||||
if (b.getString("path_entry") != null) {
|
||||
home_directory = b.getString("path_entry");
|
||||
|
@ -177,7 +175,7 @@ public class FileBrowser extends Fragment {
|
|||
showToastMessage(getActivity().getString(R.string.config_home), Snackbar.LENGTH_LONG);
|
||||
}
|
||||
installButtons();
|
||||
if (!ImgBrowse && !games) {
|
||||
if (!games) {
|
||||
new LocateGames(R.array.flash).execute(home_directory);
|
||||
} else {
|
||||
new LocateGames(R.array.images).execute(game_directory);
|
||||
|
|
|
@ -136,7 +136,7 @@ public class MainActivity extends AppCompatActivity implements
|
|||
// Check that the activity is using the layout version with
|
||||
// the fragment_container FrameLayout
|
||||
if (findViewById(R.id.fragment_container) != null) {
|
||||
onMainBrowseSelected(true, null, false, null);
|
||||
onMainBrowseSelected(null, false, null);
|
||||
}
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
|
@ -170,7 +170,7 @@ public class MainActivity extends AppCompatActivity implements
|
|||
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
||||
@Override
|
||||
public boolean onQueryTextSubmit(String query) {
|
||||
onMainBrowseSelected(true, mPrefs.getString(Config.pref_games,
|
||||
onMainBrowseSelected(mPrefs.getString(Config.pref_games,
|
||||
Environment.getExternalStorageDirectory().getAbsolutePath()),
|
||||
true, query);
|
||||
searchView.onActionViewCollapsed();
|
||||
|
@ -251,8 +251,6 @@ public class MainActivity extends AppCompatActivity implements
|
|||
/**
|
||||
* Launch the browser activity with specified parameters
|
||||
*
|
||||
* @param browse
|
||||
* Conditional for image files or folders
|
||||
* @param path
|
||||
* The root path of the browser fragment
|
||||
* @param games
|
||||
|
@ -260,11 +258,9 @@ public class MainActivity extends AppCompatActivity implements
|
|||
* @param query
|
||||
* Search parameters to limit list items
|
||||
*/
|
||||
public void onMainBrowseSelected(boolean browse, String path, boolean games, String query) {
|
||||
public void onMainBrowseSelected(String path, boolean games, String query) {
|
||||
FileBrowser firstFragment = new FileBrowser();
|
||||
Bundle args = new Bundle();
|
||||
// args.putBoolean("ImgBrowse", false);
|
||||
args.putBoolean("ImgBrowse", browse);
|
||||
// specify ImgBrowse option. true = images, false = folders only
|
||||
args.putString("browse_entry", path);
|
||||
// specify a path for selecting folder options
|
||||
|
@ -293,7 +289,7 @@ public class MainActivity extends AppCompatActivity implements
|
|||
public void onClick(DialogInterface dialog, int which) {
|
||||
String home_directory = mPrefs.getString(Config.pref_home,
|
||||
Environment.getExternalStorageDirectory().getAbsolutePath());
|
||||
onMainBrowseSelected(false, home_directory, false, null);
|
||||
onMainBrowseSelected(home_directory, false, null);
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(R.string.gdrive,
|
||||
|
@ -340,7 +336,7 @@ public class MainActivity extends AppCompatActivity implements
|
|||
}
|
||||
|
||||
private void launchMainFragment() {
|
||||
onMainBrowseSelected(true, null, false, null);
|
||||
onMainBrowseSelected(null, false, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -70,7 +70,7 @@ public class OptionsFragment extends Fragment {
|
|||
|
||||
// Container Activity must implement this interface
|
||||
public interface OnClickListener {
|
||||
void onMainBrowseSelected(boolean browse, String path_entry, boolean games, String query);
|
||||
void onMainBrowseSelected(String path_entry, boolean games, String query);
|
||||
void launchBIOSdetection();
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ public class OptionsFragment extends Fragment {
|
|||
game_directory = editGames.getText().toString();
|
||||
}
|
||||
hideSoftKeyBoard();
|
||||
mCallback.onMainBrowseSelected(false, game_directory, true, null);
|
||||
mCallback.onMainBrowseSelected(game_directory, true, null);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue