summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAmit Mahajan <amitmahajan@google.com>2020-02-05 01:37:24 +0000
committerAmit Mahajan <amitmahajan@google.com>2020-02-26 12:36:34 -0800
commitdb465b9c48e5f7c79c20f3fccbf85caffecf70de (patch)
treec7af091837e76cc4f7f800d70e8b4235d7b2e283 /src
parent724c41144f1029c0f53f1fcdaf6435e34c651147 (diff)
downloadStk-db465b9c48e5f7c79c20f3fccbf85caffecf70de.tar.gz
Revert "Split Stk into a client apk and a lib."
This reverts commit f17bb5778ab1678601cfb171eec7213de63bbefc. Reason for revert: b/148821604 Merged-in: I9f5682f99c73c447a5af8d29ed662f1bd68a0bf6 Change-Id: Idac4e818cbe54b417932603585540f1fd63c503e
Diffstat (limited to 'src')
-rw-r--r--src/com/android/stk/StkInputActivity.java18
1 files changed, 12 insertions, 6 deletions
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);