android: Rename main entry class to CitraApplication.
This commit is contained in:
parent
2e8892eab4
commit
5d485d0e76
@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
<application
|
||||
android:name=".DolphinApplication"
|
||||
android:name=".CitraApplication"
|
||||
android:label="@string/app_name"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:allowBackup="true"
|
||||
|
@ -1,3 +1,7 @@
|
||||
// Copyright 2019 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
package org.citra.citra_android;
|
||||
|
||||
import android.app.Application;
|
||||
@ -7,9 +11,9 @@ import org.citra.citra_android.model.GameDatabase;
|
||||
import org.citra.citra_android.services.DirectoryInitializationService;
|
||||
import org.citra.citra_android.utils.PermissionsHandler;
|
||||
|
||||
public class DolphinApplication extends Application {
|
||||
public class CitraApplication extends Application {
|
||||
public static GameDatabase databaseHelper;
|
||||
private static DolphinApplication application;
|
||||
private static CitraApplication application;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
@ -290,12 +290,12 @@ public final class NativeLibrary {
|
||||
public static native void SwapScreens(boolean is_portrait_mode);
|
||||
|
||||
public static boolean isPortraitMode() {
|
||||
return DolphinApplication.getAppContext().getResources().getConfiguration().orientation ==
|
||||
return CitraApplication.getAppContext().getResources().getConfiguration().orientation ==
|
||||
Configuration.ORIENTATION_PORTRAIT;
|
||||
}
|
||||
|
||||
public static int landscapeScreenLayout() {
|
||||
return PreferenceManager.getDefaultSharedPreferences(DolphinApplication.getAppContext())
|
||||
return PreferenceManager.getDefaultSharedPreferences(CitraApplication.getAppContext())
|
||||
.getInt("LandscapeScreenLayout", EmulationActivity.LayoutOption_MobileLandscape);
|
||||
}
|
||||
|
||||
@ -400,7 +400,7 @@ public final class NativeLibrary {
|
||||
params.leftMargin = params.rightMargin = CitraApplication.getAppContext().getResources().getDimensionPixelSize(R.dimen.dialog_margin);
|
||||
|
||||
// Set up the input
|
||||
alertPromptEditText = new EditText(DolphinApplication.getAppContext());
|
||||
alertPromptEditText = new EditText(CitraApplication.getAppContext());
|
||||
alertPromptEditText.setText(text);
|
||||
alertPromptEditText.setSingleLine();
|
||||
alertPromptEditText.setLayoutParams(params);
|
||||
|
@ -8,7 +8,7 @@ import android.widget.Toast;
|
||||
|
||||
import org.citra.citra_android.NativeLibrary;
|
||||
import org.citra.citra_android.R;
|
||||
import org.citra.citra_android.DolphinApplication;
|
||||
import org.citra.citra_android.CitraApplication;
|
||||
import org.citra.citra_android.model.settings.Setting;
|
||||
import org.citra.citra_android.model.settings.StringSetting;
|
||||
import org.citra.citra_android.utils.SettingsFile;
|
||||
@ -207,7 +207,7 @@ public final class InputBindingSetting extends SettingsItem {
|
||||
*/
|
||||
public void removeOldMapping() {
|
||||
// Get preferences editor
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(DolphinApplication.getAppContext());
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(CitraApplication.getAppContext());
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
|
||||
// Try remove all possible keys we wrote for this setting
|
||||
@ -256,7 +256,7 @@ public final class InputBindingSetting extends SettingsItem {
|
||||
*/
|
||||
private void WriteButtonMapping(String key) {
|
||||
// Get preferences editor
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(DolphinApplication.getAppContext());
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(CitraApplication.getAppContext());
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
|
||||
// Remove mapping for another setting using this input
|
||||
@ -284,7 +284,7 @@ public final class InputBindingSetting extends SettingsItem {
|
||||
*/
|
||||
private void WriteAxisMapping(int axis, int value) {
|
||||
// Get preferences editor
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(DolphinApplication.getAppContext());
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(CitraApplication.getAppContext());
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
|
||||
// Cleanup old mapping
|
||||
@ -309,7 +309,7 @@ public final class InputBindingSetting extends SettingsItem {
|
||||
public void onKeyInput(KeyEvent keyEvent)
|
||||
{
|
||||
if (!IsButtonMappingSupported()) {
|
||||
Toast.makeText(DolphinApplication.getAppContext(), R.string.input_message_analog_only, Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(CitraApplication.getAppContext(), R.string.input_message_analog_only, Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -332,11 +332,11 @@ public final class InputBindingSetting extends SettingsItem {
|
||||
char axisDir)
|
||||
{
|
||||
if (!IsAxisMappingSupported()) {
|
||||
Toast.makeText(DolphinApplication.getAppContext(), R.string.input_message_button_only, Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(CitraApplication.getAppContext(), R.string.input_message_button_only, Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(DolphinApplication.getAppContext());
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(CitraApplication.getAppContext());
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
|
||||
int button;
|
||||
@ -362,7 +362,7 @@ public final class InputBindingSetting extends SettingsItem {
|
||||
* Sets the string to use in the configuration UI for the gamepad input.
|
||||
*/
|
||||
private StringSetting setUiString(String ui) {
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(DolphinApplication.getAppContext());
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(CitraApplication.getAppContext());
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
|
||||
if (getSetting() == null) {
|
||||
|
@ -2,7 +2,7 @@ package org.citra.citra_android.ui.main;
|
||||
|
||||
|
||||
import org.citra.citra_android.BuildConfig;
|
||||
import org.citra.citra_android.DolphinApplication;
|
||||
import org.citra.citra_android.CitraApplication;
|
||||
import org.citra.citra_android.R;
|
||||
import org.citra.citra_android.model.GameDatabase;
|
||||
import org.citra.citra_android.utils.AddDirectoryHelper;
|
||||
@ -63,7 +63,7 @@ public final class MainPresenter {
|
||||
}
|
||||
|
||||
public void loadGames() {
|
||||
GameDatabase databaseHelper = DolphinApplication.databaseHelper;
|
||||
GameDatabase databaseHelper = CitraApplication.databaseHelper;
|
||||
databaseHelper.getGames()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@ -71,7 +71,7 @@ public final class MainPresenter {
|
||||
}
|
||||
|
||||
private void refeshGameList() {
|
||||
GameDatabase databaseHelper = DolphinApplication.databaseHelper;
|
||||
GameDatabase databaseHelper = CitraApplication.databaseHelper;
|
||||
databaseHelper.scanLibrary(databaseHelper.getWritableDatabase());
|
||||
mView.refresh();
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import org.citra.citra_android.DolphinApplication;
|
||||
import org.citra.citra_android.CitraApplication;
|
||||
import org.citra.citra_android.R;
|
||||
import org.citra.citra_android.adapters.GameAdapter;
|
||||
import org.citra.citra_android.model.GameDatabase;
|
||||
@ -54,7 +54,7 @@ public final class PlatformGamesFragment extends Fragment implements PlatformGam
|
||||
pullToRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
GameDatabase databaseHelper = DolphinApplication.databaseHelper;
|
||||
GameDatabase databaseHelper = CitraApplication.databaseHelper;
|
||||
databaseHelper.scanLibrary(databaseHelper.getWritableDatabase());
|
||||
refresh();
|
||||
pullToRefresh.setRefreshing(false);
|
||||
|
@ -1,7 +1,7 @@
|
||||
package org.citra.citra_android.ui.platform;
|
||||
|
||||
|
||||
import org.citra.citra_android.DolphinApplication;
|
||||
import org.citra.citra_android.CitraApplication;
|
||||
import org.citra.citra_android.model.GameDatabase;
|
||||
import org.citra.citra_android.utils.Log;
|
||||
|
||||
@ -27,7 +27,7 @@ public final class PlatformGamesPresenter {
|
||||
private void loadGames() {
|
||||
Log.debug("[PlatformGamesPresenter] : Loading games...");
|
||||
|
||||
GameDatabase databaseHelper = DolphinApplication.databaseHelper;
|
||||
GameDatabase databaseHelper = CitraApplication.databaseHelper;
|
||||
|
||||
databaseHelper.getGames()
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
Loading…
x
Reference in New Issue
Block a user