Merge "Fix split layout didn't update config when rotation" into udc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d972dd132c
@@ -722,10 +722,6 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
|
||||
return bounds.width() > bounds.height();
|
||||
}
|
||||
|
||||
public boolean isDensityChanged(int densityDpi) {
|
||||
return mDensity != densityDpi;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return if this layout is landscape.
|
||||
*/
|
||||
|
||||
@@ -83,7 +83,6 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.LauncherApps;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Rect;
|
||||
import android.hardware.devicestate.DeviceStateManager;
|
||||
import android.os.Bundle;
|
||||
@@ -1779,8 +1778,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
||||
mRootTaskInfo = taskInfo;
|
||||
if (mSplitLayout != null
|
||||
&& mSplitLayout.updateConfiguration(mRootTaskInfo.configuration)
|
||||
&& mMainStage.isActive()
|
||||
&& !ENABLE_SHELL_TRANSITIONS) {
|
||||
&& mMainStage.isActive()) {
|
||||
// Clear the divider remote animating flag as the divider will be re-rendered to apply
|
||||
// the new rotation config.
|
||||
mIsDividerRemoteAnimating = false;
|
||||
@@ -2218,20 +2216,6 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
||||
mDisplayController.addDisplayChangingController(this::onDisplayChange);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisplayConfigurationChanged(int displayId, Configuration newConfig) {
|
||||
if (displayId != DEFAULT_DISPLAY) {
|
||||
return;
|
||||
}
|
||||
if (mSplitLayout != null && mSplitLayout.isDensityChanged(newConfig.densityDpi)
|
||||
&& mMainStage.isActive()
|
||||
&& mSplitLayout.updateConfiguration(newConfig)
|
||||
&& ENABLE_SHELL_TRANSITIONS) {
|
||||
mSplitLayout.update(null /* t */);
|
||||
onLayoutSizeChanged(mSplitLayout);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update surfaces of the split screen layout based on the current state
|
||||
* @param transaction to write the updates to
|
||||
|
||||
Reference in New Issue
Block a user