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

This commit is contained in:
Mounir Lamouri
2012-03-20 14:09:45 +01:00
parent e821e0a0b9
commit de96081e47
18 changed files with 395 additions and 1 deletions

View File

@@ -72,6 +72,7 @@ jfieldID AndroidGeckoEvent::jRangeBackColorField = 0;
jfieldID AndroidGeckoEvent::jLocationField = 0;
jfieldID AndroidGeckoEvent::jBandwidthField = 0;
jfieldID AndroidGeckoEvent::jCanBeMeteredField = 0;
jfieldID AndroidGeckoEvent::jScreenOrientationField = 0;
jclass AndroidPoint::jPointClass = 0;
jfieldID AndroidPoint::jXField = 0;
@@ -183,6 +184,7 @@ AndroidGeckoEvent::InitGeckoEventClass(JNIEnv *jEnv)
jLocationField = getField("mLocation", "Landroid/location/Location;");
jBandwidthField = getField("mBandwidth", "D");
jCanBeMeteredField = getField("mCanBeMetered", "Z");
jScreenOrientationField = getField("mScreenOrientation", "S");
}
void
@@ -523,6 +525,11 @@ AndroidGeckoEvent::Init(JNIEnv *jenv, jobject jobj)
ReadPointArray(mPoints, jenv, jPoints, 2);
}
case SCREENORIENTATION_CHANGED: {
mScreenOrientation = jenv->GetShortField(jobj, jScreenOrientationField);
break;
}
default:
break;
}