Loading core/java/android/app/ActivityThread.java +5 −6 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ import static android.content.ContentResolver.DEPRECATE_DATA_COLUMNS; import static android.content.ContentResolver.DEPRECATE_DATA_PREFIX; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.INVALID_DISPLAY; import static android.window.ConfigurationHelper.diffPublicWithSizeBuckets; import static android.window.ConfigurationHelper.freeTextLayoutCachesIfNeeded; import static android.window.ConfigurationHelper.isDifferentDisplay; import static android.window.ConfigurationHelper.shouldUpdateResources; Loading Loading @@ -5880,15 +5879,15 @@ public final class ActivityThread extends ClientTransactionHandler final boolean movedToDifferentDisplay = isDifferentDisplay(activity.getDisplayId(), displayId); final ActivityClientRecord r = mActivities.get(activityToken); final int diff = diffPublicWithSizeBuckets(activity.mCurrentConfig, newConfig, r != null ? r.mSizeConfigurations : null); final Configuration currentConfig = activity.mCurrentConfig; final int diff = (currentConfig == null) ? 0xffffffff : currentConfig.diffPublicOnly(newConfig); final boolean hasPublicConfigChange = diff != 0; // TODO(b/173090263): Use diff instead after the improvement of AssetManager and // ResourcesImpl constructions. final boolean shouldUpdateResources = hasPublicConfigChange || shouldUpdateResources(activityToken, activity.mCurrentConfig, newConfig, amOverrideConfig, movedToDifferentDisplay, hasPublicConfigChange); || shouldUpdateResources(activityToken, currentConfig, newConfig, amOverrideConfig, movedToDifferentDisplay, hasPublicConfigChange); final boolean shouldReportChange = hasPublicConfigChange // If this activity doesn't handle any of the config changes, then don't bother // calling onConfigurationChanged. Otherwise, report to the activity for the Loading core/java/android/window/ConfigurationHelper.java +0 −18 Original line number Diff line number Diff line Loading @@ -47,24 +47,6 @@ public class ConfigurationHelper { } } /** * A helper method to filter out {@link ActivityInfo#CONFIG_SCREEN_SIZE} if the * {@link Configuration#diffPublicOnly(Configuration) diff} of two {@link Configuration} * doesn't cross the boundary. * * @see SizeConfigurationBuckets#filterDiff(int, Configuration, Configuration, * SizeConfigurationBuckets) */ public static int diffPublicWithSizeBuckets(@Nullable Configuration currentConfig, @NonNull Configuration newConfig, @Nullable SizeConfigurationBuckets buckets) { // If current configuration is null, it is definitely different from updated Configuration. if (currentConfig == null) { return 0xffffffff; } int publicDiff = currentConfig.diffPublicOnly(newConfig); return SizeConfigurationBuckets.filterDiff(publicDiff, currentConfig, newConfig, buckets); } /** * Returns {@code true} if the {@link android.content.res.Resources} associated with * a {@code token} needs to be updated. Loading Loading
core/java/android/app/ActivityThread.java +5 −6 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ import static android.content.ContentResolver.DEPRECATE_DATA_COLUMNS; import static android.content.ContentResolver.DEPRECATE_DATA_PREFIX; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.INVALID_DISPLAY; import static android.window.ConfigurationHelper.diffPublicWithSizeBuckets; import static android.window.ConfigurationHelper.freeTextLayoutCachesIfNeeded; import static android.window.ConfigurationHelper.isDifferentDisplay; import static android.window.ConfigurationHelper.shouldUpdateResources; Loading Loading @@ -5880,15 +5879,15 @@ public final class ActivityThread extends ClientTransactionHandler final boolean movedToDifferentDisplay = isDifferentDisplay(activity.getDisplayId(), displayId); final ActivityClientRecord r = mActivities.get(activityToken); final int diff = diffPublicWithSizeBuckets(activity.mCurrentConfig, newConfig, r != null ? r.mSizeConfigurations : null); final Configuration currentConfig = activity.mCurrentConfig; final int diff = (currentConfig == null) ? 0xffffffff : currentConfig.diffPublicOnly(newConfig); final boolean hasPublicConfigChange = diff != 0; // TODO(b/173090263): Use diff instead after the improvement of AssetManager and // ResourcesImpl constructions. final boolean shouldUpdateResources = hasPublicConfigChange || shouldUpdateResources(activityToken, activity.mCurrentConfig, newConfig, amOverrideConfig, movedToDifferentDisplay, hasPublicConfigChange); || shouldUpdateResources(activityToken, currentConfig, newConfig, amOverrideConfig, movedToDifferentDisplay, hasPublicConfigChange); final boolean shouldReportChange = hasPublicConfigChange // If this activity doesn't handle any of the config changes, then don't bother // calling onConfigurationChanged. Otherwise, report to the activity for the Loading
core/java/android/window/ConfigurationHelper.java +0 −18 Original line number Diff line number Diff line Loading @@ -47,24 +47,6 @@ public class ConfigurationHelper { } } /** * A helper method to filter out {@link ActivityInfo#CONFIG_SCREEN_SIZE} if the * {@link Configuration#diffPublicOnly(Configuration) diff} of two {@link Configuration} * doesn't cross the boundary. * * @see SizeConfigurationBuckets#filterDiff(int, Configuration, Configuration, * SizeConfigurationBuckets) */ public static int diffPublicWithSizeBuckets(@Nullable Configuration currentConfig, @NonNull Configuration newConfig, @Nullable SizeConfigurationBuckets buckets) { // If current configuration is null, it is definitely different from updated Configuration. if (currentConfig == null) { return 0xffffffff; } int publicDiff = currentConfig.diffPublicOnly(newConfig); return SizeConfigurationBuckets.filterDiff(publicDiff, currentConfig, newConfig, buckets); } /** * Returns {@code true} if the {@link android.content.res.Resources} associated with * a {@code token} needs to be updated. Loading