Every Service gets onConfigurationChanged() called on it when the configuration changes; just implement that, and do your work if the locale in the new configuration is different than the current one you are using.
On Mon, Apr 20, 2009 at 2:34 PM, va <vandra.w...@gmail.com> wrote: > > I'm implementing a service that needs to be aware of locale changes. > This can currently be done by having the service listen to the > ACTION_CONFIGURATION_CHANGED intent. However, this intent occurs way > too often - orientation and keyboard changes etc. > > Can we add a separate ACTION_LOCALE_CHANGED intent? > > I'd suggest that in ActivityManagerSerivce.updateConfigurationLocked > (), after we broadcast a ACTION_CONFIGURATION_CHANGED, we also post a > ACTION_LOCALE_CHANGED (with the locale info), if the configuration > update is related to a locale change. (This intent can perhaps be > sticky too). > > This way, the service gets notified only of locale changes, and it > does not have to repeatedly process configuration changes and ignore a > majority of them as they are not related to locale. > > Thoughts? > > Thanks, > V > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to android-framework@googlegroups.com To unsubscribe from this group, send email to android-framework+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---