@@ -197,7 +197,6 @@ private void registerListeners() {
197197 filter .addAction (TelephonyIntents .SPN_STRINGS_UPDATED_ACTION );
198198 filter .addAction (ConnectivityManager .CONNECTIVITY_ACTION );
199199 filter .addAction (ConnectivityManager .INET_CONDITION_ACTION );
200- filter .addAction (Intent .ACTION_CONFIGURATION_CHANGED );
201200 filter .addAction (Intent .ACTION_AIRPLANE_MODE_CHANGED );
202201 mContext .registerReceiver (this , filter , null , mReceiverHandler );
203202 mListening = true ;
@@ -339,8 +338,6 @@ public void onReceive(Context context, Intent intent) {
339338 if (action .equals (ConnectivityManager .CONNECTIVITY_ACTION ) ||
340339 action .equals (ConnectivityManager .INET_CONDITION_ACTION )) {
341340 updateConnectivity ();
342- } else if (action .equals (Intent .ACTION_CONFIGURATION_CHANGED )) {
343- handleConfigurationChanged ();
344341 } else if (action .equals (Intent .ACTION_AIRPLANE_MODE_CHANGED )) {
345342 refreshLocale ();
346343 updateAirplaneMode (false );
@@ -373,8 +370,18 @@ public void onReceive(Context context, Intent intent) {
373370 }
374371 }
375372
376- public void handleConfigurationChanged () {
373+ public void onConfigurationChanged () {
377374 mConfig = Config .readConfig (mContext );
375+ mReceiverHandler .post (new Runnable () {
376+ @ Override
377+ public void run () {
378+ handleConfigurationChanged ();
379+ }
380+ });
381+ }
382+
383+ @ VisibleForTesting
384+ void handleConfigurationChanged () {
378385 for (MobileSignalController mobileSignalController : mMobileSignalControllers .values ()) {
379386 mobileSignalController .setConfiguration (mConfig );
380387 }
0 commit comments