Snap for 7705216 from 2638a542ce to tm-release

Change-Id: I5a818b36d283077bf8e534d1f5fe037bc88bb122
This commit is contained in:
Android Build Coastguard Worker
2021-09-05 01:08:16 +00:00
5 changed files with 16 additions and 10 deletions
@@ -289,9 +289,11 @@ public abstract class SwipeUpAnimationLogic implements
mRemoteTargetHandles[0].mTaskViewSimulator.setPreview(primaryTaskTarget);
}
} else {
int[] taskIds = LauncherSplitScreenListener.INSTANCE.getNoCreate()
.getRunningSplitTaskIds();
// We're in staged split
primaryTaskTarget = targets.apps[0];
secondaryTaskTarget = targets.apps[1];
primaryTaskTarget = targets.findTask(taskIds[0]);
secondaryTaskTarget = targets.findTask(taskIds[1]);
mStagedSplitBounds = new SplitConfigurationOptions.StagedSplitBounds(
primaryTaskTarget.screenSpaceBounds,
secondaryTaskTarget.screenSpaceBounds, dividerTarget.screenSpaceBounds);
@@ -358,12 +358,14 @@ public class TouchInteractionService extends Service implements PluginListener<O
mDeviceState = new RecentsAnimationDeviceState(this, true);
mDisplayManager = getSystemService(DisplayManager.class);
mTaskbarManager = new TaskbarManager(this);
mRotationTouchHelper = mDeviceState.getRotationTouchHelper();
mDeviceState.addNavigationModeChangedCallback(this::onNavigationModeChanged);
mDeviceState.addOneHandedModeChangedCallback(this::onOneHandedModeOverlayChanged);
// Call runOnUserUnlocked() before any other callbacks to ensure everything is initialized.
mDeviceState.runOnUserUnlocked(this::onUserUnlocked);
mDeviceState.runOnUserUnlocked(mTaskbarManager::onUserUnlocked);
mDeviceState.addNavigationModeChangedCallback(this::onNavigationModeChanged);
mDeviceState.addOneHandedModeChangedCallback(this::onOneHandedModeOverlayChanged);
ProtoTracer.INSTANCE.get(this).add(this);
LauncherSplitScreenListener.INSTANCE.get(this).init();
sConnected = true;
@@ -51,8 +51,8 @@ import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat.
*/
public class TaskViewSimulator implements TransformParams.BuilderProxy {
private final String TAG = "TaskViewSimulator";
private final boolean DEBUG = false;
private static final String TAG = "TaskViewSimulator";
private static final boolean DEBUG = false;
private final Rect mTmpCropRect = new Rect();
private final RectF mTempRectF = new RectF();
@@ -1561,6 +1561,7 @@ public final class LauncherInstrumentation {
float getWindowCornerRadius() {
final Resources resources = getResources();
if (!supportsRoundedCornersOnWindows(resources)) {
Log.d(TAG, "No rounded corners");
return 0f;
}
@@ -1579,7 +1580,8 @@ public final class LauncherInstrumentation {
// Always use the smallest radius to make sure the rounded corners will
// completely cover the display.
return Math.min(topRadius, bottomRadius);
Log.d(TAG, "Rounded corners top: " + topRadius + " bottom: " + bottomRadius);
return Math.max(topRadius, bottomRadius);
}
private static boolean supportsRoundedCornersOnWindows(Resources resources) {
@@ -83,9 +83,9 @@ public final class Workspace extends Home {
+ mLauncher.getTouchSlop());
mLauncher.swipeToState(
0,
windowCornerRadius,
startY,
0,
windowCornerRadius,
startY - swipeHeight - mLauncher.getTouchSlop(),
12,
ALL_APPS_STATE_ORDINAL, LauncherInstrumentation.GestureScope.INSIDE);