diff options
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/stk/StkAppService.java | 11 | ||||
-rw-r--r-- | src/com/android/stk/ToneDialog.java | 6 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java index 5029e72..c26f5f6 100644 --- a/src/com/android/stk/StkAppService.java +++ b/src/com/android/stk/StkAppService.java @@ -1089,13 +1089,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 @@ -2328,6 +2321,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 |