title: ToneGenerator crashes in android 6.0
body: <p>In my application i am using ToneGenerator to play simple sound. When test my application by compiling the application with 6.0, my application randomy crashing due to ToneGenerator init method. Below is the exception.</p>
  
  <pre><code> java.lang.RuntimeException: Init failed 
  04-21 12:34:05.497  7166  7166 E MyApplication:     at android.media.ToneGenerator.native_setup(Native Method) 
  04-21 12:34:05.497  7166  7166 E MyApplication:     at android.media.ToneGenerator.&lt;init&gt;(ToneGenerator.java:746)
  </code></pre>
  
  <p>I am using the tone generator in below way.</p>
  
  <pre><code>    public ToneGenerator toneGenerator;
      public void playSound() { 
         if (toneGenerator == null) {
            toneGenerator = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 100);
          }
         toneGenerator.startTone(ToneGenerator.TONE_CDMA_ANSWER, 200);
     }
  
  
     public void releaseToneGenerator() {
        if (toneGenerator != null) {
          toneGenerator.release();
        }
      }
  </code></pre>
  
  <p>Any one faced same issue?..Previously my application was running on  4.4 and in that we did not observe any crash. In in 6.0 application is crashing</p>