api-impl: add misc stuff needed by Teeter

note that Teeter still needs more stuff before it will work
This commit is contained in:
Mis012
2023-07-25 14:29:43 +02:00
parent 08998b0076
commit ffb2855a05
17 changed files with 181 additions and 3 deletions

View File

@@ -16,6 +16,8 @@
package android.util;
import android.view.Display;
/**
* A structure describing general information about a display, such as its
* size, density, and font scaling.
@@ -219,8 +221,8 @@ public class DisplayMetrics {
}
public void setToDefaults() {
widthPixels = 0;
heightPixels = 0;
widthPixels = Display.window_width;
heightPixels = Display.window_height;
density = DENSITY_DEVICE / (float)DENSITY_DEFAULT;
densityDpi = DENSITY_DEVICE;
scaledDensity = density;