From d51bbb5c35bb578dcce52d4950f26e714ab45cb9 Mon Sep 17 00:00:00 2001 From: Amit Mahajan Date: Fri, 7 Feb 2020 20:03:11 +0000 Subject: Revert "Split Stk into a client apk and a lib." This reverts commit 7e1566067f791a8145d36e397cdd6b842cc89240. Reason for revert: b/148821604 Change-Id: I9f5682f99c73c447a5af8d29ed662f1bd68a0bf6 --- src/com/android/stk/StkInputActivity.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/com') diff --git a/src/com/android/stk/StkInputActivity.java b/src/com/android/stk/StkInputActivity.java index fe16101..0af6767 100644 --- a/src/com/android/stk/StkInputActivity.java +++ b/src/com/android/stk/StkInputActivity.java @@ -105,18 +105,22 @@ public class StkInputActivity extends AppCompatActivity implements View.OnClickL return; } - if (v.getId() == R.id.button_ok) { + switch (v.getId()) { + case R.id.button_ok: input = mTextIn.getText().toString(); - } else if (v.getId() == R.id.button_cancel) { + break; + case R.id.button_cancel: sendResponse(StkAppService.RES_ID_END_SESSION); finish(); return; - // Yes/No layout buttons. - } else if (v.getId() == R.id.button_yes) { + // Yes/No layout buttons. + case R.id.button_yes: input = YES_STR_RESPONSE; - } else if (v.getId() == R.id.button_no) { + break; + case R.id.button_no: input = NO_STR_RESPONSE; - } else if (v.getId() == R.id.more) { + break; + case R.id.more: if (mPopupMenu == null) { mPopupMenu = new PopupMenu(this, v); Menu menu = mPopupMenu.getMenu(); @@ -136,6 +140,8 @@ public class StkInputActivity extends AppCompatActivity implements View.OnClickL mPopupMenu.show(); } return; + default: + break; } CatLog.d(LOG_TAG, "handleClick, ready to response"); sendResponse(StkAppService.RES_ID_INPUT, input, false); -- cgit v1.2.3