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:
parent
cf51642c17
commit
27554d2f26
|
@ -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.utils.ControllerMappingHelper;
|
||||
import org.dolphinemu.dolphinemu.utils.Log;
|
||||
import org.dolphinemu.dolphinemu.utils.TvUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -63,8 +62,8 @@ public final class MotionAlertDialog extends AlertDialog
|
|||
@Override
|
||||
public boolean onKeyLongPress(int keyCode, @NonNull KeyEvent event)
|
||||
{
|
||||
// Option to clear by long back is only needed on the TV interface
|
||||
if (TvUtil.isLeanback(getContext()) && keyCode == KeyEvent.KEYCODE_BACK)
|
||||
// Intended for devices with no touchscreen or mouse
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK)
|
||||
{
|
||||
setting.clearValue(mAdapter.getSettings());
|
||||
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"
|
||||
/>
|
Loading…
Reference in New Issue