Bug 720795 - Screen Orientation API reading and event implementation in Android. r=dougt

This commit is contained in:
Mounir Lamouri
2012-02-09 11:29:44 +01:00
parent c252b8b2cc
commit 7cb092cf16
18 changed files with 394 additions and 1 deletions

View File

@@ -76,6 +76,7 @@ jfieldID AndroidGeckoEvent::jLocationField = 0;
jfieldID AndroidGeckoEvent::jAddressField = 0;
jfieldID AndroidGeckoEvent::jBandwidthField = 0;
jfieldID AndroidGeckoEvent::jCanBeMeteredField = 0;
jfieldID AndroidGeckoEvent::jScreenOrientationField = 0;
jclass AndroidPoint::jPointClass = 0;
jfieldID AndroidPoint::jXField = 0;
@@ -189,6 +190,7 @@ AndroidGeckoEvent::InitGeckoEventClass(JNIEnv *jEnv)
jAddressField = getField("mAddress", "Landroid/location/Address;");
jBandwidthField = getField("mBandwidth", "D");
jCanBeMeteredField = getField("mCanBeMetered", "Z");
jScreenOrientationField = getField("mScreenOrientation", "S");
}
void
@@ -547,6 +549,11 @@ AndroidGeckoEvent::Init(JNIEnv *jenv, jobject jobj)
break;
}
case SCREENORIENTATION_CHANGED: {
mScreenOrientation = jenv->GetShortField(jobj, jScreenOrientationField);
break;
}
default:
break;
}