From 19b7e95d646b768ee66ff54497aab3067628869c Mon Sep 17 00:00:00 2001 From: Andrew Sapperstein Date: Tue, 4 Mar 2014 15:55:52 -0800 Subject: [PATCH] Use BroadcastReceiver to listen for LOCALE_CHANGED Previously, we used the service to listen to Intent.ACTION_LOCALE_CHANGED. This never worked because that intent is broadcasted by the system and so Services will never receive them. Just use the existing forwarding infrastructure to send the broadcast to the service. Change-Id: I50ef625804e76e2348d3fe14686778d54463b78d --- AndroidManifest.xml | 2 +- .../android/email/service/EmailBroadcastProcessorService.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 64c8f9b07..dcf228f94 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -410,6 +410,7 @@ + @@ -668,7 +669,6 @@ - diff --git a/src/com/android/email/service/EmailBroadcastProcessorService.java b/src/com/android/email/service/EmailBroadcastProcessorService.java index a8853c346..b3a151099 100644 --- a/src/com/android/email/service/EmailBroadcastProcessorService.java +++ b/src/com/android/email/service/EmailBroadcastProcessorService.java @@ -138,7 +138,8 @@ public class EmailBroadcastProcessorService extends IntentService { AccountSettings.actionSettingsWithDebug(this); } else if (AccountManager.LOGIN_ACCOUNTS_CHANGED_ACTION.equals(broadcastAction)) { onSystemAccountChanged(); - } else if (UIProvider.ACTION_UPDATE_NOTIFICATION.equals((broadcastAction))) { + } else if (Intent.ACTION_LOCALE_CHANGED.equals(broadcastAction) || + UIProvider.ACTION_UPDATE_NOTIFICATION.equals((broadcastAction))) { broadcastIntent.setClass(this, EmailIntentService.class); startService(broadcastIntent); }