summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/stk/StkAppService.java11
-rw-r--r--src/com/android/stk/ToneDialog.java6
2 files changed, 10 insertions, 7 deletions
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java
index 4ef5f6c..0f9f0e8 100644
--- a/src/com/android/stk/StkAppService.java
+++ b/src/com/android/stk/StkAppService.java
@@ -1088,13 +1088,6 @@ public class StkAppService extends Service implements Runnable {
case DISPLAY_TEXT:
TextMessage msg = cmdMsg.geTextMessage();
waitForUsersResponse = msg.responseNeeded;
- if (mStkContext[slotId].lastSelectedItem != null) {
- msg.title = mStkContext[slotId].lastSelectedItem;
- } else if (mStkContext[slotId].mMainCmd != null){
- if (!getResources().getBoolean(R.bool.show_menu_title_only_on_menu)) {
- msg.title = mStkContext[slotId].mMainCmd.getMenu().title;
- }
- }
//If we receive a low priority Display Text and the device is
// not displaying any STK related activity and the screen is not idle
// ( that is, device is in an interactive state), then send a screen busy
@@ -2327,6 +2320,10 @@ public class StkAppService extends Service implements Runnable {
}
}
+ boolean isNoTonePlaying() {
+ return mTonePlayer == null ? true : false;
+ }
+
private void launchOpenChannelDialog(final int slotId) {
TextMessage msg = mStkContext[slotId].mCurrentCmd.geTextMessage();
if (msg == null) {
diff --git a/src/com/android/stk/ToneDialog.java b/src/com/android/stk/ToneDialog.java
index 2efeecd..639a216 100644
--- a/src/com/android/stk/ToneDialog.java
+++ b/src/com/android/stk/ToneDialog.java
@@ -92,6 +92,12 @@ public class ToneDialog extends Activity {
mAlertDialog = alertDialogBuilder.create();
mAlertDialog.show();
+
+ StkAppService appService = StkAppService.getInstance();
+ // Finish the activity if the specified duration is too short and timed-out already.
+ if (appService != null && (appService.isNoTonePlaying())) {
+ finish();
+ }
}
@Override