summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/TaskInfo.java9
-rw-r--r--core/java/android/window/TaskFragmentInfo.java25
2 files changed, 29 insertions, 5 deletions
diff --git a/core/java/android/app/TaskInfo.java b/core/java/android/app/TaskInfo.java
index 7b96511b1156..b752a9596865 100644
--- a/core/java/android/app/TaskInfo.java
+++ b/core/java/android/app/TaskInfo.java
@@ -331,11 +331,10 @@ public class TaskInfo {
}
/**
- * Returns {@code true} if parameters that are important for task organizers have changed
- * and {@link com.android.server.wm.TaskOrginizerController} needs to notify listeners
- * about that.
- * @hide
- */
+ * Returns {@code true} if the parameters that are important for task organizers are equal
+ * between this {@link TaskInfo} and {@param that}.
+ * @hide
+ */
public boolean equalsForTaskOrganizer(@Nullable TaskInfo that) {
if (that == null) {
return false;
diff --git a/core/java/android/window/TaskFragmentInfo.java b/core/java/android/window/TaskFragmentInfo.java
index 2092a092d73a..e032153bc013 100644
--- a/core/java/android/window/TaskFragmentInfo.java
+++ b/core/java/android/window/TaskFragmentInfo.java
@@ -16,7 +16,10 @@
package android.window;
+import static android.app.WindowConfiguration.WindowingMode;
+
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.content.ComponentName;
import android.content.res.Configuration;
import android.os.IBinder;
@@ -94,6 +97,28 @@ public final class TaskFragmentInfo implements Parcelable {
return mIsVisible;
}
+ @WindowingMode
+ public int getWindowingMode() {
+ return mConfiguration.windowConfiguration.getWindowingMode();
+ }
+
+ /**
+ * Returns {@code true} if the parameters that are important for task fragment organizers are
+ * equal between this {@link TaskFragmentInfo} and {@param that}.
+ */
+ public boolean equalsForTaskFragmentOrganizer(@Nullable TaskFragmentInfo that) {
+ if (that == null) {
+ return false;
+ }
+
+ return mFragmentToken.equals(that.mFragmentToken)
+ && mInitialComponentName.equals(that.mInitialComponentName)
+ && mToken.equals(that.mToken)
+ && mIsEmpty == that.mIsEmpty
+ && mIsVisible == that.mIsVisible
+ && getWindowingMode() == that.getWindowingMode();
+ }
+
private TaskFragmentInfo(Parcel in) {
mFragmentToken = in.readStrongBinder();
mInitialComponentName = in.readTypedObject(ComponentName.CREATOR);