のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

ConfigurationChanged

   4098     final void handleActivityConfigurationChanged(IBinder token) {
   4099         ActivityClientRecord r = mActivities.get(token);
   4100         if (r == null || r.activity == null) {
   4101             return;
   4102         }
   4103 
   4104         if (DEBUG_CONFIGURATION) Slog.v(TAG, "Handle activity config changed: "
   4105                 + r.activityInfo.name);
   4106 
   4107         performConfigurationChanged(r.activity, mCompatConfiguration);
   4108 
   4109         freeTextLayoutCachesIfNeeded(r.activity.mCurrentConfig.diff(mCompatConfiguration));
   4110 
   4111         mSomeActivitiesChanged = true;
   4112     }
 4087     static void freeTextLayoutCachesIfNeeded(int configDiff) {
   4088         if (configDiff != 0) {
   4089             // Ask text layout engine to free its caches if there is a locale change
   4090             boolean hasLocaleConfigChange = ((configDiff & ActivityInfo.CONFIG_LOCALE) != 0);
   4091             if (hasLocaleConfigChange) {
   4092                 Canvas.freeTextLayoutCaches();
   4093                 if (DEBUG_CONFIGURATION) Slog.v(TAG, "Cleared TextLayout Caches");
   4094             }
   4095         }
   4096     }