Class of snx.android · Device.java
public final class Device
The device the app runs on: one display, the window's, and the configuration that follows from it. The runtime sets its size and density (snx.android.width, snx.android.height in pixels, snx.android.dpi); without them a phone-shaped window.
public static synchronized void set(int width, int height, int dpi, boolean night) sourceThe display's size in pixels and its density: the metrics and the configuration again.
public static void resize(int width, int height) sourceThe window's new size: the display's. The resources take the new metrics and configuration at once, and the application and the activities get the configuration change on the main thread (snx.android.app.Activities).
public static void rotate(int requested) sourceThe display turned for an activity's requested orientation (ActivityInfo.SCREEN_ORIENTATION_*), as Android's window manager turns it for the top activity: a landscape one on a display that is taller than wide, or a portrait one on a display that is wider than tall, swaps the display's width and height. The window follows (snx.android.ui.Window.rotate). The other orientations (unspecified, sensor, user, behind, locked) keep it.
public static synchronized DisplayMetrics metrics() sourceA copy of the display's metrics.
public static synchronized Configuration configuration() sourceA copy of the device's configuration.
Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.