Remove unused code
Original commit by weihuoya for Dolphin-emu.
This commit is contained in:
parent
32917eeedf
commit
18dd8a2ce5
@ -112,7 +112,7 @@ public final class EmulationActivity extends AppCompatActivity {
|
||||
|
||||
launcher.putExtra(EXTRA_SELECTED_GAME, path);
|
||||
launcher.putExtra(EXTRA_SELECTED_TITLE, title);
|
||||
activity.startActivityForResult(launcher, MainPresenter.REQUEST_EMULATE_GAME);
|
||||
activity.startActivity(launcher);
|
||||
}
|
||||
|
||||
private void showRunningNotification() {
|
||||
|
@ -103,16 +103,6 @@ public final class MainActivity extends AppCompatActivity implements MainView {
|
||||
refreshFragment();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshFragmentScreenshot(int fragmentPosition) {
|
||||
// Invalidate Picasso image so that the new screenshot is animated in.
|
||||
PlatformGamesView fragment = getPlatformGamesView();
|
||||
|
||||
if (fragment != null) {
|
||||
fragment.refreshScreenshotAtPosition(fragmentPosition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void launchSettingsActivity(String menuTag) {
|
||||
if (PermissionsHandler.hasWriteAccess(this)) {
|
||||
@ -156,10 +146,6 @@ public final class MainActivity extends AppCompatActivity implements MainView {
|
||||
mPresenter.onDirectorySelected(FileBrowserHelper.getSelectedDirectory(result));
|
||||
}
|
||||
break;
|
||||
|
||||
case MainPresenter.REQUEST_EMULATE_GAME:
|
||||
mPresenter.refreshFragmentScreenshot(resultCode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,6 @@ import rx.schedulers.Schedulers;
|
||||
|
||||
public final class MainPresenter {
|
||||
public static final int REQUEST_ADD_DIRECTORY = 1;
|
||||
public static final int REQUEST_EMULATE_GAME = 2;
|
||||
|
||||
private final MainView mView;
|
||||
private String mDirToAdd;
|
||||
@ -58,10 +57,6 @@ public final class MainPresenter {
|
||||
mDirToAdd = dir;
|
||||
}
|
||||
|
||||
public void refreshFragmentScreenshot(int resultCode) {
|
||||
mView.refreshFragmentScreenshot(resultCode);
|
||||
}
|
||||
|
||||
public void loadGames() {
|
||||
GameDatabase databaseHelper = CitraApplication.databaseHelper;
|
||||
databaseHelper.getGames()
|
||||
|
@ -21,14 +21,6 @@ public interface MainView {
|
||||
*/
|
||||
void refresh();
|
||||
|
||||
/**
|
||||
* Tell the view to tell the currently displayed {@link android.support.v4.app.Fragment}
|
||||
* to refresh the screenshot at the given position in its list of games.
|
||||
*
|
||||
* @param fragmentPosition An index corresponding to the list or grid of games.
|
||||
*/
|
||||
void refreshFragmentScreenshot(int fragmentPosition);
|
||||
|
||||
void launchSettingsActivity(String menuTag);
|
||||
|
||||
void launchFileListActivity();
|
||||
|
@ -101,11 +101,6 @@ public final class TvMainActivity extends FragmentActivity implements MainView {
|
||||
recreate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshFragmentScreenshot(int fragmentPosition) {
|
||||
mRowsAdapter.notifyArrayItemRangeChanged(0, mRowsAdapter.size());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void launchSettingsActivity(String menuTag) {
|
||||
SettingsActivity.launch(this, menuTag, "");
|
||||
@ -143,10 +138,6 @@ public final class TvMainActivity extends FragmentActivity implements MainView {
|
||||
mPresenter.onDirectorySelected(FileBrowserHelper.getSelectedDirectory(result));
|
||||
}
|
||||
break;
|
||||
|
||||
case MainPresenter.REQUEST_EMULATE_GAME:
|
||||
mPresenter.refreshFragmentScreenshot(resultCode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user