Loading core/java/android/view/Surface.java +6 −2 Original line number Diff line number Diff line Loading @@ -758,6 +758,7 @@ public class Surface implements Parcelable { public float density; public float xDpi; public float yDpi; public boolean secure; public PhysicalDisplayInfo() { } Loading @@ -778,7 +779,8 @@ public class Surface implements Parcelable { && refreshRate == other.refreshRate && density == other.density && xDpi == other.xDpi && yDpi == other.yDpi; && yDpi == other.yDpi && secure == other.secure; } @Override Loading @@ -793,13 +795,15 @@ public class Surface implements Parcelable { density = other.density; xDpi = other.xDpi; yDpi = other.yDpi; secure = other.secure; } // For debugging purposes @Override public String toString() { return "PhysicalDisplayInfo{" + width + " x " + height + ", " + refreshRate + " fps, " + "density " + density + ", " + xDpi + " x " + yDpi + " dpi}"; + "density " + density + ", " + xDpi + " x " + yDpi + " dpi, secure " + secure + "}"; } } Loading core/jni/android_view_Surface.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ static struct { jfieldID density; jfieldID xDpi; jfieldID yDpi; jfieldID secure; } gPhysicalDisplayInfoClassInfo; Loading Loading @@ -714,6 +715,7 @@ static jboolean nativeGetDisplayInfo(JNIEnv* env, jclass clazz, env->SetFloatField(infoObj, gPhysicalDisplayInfoClassInfo.density, info.density); env->SetFloatField(infoObj, gPhysicalDisplayInfoClassInfo.xDpi, info.xdpi); env->SetFloatField(infoObj, gPhysicalDisplayInfoClassInfo.yDpi, info.ydpi); env->SetBooleanField(infoObj, gPhysicalDisplayInfoClassInfo.secure, info.secure); return JNI_TRUE; } Loading Loading @@ -907,6 +909,7 @@ int register_android_view_Surface(JNIEnv* env) gPhysicalDisplayInfoClassInfo.density = env->GetFieldID(clazz, "density", "F"); gPhysicalDisplayInfoClassInfo.xDpi = env->GetFieldID(clazz, "xDpi", "F"); gPhysicalDisplayInfoClassInfo.yDpi = env->GetFieldID(clazz, "yDpi", "F"); gPhysicalDisplayInfoClassInfo.secure = env->GetFieldID(clazz, "secure", "Z"); return err; } Loading Loading
core/java/android/view/Surface.java +6 −2 Original line number Diff line number Diff line Loading @@ -758,6 +758,7 @@ public class Surface implements Parcelable { public float density; public float xDpi; public float yDpi; public boolean secure; public PhysicalDisplayInfo() { } Loading @@ -778,7 +779,8 @@ public class Surface implements Parcelable { && refreshRate == other.refreshRate && density == other.density && xDpi == other.xDpi && yDpi == other.yDpi; && yDpi == other.yDpi && secure == other.secure; } @Override Loading @@ -793,13 +795,15 @@ public class Surface implements Parcelable { density = other.density; xDpi = other.xDpi; yDpi = other.yDpi; secure = other.secure; } // For debugging purposes @Override public String toString() { return "PhysicalDisplayInfo{" + width + " x " + height + ", " + refreshRate + " fps, " + "density " + density + ", " + xDpi + " x " + yDpi + " dpi}"; + "density " + density + ", " + xDpi + " x " + yDpi + " dpi, secure " + secure + "}"; } } Loading
core/jni/android_view_Surface.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ static struct { jfieldID density; jfieldID xDpi; jfieldID yDpi; jfieldID secure; } gPhysicalDisplayInfoClassInfo; Loading Loading @@ -714,6 +715,7 @@ static jboolean nativeGetDisplayInfo(JNIEnv* env, jclass clazz, env->SetFloatField(infoObj, gPhysicalDisplayInfoClassInfo.density, info.density); env->SetFloatField(infoObj, gPhysicalDisplayInfoClassInfo.xDpi, info.xdpi); env->SetFloatField(infoObj, gPhysicalDisplayInfoClassInfo.yDpi, info.ydpi); env->SetBooleanField(infoObj, gPhysicalDisplayInfoClassInfo.secure, info.secure); return JNI_TRUE; } Loading Loading @@ -907,6 +909,7 @@ int register_android_view_Surface(JNIEnv* env) gPhysicalDisplayInfoClassInfo.density = env->GetFieldID(clazz, "density", "F"); gPhysicalDisplayInfoClassInfo.xDpi = env->GetFieldID(clazz, "xDpi", "F"); gPhysicalDisplayInfoClassInfo.yDpi = env->GetFieldID(clazz, "yDpi", "F"); gPhysicalDisplayInfoClassInfo.secure = env->GetFieldID(clazz, "secure", "Z"); return err; } Loading