Code example for ToneGenerator

Methods: stopTone

0
        } 
    } 
 
    public void stop() { 
        if (mToneGenerator != null) {
            mToneGenerator.stopTone();
        } 
    } 
 
    public void release() { 
        mToneGenerator.release();
    } 
 
    private int getToneId(Tone tone) {
        int toneId = ToneGenerator.TONE_PROP_BEEP;
 
        if (tone != null && mToneMap.containsKey(tone)) {
            toneId = mToneMap.get(tone);
        } 
        return toneId;
    }