summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorHongwei Wang <hwwang@google.com>2022-05-18 11:14:53 -0700
committerHongwei Wang <hwwang@google.com>2022-05-25 14:35:25 -0700
commitfe5078f0263daa7d6bc4872853269f2ddea5fa44 (patch)
treeca283fa3f3fedc5a2057b3d012d33aadbf9d1d30 /core/java/android
parente55b0a1f178f295bba783f1acaa815b9601f47b8 (diff)
Use snapshot in enter content-pip animation
When entering content-pip - We take a snapshot for the host task within the ActivityStarter#startActivityInner function, this is to make sure that the snapshot is taken before an app switches to the placeholder content - We retrieve the snapshot in WM Shell when animating the newly created content-pip task, and use that snapshot during the animation - This works similar to the solid color content overlay when app enters PiP without specifying a valid source rect hint. Therefore, we abstract the functionality to a dedicated PipContentOverlay class Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dRSTf7prHc0krPhTKZ0kXx Bug: 220191201 Test: enter content-pip from ApiDemos app, see also Video Change-Id: I2420402341a910b44bd8f64e3ad518ebef41bc19
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/TaskInfo.java17
1 files changed, 0 insertions, 17 deletions
diff --git a/core/java/android/app/TaskInfo.java b/core/java/android/app/TaskInfo.java
index 1b87945ec985..7910f1a426c2 100644
--- a/core/java/android/app/TaskInfo.java
+++ b/core/java/android/app/TaskInfo.java
@@ -34,10 +34,7 @@ import android.graphics.Rect;
import android.os.Build;
import android.os.IBinder;
import android.os.Parcel;
-import android.os.RemoteException;
-import android.util.Log;
import android.view.DisplayCutout;
-import android.window.TaskSnapshot;
import android.window.WindowContainerToken;
import java.lang.annotation.Retention;
@@ -355,20 +352,6 @@ public class TaskInfo {
return isVisible;
}
- /**
- * @param isLowResolution
- * @return
- * @hide
- */
- public TaskSnapshot getTaskSnapshot(boolean isLowResolution) {
- try {
- return ActivityTaskManager.getService().getTaskSnapshot(taskId, isLowResolution);
- } catch (RemoteException e) {
- Log.e(TAG, "Failed to get task snapshot, taskId=" + taskId, e);
- return null;
- }
- }
-
/** @hide */
@NonNull
@TestApi