summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2012-09-14 08:53:22 -0700
committerandroid code review <noreply-gerritcodereview@google.com>2012-09-14 08:53:23 -0700
commit3420f3cc4dc3483de857d5fcc957d852e31521b0 (patch)
treebd85ace68998855f628e61ac2570864846fcf66b
parentaf0dd9f082ff3ab5295cbf00eb2ea6d8db820ce6 (diff)
parent99fccc1c113d9b7a030dc7c945d0750748cc4af9 (diff)
downloadpackages_apps_Stk-3420f3cc4dc3483de857d5fcc957d852e31521b0.zip
packages_apps_Stk-3420f3cc4dc3483de857d5fcc957d852e31521b0.tar.gz
packages_apps_Stk-3420f3cc4dc3483de857d5fcc957d852e31521b0.tar.bz2
Merge "No response sent when backlight is OFF"
-rw-r--r--src/com/android/stk/ToneDialog.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/stk/ToneDialog.java b/src/com/android/stk/ToneDialog.java
index 3251aba..0370939 100644
--- a/src/com/android/stk/ToneDialog.java
+++ b/src/com/android/stk/ToneDialog.java
@@ -38,6 +38,7 @@ public class ToneDialog extends Activity {
TextMessage toneMsg = null;
ToneSettings settings = null;
TonePlayer player = null;
+ boolean mIsResponseSent = false;
/**
* Handler used to stop tones from playing when the duration ends.
@@ -98,8 +99,9 @@ public class ToneDialog extends Activity {
@Override
protected void onDestroy() {
super.onDestroy();
-
- mToneStopper.removeMessages(MSG_ID_STOP_TONE);
+ if (mIsResponseSent) {
+ mToneStopper.removeMessages(MSG_ID_STOP_TONE);
+ }
player.stop();
player.release();
mVibrator.cancel();
@@ -129,5 +131,6 @@ public class ToneDialog extends Activity {
args.putInt(StkAppService.OPCODE, StkAppService.OP_RESPONSE);
args.putInt(StkAppService.RES_ID, resId);
startService(new Intent(this, StkAppService.class).putExtras(args));
+ mIsResponseSent = true;
}
}