diff options
| author | Evan Rosky <erosky@google.com> | 2019-11-05 10:26:24 -0800 |
|---|---|---|
| committer | Evan Rosky <erosky@google.com> | 2020-01-31 10:26:45 -0800 |
| commit | 0037e5f9011ab8e56fdcd4bf1d1702f57ab20b21 (patch) | |
| tree | c02eda80f5cc2e858fc76ab4e01ada35d9d83120 /core/java/android/app/TaskInfo.java | |
| parent | 39df263cc5e2bde767709e158baa4d145c60384e (diff) | |
Add TaskTile concept to Window Manager
This adds the concept of a TaskTile to the WM. Due to
complexities in the current Stack/Task relationship, tiles
can't actually be part of the hierarchy, so the Stack
level has to internally resolve configurations as if they
were.
The TaskTiles themselves *are* ActivityStacks though from
the client/sysui perspective, though.
Bug: 133381284
Test: Added TaskTileTests
Change-Id: I9baad5ec899b4fab323a36c1533a40081727a2f7
Diffstat (limited to 'core/java/android/app/TaskInfo.java')
| -rw-r--r-- | core/java/android/app/TaskInfo.java | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/core/java/android/app/TaskInfo.java b/core/java/android/app/TaskInfo.java index fe9c64038909..662ca6eb2c19 100644 --- a/core/java/android/app/TaskInfo.java +++ b/core/java/android/app/TaskInfo.java @@ -16,6 +16,8 @@ package android.app; +import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE; + import android.annotation.NonNull; import android.annotation.Nullable; import android.compat.annotation.UnsupportedAppUsage; @@ -25,6 +27,7 @@ import android.content.res.Configuration; import android.os.Parcel; import android.os.RemoteException; import android.util.Log; +import android.view.IWindowContainer; /** * Stores information about a particular Task. @@ -138,6 +141,19 @@ public class TaskInfo { @UnsupportedAppUsage public final Configuration configuration = new Configuration(); + /** + * Used as an opaque identifier for this task. + * @hide + */ + @NonNull + public IWindowContainer token; + + /** + * The activity type of the top activity in this task. + * @hide + */ + public @WindowConfiguration.ActivityType int topActivityType; + TaskInfo() { // Do nothing } @@ -160,6 +176,11 @@ public class TaskInfo { } } + /** @hide */ + public boolean isResizable() { + return resizeMode != RESIZE_MODE_UNRESIZEABLE; + } + /** * Reads the TaskInfo from a parcel. */ @@ -186,6 +207,8 @@ public class TaskInfo { supportsSplitScreenMultiWindow = source.readBoolean(); resizeMode = source.readInt(); configuration.readFromParcel(source); + token = IWindowContainer.Stub.asInterface(source.readStrongBinder()); + topActivityType = source.readInt(); } /** @@ -221,6 +244,8 @@ public class TaskInfo { dest.writeBoolean(supportsSplitScreenMultiWindow); dest.writeInt(resizeMode); configuration.writeToParcel(dest, flags); + dest.writeStrongInterface(token); + dest.writeInt(topActivityType); } @Override @@ -234,6 +259,8 @@ public class TaskInfo { + " numActivities=" + numActivities + " lastActiveTime=" + lastActiveTime + " supportsSplitScreenMultiWindow=" + supportsSplitScreenMultiWindow - + " resizeMode=" + resizeMode; + + " resizeMode=" + resizeMode + + " token=" + token + + " topActivityType=" + topActivityType; } } |
