Android: Remove unnecessary Context parameters
This commit is contained in:
parent
45901f64b5
commit
d4709ce0ba
|
@ -74,7 +74,7 @@ public class AppLinkActivity extends FragmentActivity
|
||||||
});
|
});
|
||||||
|
|
||||||
DirectoryInitialization.start(this);
|
DirectoryInitialization.start(this);
|
||||||
GameFileCacheManager.startLoad(this);
|
GameFileCacheManager.startLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -233,7 +233,7 @@ public class Settings implements Closeable
|
||||||
if (mLoadedRecursiveIsoPathsValue != BooleanSetting.MAIN_RECURSIVE_ISO_PATHS.getBoolean(this))
|
if (mLoadedRecursiveIsoPathsValue != BooleanSetting.MAIN_RECURSIVE_ISO_PATHS.getBoolean(this))
|
||||||
{
|
{
|
||||||
// Refresh game library
|
// Refresh game library
|
||||||
GameFileCacheManager.startRescan(context);
|
GameFileCacheManager.startRescan();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
package org.dolphinemu.dolphinemu.services;
|
package org.dolphinemu.dolphinemu.services;
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData;
|
import androidx.lifecycle.LiveData;
|
||||||
import androidx.lifecycle.MutableLiveData;
|
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 the games are still present in the user's configured folders.
|
||||||
* If this has already been called, calling it again has no effect.
|
* If this has already been called, calling it again has no effect.
|
||||||
*/
|
*/
|
||||||
public static void startLoad(Context context)
|
public static void startLoad()
|
||||||
{
|
{
|
||||||
createGameFileCacheIfNeeded();
|
createGameFileCacheIfNeeded();
|
||||||
|
|
||||||
|
@ -142,7 +140,7 @@ public final class GameFileCacheManager
|
||||||
* If loading the game file cache hasn't started or hasn't finished,
|
* If loading the game file cache hasn't started or hasn't finished,
|
||||||
* the execution of this will be postponed until it finishes.
|
* the execution of this will be postponed until it finishes.
|
||||||
*/
|
*/
|
||||||
public static void startRescan(Context context)
|
public static void startRescan()
|
||||||
{
|
{
|
||||||
createGameFileCacheIfNeeded();
|
createGameFileCacheIfNeeded();
|
||||||
|
|
||||||
|
|
|
@ -301,7 +301,7 @@ public final class MainActivity extends AppCompatActivity
|
||||||
public void onRefresh()
|
public void onRefresh()
|
||||||
{
|
{
|
||||||
setRefreshing(true);
|
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());
|
mViewPager.setCurrentItem(IntSetting.MAIN_LAST_PLATFORM_TAB.getIntGlobal());
|
||||||
|
|
||||||
showGames();
|
showGames();
|
||||||
GameFileCacheManager.startLoad(this);
|
GameFileCacheManager.startLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -96,7 +96,7 @@ public final class MainPresenter
|
||||||
|
|
||||||
case R.id.menu_refresh:
|
case R.id.menu_refresh:
|
||||||
mView.setRefreshing(true);
|
mView.setRefreshing(true);
|
||||||
GameFileCacheManager.startRescan(activity);
|
GameFileCacheManager.startRescan();
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case R.id.button_add_directory:
|
case R.id.button_add_directory:
|
||||||
|
@ -146,7 +146,7 @@ public final class MainPresenter
|
||||||
|
|
||||||
if (sShouldRescanLibrary)
|
if (sShouldRescanLibrary)
|
||||||
{
|
{
|
||||||
GameFileCacheManager.startRescan(mActivity);
|
GameFileCacheManager.startRescan();
|
||||||
}
|
}
|
||||||
|
|
||||||
sShouldRescanLibrary = true;
|
sShouldRescanLibrary = true;
|
||||||
|
|
|
@ -79,7 +79,7 @@ public final class TvMainActivity extends FragmentActivity
|
||||||
if (DirectoryInitialization.shouldStart(this))
|
if (DirectoryInitialization.shouldStart(this))
|
||||||
{
|
{
|
||||||
DirectoryInitialization.start(this);
|
DirectoryInitialization.start(this);
|
||||||
GameFileCacheManager.startLoad(this);
|
GameFileCacheManager.startLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
mPresenter.onResume();
|
mPresenter.onResume();
|
||||||
|
@ -292,7 +292,7 @@ public final class TvMainActivity extends FragmentActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
DirectoryInitialization.start(this);
|
DirectoryInitialization.start(this);
|
||||||
GameFileCacheManager.startLoad(this);
|
GameFileCacheManager.startLoad();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,7 +303,7 @@ public final class TvMainActivity extends FragmentActivity
|
||||||
public void onRefresh()
|
public void onRefresh()
|
||||||
{
|
{
|
||||||
setRefreshing(true);
|
setRefreshing(true);
|
||||||
GameFileCacheManager.startRescan(this);
|
GameFileCacheManager.startRescan();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buildRowsAdapter()
|
private void buildRowsAdapter()
|
||||||
|
@ -313,7 +313,7 @@ public final class TvMainActivity extends FragmentActivity
|
||||||
|
|
||||||
if (!DirectoryInitialization.isWaitingForWriteAccess(this))
|
if (!DirectoryInitialization.isWaitingForWriteAccess(this))
|
||||||
{
|
{
|
||||||
GameFileCacheManager.startLoad(this);
|
GameFileCacheManager.startLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Platform platform : Platform.values())
|
for (Platform platform : Platform.values())
|
||||||
|
|
Loading…
Reference in New Issue