Search in sources :

Example 1 with DisplayHelper

use of com.farmerbb.taskbar.helper.DisplayHelper in project Taskbar by farmerbb.

the class U method displayDefaultsToFreeform.

private static boolean displayDefaultsToFreeform(Context context, Display display) {
    DisplayHelper helper = DisplayHelper.getInstance();
    int id = display.getDisplayId();
    if (helper.get(id))
        return true;
    Context dispContext = context.createDisplayContext(display);
    String configString = dispContext.getResources().getConfiguration().toString();
    boolean value = configString.contains("mDisplayWindowingMode=freeform");
    if (value)
        helper.put(id);
    return value;
}
Also used : Context(android.content.Context) DisplayHelper(com.farmerbb.taskbar.helper.DisplayHelper) SuppressLint(android.annotation.SuppressLint)

Aggregations

SuppressLint (android.annotation.SuppressLint)1 Context (android.content.Context)1 DisplayHelper (com.farmerbb.taskbar.helper.DisplayHelper)1