summaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
authorAmit Mahajan <amitmahajan@google.com>2020-02-07 20:03:11 +0000
committerAmit Mahajan <amitmahajan@google.com>2020-02-07 12:08:39 -0800
commitd51bbb5c35bb578dcce52d4950f26e714ab45cb9 (patch)
treec244a1d138d3f71911c7cc8c9a4ef7d0f5413acf /src/com
parent00d5ad7278437f24358a8d0e89f60e9217b669c7 (diff)
downloadStk-d51bbb5c35bb578dcce52d4950f26e714ab45cb9.tar.gz
Revert "Split Stk into a client apk and a lib."
This reverts commit 7e1566067f791a8145d36e397cdd6b842cc89240. Reason for revert: b/148821604 Change-Id: I9f5682f99c73c447a5af8d29ed662f1bd68a0bf6
Diffstat (limited to 'src/com')
-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);