Loading core/java/android/view/ViewRootImpl.java +18 −1 Original line number Diff line number Diff line Loading @@ -133,6 +133,7 @@ import static android.window.DesktopModeFlags.ENABLE_CAPTION_COMPAT_INSET_FORCE_ import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE; import static com.android.text.flags.Flags.disableHandwritingInitiatorForIme; import static com.android.window.flags.Flags.enableBufferTransformHintFromDisplay; import static com.android.window.flags.Flags.enableWindowContextResourcesUpdateOnConfigChange; import static com.android.window.flags.Flags.predictiveBackSwipeEdgeNoneApi; import static com.android.window.flags.Flags.setScPropertiesInClient; Loading Loading @@ -271,7 +272,9 @@ import android.window.OnBackInvokedCallback; import android.window.OnBackInvokedDispatcher; import android.window.ScreenCapture; import android.window.SurfaceSyncGroup; import android.window.WindowContext; import android.window.WindowOnBackInvokedDispatcher; import android.window.WindowTokenClient; import com.android.internal.R; import com.android.internal.annotations.GuardedBy; Loading Loading @@ -6609,12 +6612,26 @@ public final class ViewRootImpl implements ViewParent, mActivityConfigCallback.onConfigurationChanged(overrideConfig, newDisplayId, activityWindowInfo); } else { // There is no activity callback - update the configuration right away. if (enableWindowContextResourcesUpdateOnConfigChange()) { // There is no activity callback - update resources for window token, if needed. final WindowTokenClient windowTokenClient = getWindowTokenClient(); if (windowTokenClient != null) { windowTokenClient.onConfigurationChanged( mLastReportedMergedConfiguration.getMergedConfiguration(), newDisplayId == INVALID_DISPLAY ? mDisplay.getDisplayId() : newDisplayId); } } updateConfiguration(newDisplayId); } mForceNextConfigUpdate = false; } private WindowTokenClient getWindowTokenClient() { if (!(mContext instanceof WindowContext)) return null; return (WindowTokenClient) mContext.getWindowContextToken(); } /** * Update display and views if last applied merged configuration changed. * @param newDisplayId Id of new display if moved, {@link Display#INVALID_DISPLAY} otherwise. Loading core/java/android/window/WindowTokenClient.java +0 −1 Original line number Diff line number Diff line Loading @@ -106,7 +106,6 @@ public class WindowTokenClient extends Binder { * @param newConfig the updated {@link Configuration} * @param newDisplayId the updated {@link android.view.Display} ID */ @VisibleForTesting(visibility = PACKAGE) @MainThread public void onConfigurationChanged(Configuration newConfig, int newDisplayId) { onConfigurationChanged(newConfig, newDisplayId, true /* shouldReportConfigChange */); Loading core/java/android/window/flags/lse_desktop_experience.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -676,6 +676,17 @@ flag { } } flag { name: "enable_window_context_resources_update_on_config_change" namespace: "lse_desktop_experience" description: "Updates window context resources before the view receives the config change callback." bug: "394527409" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "enable_desktop_tab_tearing_minimize_animation_bugfix" namespace: "lse_desktop_experience" Loading Loading
core/java/android/view/ViewRootImpl.java +18 −1 Original line number Diff line number Diff line Loading @@ -133,6 +133,7 @@ import static android.window.DesktopModeFlags.ENABLE_CAPTION_COMPAT_INSET_FORCE_ import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE; import static com.android.text.flags.Flags.disableHandwritingInitiatorForIme; import static com.android.window.flags.Flags.enableBufferTransformHintFromDisplay; import static com.android.window.flags.Flags.enableWindowContextResourcesUpdateOnConfigChange; import static com.android.window.flags.Flags.predictiveBackSwipeEdgeNoneApi; import static com.android.window.flags.Flags.setScPropertiesInClient; Loading Loading @@ -271,7 +272,9 @@ import android.window.OnBackInvokedCallback; import android.window.OnBackInvokedDispatcher; import android.window.ScreenCapture; import android.window.SurfaceSyncGroup; import android.window.WindowContext; import android.window.WindowOnBackInvokedDispatcher; import android.window.WindowTokenClient; import com.android.internal.R; import com.android.internal.annotations.GuardedBy; Loading Loading @@ -6609,12 +6612,26 @@ public final class ViewRootImpl implements ViewParent, mActivityConfigCallback.onConfigurationChanged(overrideConfig, newDisplayId, activityWindowInfo); } else { // There is no activity callback - update the configuration right away. if (enableWindowContextResourcesUpdateOnConfigChange()) { // There is no activity callback - update resources for window token, if needed. final WindowTokenClient windowTokenClient = getWindowTokenClient(); if (windowTokenClient != null) { windowTokenClient.onConfigurationChanged( mLastReportedMergedConfiguration.getMergedConfiguration(), newDisplayId == INVALID_DISPLAY ? mDisplay.getDisplayId() : newDisplayId); } } updateConfiguration(newDisplayId); } mForceNextConfigUpdate = false; } private WindowTokenClient getWindowTokenClient() { if (!(mContext instanceof WindowContext)) return null; return (WindowTokenClient) mContext.getWindowContextToken(); } /** * Update display and views if last applied merged configuration changed. * @param newDisplayId Id of new display if moved, {@link Display#INVALID_DISPLAY} otherwise. Loading
core/java/android/window/WindowTokenClient.java +0 −1 Original line number Diff line number Diff line Loading @@ -106,7 +106,6 @@ public class WindowTokenClient extends Binder { * @param newConfig the updated {@link Configuration} * @param newDisplayId the updated {@link android.view.Display} ID */ @VisibleForTesting(visibility = PACKAGE) @MainThread public void onConfigurationChanged(Configuration newConfig, int newDisplayId) { onConfigurationChanged(newConfig, newDisplayId, true /* shouldReportConfigChange */); Loading
core/java/android/window/flags/lse_desktop_experience.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -676,6 +676,17 @@ flag { } } flag { name: "enable_window_context_resources_update_on_config_change" namespace: "lse_desktop_experience" description: "Updates window context resources before the view receives the config change callback." bug: "394527409" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "enable_desktop_tab_tearing_minimize_animation_bugfix" namespace: "lse_desktop_experience" Loading