mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 19:42:45 +00:00
Fix null pointer exception on ATV emulator
This commit is contained in:
parent
be153b84cb
commit
7cdd184197
@ -142,8 +142,9 @@ public class AddComputerManually extends Activity {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onEditorAction(TextView textView, int actionId, KeyEvent keyEvent) {
|
public boolean onEditorAction(TextView textView, int actionId, KeyEvent keyEvent) {
|
||||||
if (actionId == EditorInfo.IME_ACTION_DONE ||
|
if (actionId == EditorInfo.IME_ACTION_DONE ||
|
||||||
keyEvent.getAction() == KeyEvent.ACTION_DOWN &&
|
(keyEvent != null &&
|
||||||
keyEvent.getKeyCode() == KeyEvent.KEYCODE_ENTER) {
|
keyEvent.getAction() == KeyEvent.ACTION_DOWN &&
|
||||||
|
keyEvent.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
|
||||||
if (hostText.getText().length() == 0) {
|
if (hostText.getText().length() == 0) {
|
||||||
Toast.makeText(AddComputerManually.this, getResources().getString(R.string.addpc_enter_ip), Toast.LENGTH_LONG).show();
|
Toast.makeText(AddComputerManually.this, getResources().getString(R.string.addpc_enter_ip), Toast.LENGTH_LONG).show();
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user