rm unused code

This commit is contained in:
weihuoya 2019-04-17 20:15:56 +08:00
parent 04ebee686c
commit 47e776d378
5 changed files with 1 additions and 43 deletions

View File

@ -195,7 +195,7 @@ public final class EmulationActivity extends AppCompatActivity
launcher.putExtra(EXTRA_SELECTED_TITLE, gameFile.getTitle());
launcher.putExtra(EXTRA_SELECTED_GAMEID, gameFile.getGameId());
launcher.putExtra(EXTRA_PLATFORM, gameFile.getPlatform());
activity.startActivityForResult(launcher, MainPresenter.REQUEST_EMULATE_GAME);
activity.startActivity(launcher);
}
@Override

View File

@ -131,19 +131,6 @@ public final class MainActivity extends AppCompatActivity implements MainView
mToolbar.setSubtitle(version);
}
@Override
public void refreshFragmentScreenshot(int fragmentPosition)
{
// Invalidate Picasso image so that the new screenshot is animated in.
Platform platform = Platform.fromPosition(mViewPager.getCurrentItem());
PlatformGamesView fragment = getPlatformGamesView(platform);
if (fragment != null)
{
fragment.refreshScreenshotAtPosition(fragmentPosition);
}
}
@Override
public void launchSettingsActivity(MenuTag menuTag)
{
@ -173,10 +160,6 @@ public final class MainActivity extends AppCompatActivity implements MainView
mPresenter.onDirectorySelected(FileBrowserHelper.getSelectedDirectory(result));
}
break;
case MainPresenter.REQUEST_EMULATE_GAME:
mPresenter.refreshFragmentScreenshot(resultCode);
break;
}
}

View File

@ -15,7 +15,6 @@ import org.dolphinemu.dolphinemu.services.GameFileCacheService;
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 final Context mContext;
@ -105,9 +104,4 @@ public final class MainPresenter
{
mDirToAdd = dir;
}
public void refreshFragmentScreenshot(int resultCode)
{
mView.refreshFragmentScreenshot(resultCode);
}
}

View File

@ -17,15 +17,6 @@ public interface MainView
*/
void setVersionString(String version);
/**
* 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(MenuTag menuTag);
void launchFileListActivity();

View File

@ -131,12 +131,6 @@ public final class TvMainActivity extends FragmentActivity implements MainView
mBrowseFragment.setTitle(version);
}
@Override
public void refreshFragmentScreenshot(int fragmentPosition)
{
mRowsAdapter.notifyArrayItemRangeChanged(0, mRowsAdapter.size());
}
@Override
public void launchSettingsActivity(MenuTag menuTag)
{
@ -177,10 +171,6 @@ public final class TvMainActivity extends FragmentActivity implements MainView
mPresenter.onDirectorySelected(FileBrowserHelper.getSelectedDirectory(result));
}
break;
case MainPresenter.REQUEST_EMULATE_GAME:
mPresenter.refreshFragmentScreenshot(resultCode);
break;
}
}