mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Android: Remove inappropriate leanback checks
Android TV devices aren't the only devices without touchscreens. Regarding MotionAlertDialog, I could've replaced the leanback check with a touchscreen check instead of just removing it, but I thought there was no reason to prevent people with touchscreens from doing a long back press if they want to.
This commit is contained in:
@ -12,7 +12,6 @@ import org.dolphinemu.dolphinemu.features.settings.model.view.InputBindingSettin
|
|||||||
import org.dolphinemu.dolphinemu.features.settings.ui.SettingsAdapter;
|
import org.dolphinemu.dolphinemu.features.settings.ui.SettingsAdapter;
|
||||||
import org.dolphinemu.dolphinemu.utils.ControllerMappingHelper;
|
import org.dolphinemu.dolphinemu.utils.ControllerMappingHelper;
|
||||||
import org.dolphinemu.dolphinemu.utils.Log;
|
import org.dolphinemu.dolphinemu.utils.Log;
|
||||||
import org.dolphinemu.dolphinemu.utils.TvUtil;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -63,8 +62,8 @@ public final class MotionAlertDialog extends AlertDialog
|
|||||||
@Override
|
@Override
|
||||||
public boolean onKeyLongPress(int keyCode, @NonNull KeyEvent event)
|
public boolean onKeyLongPress(int keyCode, @NonNull KeyEvent event)
|
||||||
{
|
{
|
||||||
// Option to clear by long back is only needed on the TV interface
|
// Intended for devices with no touchscreen or mouse
|
||||||
if (TvUtil.isLeanback(getContext()) && keyCode == KeyEvent.KEYCODE_BACK)
|
if (keyCode == KeyEvent.KEYCODE_BACK)
|
||||||
{
|
{
|
||||||
setting.clearValue(mAdapter.getSettings());
|
setting.clearValue(mAdapter.getSettings());
|
||||||
dismiss();
|
dismiss();
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
<SurfaceView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/surface_emulation"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:focusable="false"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
/>
|
Reference in New Issue
Block a user