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: daa3432517ef6d73b40095057777b78285954e1d
  1. res/
  2. src/
  3. tests/
  4. Android.mk
  5. AndroidManifest.xml
  6. proguard.flags