Commit 3420f3cc authored by Wink Saville's avatar Wink Saville Committed by android code review
Browse files

Merge "No response sent when backlight is OFF"

parents af0dd9f0 99fccc1c
......@@ -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;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment