diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-07-27 15:54:50 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-07-27 15:54:50 -0700 |
commit | 3d5a703db83265f7914eed8580de986106abfad2 (patch) | |
tree | 3ef1e72cf1335a1bb9d36ac1b6f86f0a1b84c302 /core/jni | |
parent | be922d6006879692d100894dc924d947b50aed34 (diff) | |
parent | bc68a59c024bdb745dac8e2ec7408a9f30595f1a (diff) | |
download | frameworks_base-3d5a703db83265f7914eed8580de986106abfad2.zip frameworks_base-3d5a703db83265f7914eed8580de986106abfad2.tar.gz frameworks_base-3d5a703db83265f7914eed8580de986106abfad2.tar.bz2 |
Merge "Report the external display size to the input reader."
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/android_view_Display.cpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/core/jni/android_view_Display.cpp b/core/jni/android_view_Display.cpp index 97f9fc3..5e668b9 100644 --- a/core/jni/android_view_Display.cpp +++ b/core/jni/android_view_Display.cpp @@ -45,11 +45,6 @@ struct offsets_t { }; static offsets_t offsets; -static int gShortSize = -1; -static int gLongSize = -1; -static int gOldSize = -1; -static int gNewSize = -1; - // ---------------------------------------------------------------------------- static void android_view_Display_init( @@ -68,30 +63,6 @@ static void android_view_Display_init( env->SetFloatField(clazz, offsets.ydpi, info.ydpi); } -static jint android_view_Display_getWidth( - JNIEnv* env, jobject clazz) -{ - DisplayID dpy = env->GetIntField(clazz, offsets.display); - jint w = SurfaceComposerClient::getDisplayWidth(dpy); - if (gShortSize > 0) { - jint h = SurfaceComposerClient::getDisplayHeight(dpy); - return w < h ? gShortSize : gLongSize; - } - return w == gOldSize ? gNewSize : w; -} - -static jint android_view_Display_getHeight( - JNIEnv* env, jobject clazz) -{ - DisplayID dpy = env->GetIntField(clazz, offsets.display); - int h = SurfaceComposerClient::getDisplayHeight(dpy); - if (gShortSize > 0) { - jint w = SurfaceComposerClient::getDisplayWidth(dpy); - return h < w ? gShortSize : gLongSize; - } - return h == gOldSize ? gNewSize : h; -} - static jint android_view_Display_getRawWidth( JNIEnv* env, jobject clazz) { @@ -132,10 +103,6 @@ static JNINativeMethod gMethods[] = { (void*)android_view_Display_getDisplayCount }, { "init", "(I)V", (void*)android_view_Display_init }, - { "getRealWidth", "()I", - (void*)android_view_Display_getWidth }, - { "getRealHeight", "()I", - (void*)android_view_Display_getHeight }, { "getRawWidth", "()I", (void*)android_view_Display_getRawWidth }, { "getRawHeight", "()I", @@ -156,24 +123,6 @@ void nativeClassInit(JNIEnv* env, jclass clazz) int register_android_view_Display(JNIEnv* env) { - char buf[PROPERTY_VALUE_MAX]; - int len = property_get("persist.demo.screensizehack", buf, ""); - if (len > 0) { - int temp1, temp2; - if (sscanf(buf, "%dx%d", &temp1, &temp2) == 2) { - if (temp1 < temp2) { - gShortSize = temp1; - gLongSize = temp2; - } else { - gShortSize = temp2; - gLongSize = temp1; - } - } else if (sscanf(buf, "%d=%d", &temp1, &temp2) == 2) { - gOldSize = temp1; - gNewSize = temp2; - } - } - return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods)); } |