Close Tone Dialog if the requested tone has already been stopped

It is theoretically possible that the tone requested by PLAY TONE
command has already been stopped before Tone Dialog is created if the
specified duration is too short. To avoid keep displaying Tone Dialog in
that scenario, Tone Dialog must finish itself if the tone has already
been stopped.

Bug: 148244769
Test: Manual

Change-Id: I105b2a16ace6a554d475c653ac982d2c339a7fec
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java
index 4140d15..e03487c 100644
--- a/src/com/android/stk/StkAppService.java
+++ b/src/com/android/stk/StkAppService.java
@@ -2343,6 +2343,10 @@
         }
     }
 
+    boolean isNoTonePlaying() {
+        return mTonePlayer == null ? true : false;
+    }
+
     private void launchOpenChannelDialog(final int slotId) {
         TextMessage msg = mStkContext[slotId].mCurrentCmd.geTextMessage();
         if (msg == null) {