Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 456df9a8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add utility method `isFreeformTask()` for AppPairsController." into main

parents 7a248913 4105caf9
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.systemui.shared.recents.utilities;
import static android.app.StatusBarManager.NAVBAR_BACK_DISMISS_IME;
import static android.app.StatusBarManager.NAVBAR_IME_SWITCHER_BUTTON_VISIBLE;
import static android.app.StatusBarManager.NAVBAR_IME_VISIBLE;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;

import android.annotation.TargetApi;
import android.app.StatusBarManager.NavbarFlags;
@@ -35,6 +36,8 @@ import android.util.DisplayMetrics;
import android.view.Surface;
import android.view.WindowManager;

import com.android.systemui.shared.recents.model.Task;

/* Common code */
public class Utilities {

@@ -165,4 +168,10 @@ public class Utilities {
        float densityRatio = (float) densityDpi / DisplayMetrics.DENSITY_DEFAULT;
        return (size / densityRatio);
    }

    /** Whether a task is in freeform mode. */
    public static boolean isFreeformTask(Task task) {
        return task != null && task.getKey() != null
                && task.getKey().windowingMode == WINDOWING_MODE_FREEFORM;
    }
}