You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
67 lines
1.3 KiB
Java
67 lines
1.3 KiB
Java
package android.view;
|
|
|
|
import android.graphics.Point;
|
|
import android.util.DisplayMetrics;
|
|
|
|
public final class Display {
|
|
|
|
public static int window_width = 960;
|
|
public static int window_height = 540;
|
|
|
|
// FIXME: what do we return here?
|
|
// we don't want to hardcode this stuff, but at the same time the apps can cache it
|
|
public void getMetrics(DisplayMetrics outMetrics) {
|
|
outMetrics.widthPixels = this.window_width;
|
|
outMetrics.heightPixels = this.window_height;
|
|
}
|
|
|
|
public void getRealMetrics(DisplayMetrics outMetrics) {
|
|
getMetrics(outMetrics); // probably?
|
|
}
|
|
|
|
|
|
public int getWidth() {
|
|
return window_width;
|
|
}
|
|
|
|
public int getHeight() {
|
|
return window_height;
|
|
}
|
|
|
|
public int getRawWidth() {
|
|
return window_width; // what's the difference?
|
|
}
|
|
|
|
public int getRawHeight() {
|
|
return window_height; // what's the difference?
|
|
}
|
|
|
|
public int getRotation() {
|
|
return 0 /*ROTATION_0*/;
|
|
}
|
|
|
|
public float getRefreshRate() {
|
|
return 60; // FIXME
|
|
}
|
|
|
|
public long getAppVsyncOffsetNanos() {
|
|
return 0; // what else would we return here?
|
|
}
|
|
|
|
public int getDisplayId() {
|
|
return 0;
|
|
}
|
|
|
|
public long getPresentationDeadlineNanos() {
|
|
return 0; // what else...
|
|
}
|
|
|
|
public void getSize(Point size) {
|
|
size.set(getWidth(), getHeight());
|
|
}
|
|
|
|
public void getRealSize(Point size) {
|
|
getSize(size);
|
|
}
|
|
}
|