Move ToneGenerator recreation/release to onStart/onStop

There is no reason to do the costly ToneGenerator initialization
inside onResume, which gets called during the Dialer -> InCallUI
transition. Move it to onStart/onStop so it only happens when Dialer
is actually in the background.

Measurement of time taken for InCallActivity start -> onResumed, 10 runs

Before: Average 541.9ms SD: 152.4ms
After: Average 350.5ms SD: 81.1ms

Bug: 18373617

Change-Id: I192e2bcc9fd4b7d423d804f333d8d32bff3f58c1
1 file changed
tree: 730b6d85a8efdc6d53f1f30f2d5aa52e16b6f1d7
  2. AndroidManifest.xml
  3. proguard.flags
  4. res/
  5. src/
  6. tests/