Android: Remove unnecessary Context parameters

This commit is contained in:
JosJuice 2022-09-27 19:09:47 +02:00
parent 45901f64b5
commit d4709ce0ba
6 changed files with 12 additions and 14 deletions

View File

@ -74,7 +74,7 @@ public class AppLinkActivity extends FragmentActivity
});
DirectoryInitialization.start(this);
GameFileCacheManager.startLoad(this);
GameFileCacheManager.startLoad();
}
/**

View File

@ -233,7 +233,7 @@ public class Settings implements Closeable
if (mLoadedRecursiveIsoPathsValue != BooleanSetting.MAIN_RECURSIVE_ISO_PATHS.getBoolean(this))
{
// Refresh game library
GameFileCacheManager.startRescan(context);
GameFileCacheManager.startRescan();
}
}
else

View File

@ -2,8 +2,6 @@
package org.dolphinemu.dolphinemu.services;
import android.content.Context;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
@ -124,7 +122,7 @@ public final class GameFileCacheManager
* if the games are still present in the user's configured folders.
* If this has already been called, calling it again has no effect.
*/
public static void startLoad(Context context)
public static void startLoad()
{
createGameFileCacheIfNeeded();
@ -142,7 +140,7 @@ public final class GameFileCacheManager
* If loading the game file cache hasn't started or hasn't finished,
* the execution of this will be postponed until it finishes.
*/
public static void startRescan(Context context)
public static void startRescan()
{
createGameFileCacheIfNeeded();

View File

@ -301,7 +301,7 @@ public final class MainActivity extends AppCompatActivity
public void onRefresh()
{
setRefreshing(true);
GameFileCacheManager.startRescan(this);
GameFileCacheManager.startRescan();
}
/**
@ -368,7 +368,7 @@ public final class MainActivity extends AppCompatActivity
mViewPager.setCurrentItem(IntSetting.MAIN_LAST_PLATFORM_TAB.getIntGlobal());
showGames();
GameFileCacheManager.startLoad(this);
GameFileCacheManager.startLoad();
}
@Override

View File

@ -96,7 +96,7 @@ public final class MainPresenter
case R.id.menu_refresh:
mView.setRefreshing(true);
GameFileCacheManager.startRescan(activity);
GameFileCacheManager.startRescan();
return true;
case R.id.button_add_directory:
@ -146,7 +146,7 @@ public final class MainPresenter
if (sShouldRescanLibrary)
{
GameFileCacheManager.startRescan(mActivity);
GameFileCacheManager.startRescan();
}
sShouldRescanLibrary = true;

View File

@ -79,7 +79,7 @@ public final class TvMainActivity extends FragmentActivity
if (DirectoryInitialization.shouldStart(this))
{
DirectoryInitialization.start(this);
GameFileCacheManager.startLoad(this);
GameFileCacheManager.startLoad();
}
mPresenter.onResume();
@ -292,7 +292,7 @@ public final class TvMainActivity extends FragmentActivity
}
DirectoryInitialization.start(this);
GameFileCacheManager.startLoad(this);
GameFileCacheManager.startLoad();
}
}
@ -303,7 +303,7 @@ public final class TvMainActivity extends FragmentActivity
public void onRefresh()
{
setRefreshing(true);
GameFileCacheManager.startRescan(this);
GameFileCacheManager.startRescan();
}
private void buildRowsAdapter()
@ -313,7 +313,7 @@ public final class TvMainActivity extends FragmentActivity
if (!DirectoryInitialization.isWaitingForWriteAccess(this))
{
GameFileCacheManager.startLoad(this);
GameFileCacheManager.startLoad();
}
for (Platform platform : Platform.values())