Merge "PIP: Start consulting TaskOrganizer for bounds instead of framework." into rvc-dev am: 127d9b632f am: 593eddca33
Change-Id: I723d9e5fbba54f35974f957e9f12a09d1279f1ba
This commit is contained in:
@@ -103,6 +103,7 @@ public class PipTaskOrganizer extends TaskOrganizer {
|
||||
@Override
|
||||
public void onPipAnimationEnd(SurfaceControl.Transaction tx,
|
||||
PipAnimationController.PipTransitionAnimator animator) {
|
||||
finishResize(tx, animator.getDestinationBounds(), animator.getTransitionDirection());
|
||||
mMainHandler.post(() -> {
|
||||
for (int i = mPipTransitionCallbacks.size() - 1; i >= 0; i--) {
|
||||
final PipTransitionCallback callback = mPipTransitionCallbacks.get(i);
|
||||
@@ -110,7 +111,6 @@ public class PipTaskOrganizer extends TaskOrganizer {
|
||||
animator.getTransitionDirection());
|
||||
}
|
||||
});
|
||||
finishResize(tx, animator.getDestinationBounds(), animator.getTransitionDirection());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,12 +16,10 @@
|
||||
|
||||
package com.android.systemui.pip.phone;
|
||||
|
||||
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.app.ActivityManager.StackInfo;
|
||||
import android.app.IActivityTaskManager;
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
@@ -169,15 +167,7 @@ public class PipMotionHelper implements PipAppOpsListener.Callback,
|
||||
*/
|
||||
void synchronizePinnedStackBounds() {
|
||||
cancelAnimations();
|
||||
try {
|
||||
StackInfo stackInfo = mActivityTaskManager.getStackInfo(
|
||||
WINDOWING_MODE_PINNED, ACTIVITY_TYPE_UNDEFINED);
|
||||
if (stackInfo != null) {
|
||||
mBounds.set(stackInfo.bounds);
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Failed to get pinned stack bounds");
|
||||
}
|
||||
mBounds.set(mPipTaskOrganizer.getLastReportedBounds());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user