Initialize voiceDialer in onCreate instead of onStart
Bug: 5234283
Apparently in Honeycomb, a change was made so that
an onscreen activity would be stopped when the screen
turned off. This was not the case in prior releases.
The VoiceDialerActivity was initializing the TTS
engine and recognizer engine in onStart(), and
tearing everything down in onStop(), which means
that post Honeycomb, it doesn't work if the screen is off.
Now, it initializes everything in onCreate() and
tears it down in onDestroy().
It would be much better if all of the connections to
the TTS engine and bluetooth, along with the state
control, were kept in a service. This way the activity
could be dumb, and it could be destroyed and recreated
without losing state. That's far too big of a change for
ICS at this point though.
Change-Id: Id27996cc64f919061f0c513660837f6dff53d467
1 file changed