Bug 740190 - Screen Orientation API: implement locking in Android. r=dougt

This commit is contained in:
Mounir Lamouri
2012-03-29 23:31:12 -07:00
parent bf278d43dc
commit 776c2cfd87
7 changed files with 132 additions and 3 deletions

View File

@@ -220,12 +220,24 @@ GetCurrentScreenOrientation(dom::ScreenOrientation* aScreenOrientation)
bool
LockScreenOrientation(const dom::ScreenOrientation& aOrientation)
{
return false;
AndroidBridge* bridge = AndroidBridge::Bridge();
if (!bridge) {
return false;
}
bridge->LockScreenOrientation(dom::ScreenOrientationWrapper(aOrientation));
return true;
}
void
UnlockScreenOrientation()
{
AndroidBridge* bridge = AndroidBridge::Bridge();
if (!bridge) {
return;
}
bridge->UnlockScreenOrientation();
}
} // hal_impl