Move all Activities and Fragments to the support library versions.
In the support lib, the code comes from the SDK, not the device like the framework version. This means we're shipping a more recent and less buggy version. It's also a good idea to keep the entire project on one version. We have a bit of a mix now. I think some of the Fragment animation issues were because of this mixing. For the leanback activities, AppCompatActivity requires AppCompat themes, which they don't ship for Theme.Leanback. So use FragmentActivity instead (that's the parent of AppCompatActivity, but still in the support library). For passed around Activities, use FragmentActivity to work with both.
This commit is contained in:
parent
9407d9ee0b
commit
9fb0d9a664
|
@ -1,12 +1,12 @@
|
|||
package org.dolphinemu.dolphinemu.activities;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.AsyncQueryHandler;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
|
@ -133,7 +133,7 @@ public class AddDirectoryActivity extends AppCompatActivity implements FileAdapt
|
|||
mToolbar.setSubtitle(path);
|
||||
}
|
||||
|
||||
public static void launch(Activity activity)
|
||||
public static void launch(FragmentActivity activity)
|
||||
{
|
||||
Intent fileChooser = new Intent(activity, AddDirectoryActivity.class);
|
||||
activity.startActivityForResult(fileChooser, MainPresenter.REQUEST_ADD_DIRECTORY);
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package org.dolphinemu.dolphinemu.activities;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityOptions;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Fragment;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
|
@ -14,6 +12,8 @@ import android.os.Handler;
|
|||
import android.os.Message;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.IntDef;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.util.SparseIntArray;
|
||||
import android.view.InputDevice;
|
||||
|
@ -157,7 +157,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
buttonsActionsMap.append(R.id.menu_exit, EmulationActivity.MENU_ACTION_EXIT);
|
||||
}
|
||||
|
||||
public static void launch(Activity activity, String path, String title, String screenshotPath, int position, View sharedView)
|
||||
public static void launch(FragmentActivity activity, String path, String title, String screenshotPath, int position, View sharedView)
|
||||
{
|
||||
Intent launcher = new Intent(activity, EmulationActivity.class);
|
||||
|
||||
|
@ -171,6 +171,8 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
sharedView,
|
||||
"image_game_screenshot");
|
||||
|
||||
// I believe this warning is a bug. Activities are FragmentActivity from the support lib
|
||||
//noinspection RestrictedApi
|
||||
activity.startActivityForResult(launcher, MainPresenter.REQUEST_EMULATE_GAME, options.toBundle());
|
||||
}
|
||||
|
||||
|
@ -286,7 +288,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
EmulationFragment emulationFragment = EmulationFragment.newInstance(path);
|
||||
|
||||
// Add fragment to the activity - this triggers all its lifecycle callbacks.
|
||||
getFragmentManager().beginTransaction()
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.frame_emulation_fragment, emulationFragment, EmulationFragment.FRAGMENT_TAG)
|
||||
.commit();
|
||||
}
|
||||
|
@ -302,7 +304,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
}
|
||||
else
|
||||
{
|
||||
MenuFragment menuFragment = (MenuFragment) getFragmentManager()
|
||||
MenuFragment menuFragment = (MenuFragment) getSupportFragmentManager()
|
||||
.findFragmentById(R.id.fragment_menu);
|
||||
|
||||
if (menuFragment != null)
|
||||
|
@ -413,7 +415,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
|
||||
private void stopEmulation()
|
||||
{
|
||||
EmulationFragment fragment = (EmulationFragment) getFragmentManager()
|
||||
EmulationFragment fragment = (EmulationFragment) getSupportFragmentManager()
|
||||
.findFragmentByTag(EmulationFragment.FRAGMENT_TAG);
|
||||
fragment.notifyEmulationStopped();
|
||||
|
||||
|
@ -612,7 +614,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
|
||||
|
||||
private void editControlsPlacement() {
|
||||
EmulationFragment emulationFragment = (EmulationFragment) getFragmentManager()
|
||||
EmulationFragment emulationFragment = (EmulationFragment) getSupportFragmentManager()
|
||||
.findFragmentById(R.id.frame_emulation_fragment);
|
||||
if (emulationFragment.isConfiguringControls()) {
|
||||
emulationFragment.stopConfiguringControls();
|
||||
|
@ -707,7 +709,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
builder.setNeutralButton(getString(R.string.emulation_toggle_all), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
EmulationFragment emulationFragment = (EmulationFragment) getFragmentManager()
|
||||
EmulationFragment emulationFragment = (EmulationFragment) getSupportFragmentManager()
|
||||
.findFragmentByTag(EmulationFragment.FRAGMENT_TAG);
|
||||
emulationFragment.toggleInputOverlayVisibility();
|
||||
}
|
||||
|
@ -717,7 +719,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
editor.apply();
|
||||
|
||||
EmulationFragment emulationFragment = (EmulationFragment) getFragmentManager()
|
||||
EmulationFragment emulationFragment = (EmulationFragment) getSupportFragmentManager()
|
||||
.findFragmentByTag(EmulationFragment.FRAGMENT_TAG);
|
||||
emulationFragment.refreshInputOverlay();
|
||||
}
|
||||
|
@ -764,7 +766,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
editor.putInt("controlScale", seekbar.getProgress());
|
||||
editor.apply();
|
||||
|
||||
EmulationFragment emulationFragment = (EmulationFragment) getFragmentManager()
|
||||
EmulationFragment emulationFragment = (EmulationFragment) getSupportFragmentManager()
|
||||
.findFragmentByTag(EmulationFragment.FRAGMENT_TAG);
|
||||
emulationFragment.refreshInputOverlay();
|
||||
}
|
||||
|
@ -793,7 +795,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
editor.apply();
|
||||
|
||||
EmulationFragment emulationFragment = (EmulationFragment) getFragmentManager()
|
||||
EmulationFragment emulationFragment = (EmulationFragment) getSupportFragmentManager()
|
||||
.findFragmentByTag(EmulationFragment.FRAGMENT_TAG);
|
||||
emulationFragment.refreshInputOverlay();
|
||||
|
||||
|
@ -885,7 +887,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
private void showMenu(SaveLoadStateFragment.SaveOrLoad saveOrLoad)
|
||||
{
|
||||
Fragment fragment = SaveLoadStateFragment.newInstance(saveOrLoad);
|
||||
getFragmentManager().beginTransaction()
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.setCustomAnimations(R.animator.menu_slide_in, R.animator.menu_slide_out)
|
||||
.replace(R.id.frame_submenu, fragment, FRAGMENT_SUBMENU_TAG)
|
||||
.commit();
|
||||
|
@ -894,7 +896,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
|
||||
private void removeSubMenu()
|
||||
{
|
||||
final Fragment fragment = getFragmentManager().findFragmentByTag(FRAGMENT_SUBMENU_TAG);
|
||||
final Fragment fragment = getSupportFragmentManager().findFragmentByTag(FRAGMENT_SUBMENU_TAG);
|
||||
|
||||
if (fragment != null)
|
||||
{
|
||||
|
@ -908,7 +910,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
{
|
||||
if (mMenuVisible)
|
||||
{
|
||||
getFragmentManager().beginTransaction()
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.remove(fragment)
|
||||
.commit();
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.dolphinemu.dolphinemu.adapters;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.database.Cursor;
|
||||
import android.database.DataSetObserver;
|
||||
import android.graphics.Rect;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -202,7 +202,7 @@ public final class GameAdapter extends RecyclerView.Adapter<GameViewHolder> impl
|
|||
{
|
||||
GameViewHolder holder = (GameViewHolder) view.getTag();
|
||||
|
||||
EmulationActivity.launch((Activity) view.getContext(),
|
||||
EmulationActivity.launch((FragmentActivity) view.getContext(),
|
||||
holder.path,
|
||||
holder.title,
|
||||
holder.screenshotPath,
|
||||
|
@ -225,13 +225,13 @@ public final class GameAdapter extends RecyclerView.Adapter<GameViewHolder> impl
|
|||
// TODO This should be all we need to pass in, eventually.
|
||||
// String gameId = (String) holder.gameId;
|
||||
|
||||
Activity activity = (Activity) view.getContext();
|
||||
FragmentActivity activity = (FragmentActivity) view.getContext();
|
||||
GameDetailsDialog.newInstance(holder.title,
|
||||
holder.description,
|
||||
holder.country,
|
||||
holder.company,
|
||||
holder.path,
|
||||
holder.screenshotPath).show(activity.getFragmentManager(), "game_details");
|
||||
holder.screenshotPath).show(activity.getSupportFragmentManager(), "game_details");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.dolphinemu.dolphinemu.adapters;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.app.FragmentManager;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.v13.app.FragmentPagerAdapter;
|
||||
import android.support.v4.app.FragmentPagerAdapter;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.style.ImageSpan;
|
||||
|
|
|
@ -2,9 +2,9 @@ package org.dolphinemu.dolphinemu.dialogs;
|
|||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.DialogFragment;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.dolphinemu.dolphinemu.fragments;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Surface;
|
||||
import android.view.SurfaceHolder;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.dolphinemu.dolphinemu.fragments;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.util.SparseIntArray;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.dolphinemu.dolphinemu.fragments;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.util.SparseIntArray;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
|
@ -70,7 +70,8 @@ public final class MainActivity extends AppCompatActivity implements MainView
|
|||
|
||||
if (PermissionsHandler.hasWriteAccess(this))
|
||||
{
|
||||
PlatformPagerAdapter platformPagerAdapter = new PlatformPagerAdapter(getFragmentManager(), this);
|
||||
PlatformPagerAdapter platformPagerAdapter = new PlatformPagerAdapter(
|
||||
getSupportFragmentManager(), this);
|
||||
mViewPager.setAdapter(platformPagerAdapter);
|
||||
} else {
|
||||
mViewPager.setVisibility(View.INVISIBLE);
|
||||
|
@ -162,7 +163,8 @@ public final class MainActivity extends AppCompatActivity implements MainView
|
|||
if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
StartupHandler.copyAssetsIfNeeded(this);
|
||||
|
||||
PlatformPagerAdapter platformPagerAdapter = new PlatformPagerAdapter(getFragmentManager(), this);
|
||||
PlatformPagerAdapter platformPagerAdapter = new PlatformPagerAdapter(
|
||||
getSupportFragmentManager(), this);
|
||||
mViewPager.setAdapter(platformPagerAdapter);
|
||||
mTabLayout.setupWithViewPager(mViewPager);
|
||||
mViewPager.setVisibility(View.VISIBLE);
|
||||
|
@ -205,6 +207,6 @@ public final class MainActivity extends AppCompatActivity implements MainView
|
|||
{
|
||||
String fragmentTag = "android:switcher:" + mViewPager.getId() + ":" + platform;
|
||||
|
||||
return (PlatformGamesView) getFragmentManager().findFragmentByTag(fragmentTag);
|
||||
return (PlatformGamesView) getSupportFragmentManager().findFragmentByTag(fragmentTag);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package org.dolphinemu.dolphinemu.ui.main;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.FragmentManager;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.database.Cursor;
|
||||
import android.os.Bundle;
|
||||
import android.support.v17.leanback.app.BrowseFragment;
|
||||
import android.support.v17.leanback.app.BrowseSupportFragment;
|
||||
import android.support.v17.leanback.database.CursorMapper;
|
||||
import android.support.v17.leanback.widget.ArrayObjectAdapter;
|
||||
import android.support.v17.leanback.widget.CursorObjectAdapter;
|
||||
|
@ -17,6 +16,8 @@ import android.support.v17.leanback.widget.OnItemViewClickedListener;
|
|||
import android.support.v17.leanback.widget.Presenter;
|
||||
import android.support.v17.leanback.widget.Row;
|
||||
import android.support.v17.leanback.widget.RowPresenter;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
@ -33,11 +34,11 @@ import org.dolphinemu.dolphinemu.utils.PermissionsHandler;
|
|||
import org.dolphinemu.dolphinemu.utils.StartupHandler;
|
||||
import org.dolphinemu.dolphinemu.viewholders.TvGameViewHolder;
|
||||
|
||||
public final class TvMainActivity extends Activity implements MainView
|
||||
public final class TvMainActivity extends FragmentActivity implements MainView
|
||||
{
|
||||
private MainPresenter mPresenter = new MainPresenter(this);
|
||||
|
||||
private BrowseFragment mBrowseFragment;
|
||||
private BrowseSupportFragment mBrowseFragment;
|
||||
|
||||
private ArrayObjectAdapter mRowsAdapter;
|
||||
|
||||
|
@ -57,8 +58,8 @@ public final class TvMainActivity extends Activity implements MainView
|
|||
}
|
||||
|
||||
void setupUI() {
|
||||
final FragmentManager fragmentManager = getFragmentManager();
|
||||
mBrowseFragment = new BrowseFragment();
|
||||
final FragmentManager fragmentManager = getSupportFragmentManager();
|
||||
mBrowseFragment = new BrowseSupportFragment();
|
||||
fragmentManager
|
||||
.beginTransaction()
|
||||
.add(R.id.content, mBrowseFragment, "BrowseFragment")
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.dolphinemu.dolphinemu.ui.platform;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.database.Cursor;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.dolphinemu.dolphinemu.ui.settings;
|
||||
|
||||
import android.app.FragmentTransaction;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
|
@ -88,7 +88,7 @@ public final class SettingsActivity extends AppCompatActivity implements Setting
|
|||
@Override
|
||||
public void showSettingsFragment(String menuTag, boolean addToStack)
|
||||
{
|
||||
FragmentTransaction transaction = getFragmentManager().beginTransaction();
|
||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||
|
||||
if (addToStack)
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ public final class SettingsActivity extends AppCompatActivity implements Setting
|
|||
@Override
|
||||
public void popBackStack()
|
||||
{
|
||||
getFragmentManager().popBackStackImmediate();
|
||||
getSupportFragmentManager().popBackStackImmediate();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -178,6 +178,6 @@ public final class SettingsActivity extends AppCompatActivity implements Setting
|
|||
|
||||
private SettingsFragment getFragment()
|
||||
{
|
||||
return (SettingsFragment) getFragmentManager().findFragmentByTag(FRAGMENT_TAG);
|
||||
return (SettingsFragment) getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.dolphinemu.dolphinemu.ui.settings;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Fragment;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.dolphinemu.dolphinemu.ui.settings;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
|
||||
import org.dolphinemu.dolphinemu.model.settings.Setting;
|
||||
import org.dolphinemu.dolphinemu.model.settings.SettingSection;
|
||||
|
@ -48,7 +48,7 @@ public interface SettingsFragmentView
|
|||
/**
|
||||
* @return The Fragment's containing activity.
|
||||
*/
|
||||
Activity getActivity();
|
||||
FragmentActivity getActivity();
|
||||
|
||||
/**
|
||||
* Tell the Fragment to tell the containing Activity to show a new
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.dolphinemu.dolphinemu.utils;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
@ -17,7 +17,7 @@ public class PermissionsHandler {
|
|||
public static final int REQUEST_CODE_WRITE_PERMISSION = 500;
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.M)
|
||||
public static boolean checkWritePermission(final Activity activity) {
|
||||
public static boolean checkWritePermission(final FragmentActivity activity) {
|
||||
if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
||||
return true;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public class PermissionsHandler {
|
|||
return true;
|
||||
}
|
||||
|
||||
public static boolean hasWriteAccess(Activity activity) {
|
||||
public static boolean hasWriteAccess(FragmentActivity activity) {
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
int hasWritePermission = ContextCompat.checkSelfPermission(activity, WRITE_EXTERNAL_STORAGE);
|
||||
return hasWritePermission == PackageManager.PERMISSION_GRANTED;
|
||||
|
@ -54,7 +54,7 @@ public class PermissionsHandler {
|
|||
return true;
|
||||
}
|
||||
|
||||
private static void showMessageOKCancel(final Activity activity, String message, DialogInterface.OnClickListener okListener) {
|
||||
private static void showMessageOKCancel(final FragmentActivity activity, String message, DialogInterface.OnClickListener okListener) {
|
||||
new AlertDialog.Builder(activity)
|
||||
.setMessage(message)
|
||||
.setPositiveButton(android.R.string.ok, okListener)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.dolphinemu.dolphinemu.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import org.dolphinemu.dolphinemu.NativeLibrary;
|
||||
|
@ -13,7 +13,7 @@ import org.dolphinemu.dolphinemu.services.AssetCopyService;
|
|||
|
||||
public final class StartupHandler
|
||||
{
|
||||
public static boolean HandleInit(Activity parent)
|
||||
public static boolean HandleInit(FragmentActivity parent)
|
||||
{
|
||||
NativeLibrary.SetUserDirectory(""); // Auto-Detect
|
||||
|
||||
|
@ -46,7 +46,7 @@ public final class StartupHandler
|
|||
return false;
|
||||
}
|
||||
|
||||
public static void copyAssetsIfNeeded(Activity parent) {
|
||||
public static void copyAssetsIfNeeded(FragmentActivity parent) {
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(parent);
|
||||
boolean assetsCopied = preferences.getBoolean("assetsCopied", false);
|
||||
|
||||
|
|
Loading…
Reference in New Issue