From 10e85ff40c3fe0090bc951c2c2cedfa18f5caa47 Mon Sep 17 00:00:00 2001 From: Ryan Meredith Date: Tue, 8 Sep 2020 06:14:58 -0400 Subject: [PATCH] Android: Remove unnecessary getString calls --- .../dolphinemu/activities/EmulationActivity.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java index 3ffd0e93ec..76a5d7e4c5 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java @@ -857,9 +857,9 @@ public final class EmulationActivity extends AppCompatActivity .putBoolean("buttonToggleWii" + indexSelected, isChecked)); } } - builder.setNeutralButton(getString(R.string.emulation_toggle_all), + builder.setNeutralButton(R.string.emulation_toggle_all, (dialogInterface, i) -> mEmulationFragment.toggleInputOverlayVisibility()); - builder.setPositiveButton(getString(R.string.ok), (dialogInterface, i) -> + builder.setPositiveButton(R.string.ok, (dialogInterface, i) -> { editor.apply(); @@ -893,7 +893,7 @@ public final class EmulationActivity extends AppCompatActivity builder.setSingleChoiceItems(buttonList, currentValue, (DialogInterface dialog, int which) -> editor.putInt("doubleTapButton", InputOverlayPointer.DOUBLE_TAP_OPTIONS.get(which))); - builder.setPositiveButton(getString(R.string.ok), (dialogInterface, i) -> + builder.setPositiveButton(R.string.ok, (dialogInterface, i) -> { editor.commit(); mEmulationFragment.initInputPointer(); @@ -938,7 +938,7 @@ public final class EmulationActivity extends AppCompatActivity AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DolphinDialogBase); builder.setTitle(R.string.emulation_control_scale); builder.setView(view); - builder.setPositiveButton(getString(R.string.ok), (dialogInterface, i) -> + builder.setPositiveButton(R.string.ok, (dialogInterface, i) -> { SharedPreferences.Editor editor = mPreferences.edit(); editor.putInt("controlScale", seekbar.getProgress()); @@ -971,7 +971,7 @@ public final class EmulationActivity extends AppCompatActivity NativeLibrary.ReloadWiimoteConfig(); }); - builder.setPositiveButton(getString(R.string.ok), (dialogInterface, i) -> + builder.setPositiveButton(R.string.ok, (dialogInterface, i) -> { editor.apply(); mEmulationFragment.refreshInputOverlay(); @@ -1004,7 +1004,7 @@ public final class EmulationActivity extends AppCompatActivity NativeLibrary.ReloadWiimoteConfig(); }); - builder.setPositiveButton(getString(R.string.ok), (dialogInterface, i) -> editor.apply()); + builder.setPositiveButton(R.string.ok, (dialogInterface, i) -> editor.apply()); AlertDialog alertDialog = builder.create(); alertDialog.show(); @@ -1031,7 +1031,7 @@ public final class EmulationActivity extends AppCompatActivity int orientation = orientationValues[indexSelected]; editor.putInt("emulationActivityOrientation", orientation); }); - builder.setPositiveButton(getString(R.string.ok), (dialogInterface, i) -> + builder.setPositiveButton(R.string.ok, (dialogInterface, i) -> { editor.apply(); updateOrientation();