use of com.android.launcher3.util.DefaultDisplay in project android_packages_apps_Launcher3 by AOSPA.
the class BaseDraggingActivity method getMultiWindowDisplaySize.
protected WindowBounds getMultiWindowDisplaySize() {
if (Utilities.ATLEAST_R) {
WindowMetrics wm = getWindowManager().getCurrentWindowMetrics();
Insets insets = wm.getWindowInsets().getInsets(Type.systemBars());
return new WindowBounds(wm.getBounds(), new Rect(insets.left, insets.top, insets.right, insets.bottom));
}
// Note: Calls to getSize() can't rely on our cached DefaultDisplay since it can return
// the app window size
Display display = getWindowManager().getDefaultDisplay();
Point mwSize = new Point();
display.getSize(mwSize);
return new WindowBounds(new Rect(0, 0, mwSize.x, mwSize.y), new Rect());
}
use of com.android.launcher3.util.DefaultDisplay in project android_packages_apps_Trebuchet by LineageOS.
the class BaseDraggingActivity method getMultiWindowDisplaySize.
protected WindowBounds getMultiWindowDisplaySize() {
if (Utilities.ATLEAST_R) {
WindowMetrics wm = getWindowManager().getCurrentWindowMetrics();
Insets insets = wm.getWindowInsets().getInsets(Type.systemBars());
return new WindowBounds(wm.getBounds(), new Rect(insets.left, insets.top, insets.right, insets.bottom));
}
// Note: Calls to getSize() can't rely on our cached DefaultDisplay since it can return
// the app window size
Display display = getWindowManager().getDefaultDisplay();
Point mwSize = new Point();
display.getSize(mwSize);
return new WindowBounds(new Rect(0, 0, mwSize.x, mwSize.y), new Rect());
}
use of com.android.launcher3.util.DefaultDisplay in project android_packages_apps_Launcher3 by ArrowOS.
the class BaseDraggingActivity method getMultiWindowDisplaySize.
protected WindowBounds getMultiWindowDisplaySize() {
if (Utilities.ATLEAST_R) {
WindowMetrics wm = getWindowManager().getCurrentWindowMetrics();
Insets insets = wm.getWindowInsets().getInsets(Type.systemBars());
return new WindowBounds(wm.getBounds(), new Rect(insets.left, insets.top, insets.right, insets.bottom));
}
// Note: Calls to getSize() can't rely on our cached DefaultDisplay since it can return
// the app window size
Display display = getWindowManager().getDefaultDisplay();
Point mwSize = new Point();
display.getSize(mwSize);
return new WindowBounds(new Rect(0, 0, mwSize.x, mwSize.y), new Rect());
}
use of com.android.launcher3.util.DefaultDisplay in project android_packages_apps_Launcher3 by ProtonAOSP.
the class BaseDraggingActivity method getMultiWindowDisplaySize.
protected WindowBounds getMultiWindowDisplaySize() {
if (Utilities.ATLEAST_R) {
WindowMetrics wm = getWindowManager().getCurrentWindowMetrics();
Insets insets = wm.getWindowInsets().getInsets(Type.systemBars());
return new WindowBounds(wm.getBounds(), new Rect(insets.left, insets.top, insets.right, insets.bottom));
}
// Note: Calls to getSize() can't rely on our cached DefaultDisplay since it can return
// the app window size
Display display = getWindowManager().getDefaultDisplay();
Point mwSize = new Point();
display.getSize(mwSize);
return new WindowBounds(new Rect(0, 0, mwSize.x, mwSize.y), new Rect());
}
use of com.android.launcher3.util.DefaultDisplay in project android_packages_apps_404Launcher by P-404.
the class BaseDraggingActivity method getMultiWindowDisplaySize.
protected WindowBounds getMultiWindowDisplaySize() {
if (Utilities.ATLEAST_R) {
WindowMetrics wm = getWindowManager().getCurrentWindowMetrics();
Insets insets = wm.getWindowInsets().getInsets(Type.systemBars());
return new WindowBounds(wm.getBounds(), new Rect(insets.left, insets.top, insets.right, insets.bottom));
}
// Note: Calls to getSize() can't rely on our cached DefaultDisplay since it can return
// the app window size
Display display = getWindowManager().getDefaultDisplay();
Point mwSize = new Point();
display.getSize(mwSize);
return new WindowBounds(new Rect(0, 0, mwSize.x, mwSize.y), new Rect());
}
Aggregations