Bug 740190 - Screen Orientation API: implement locking in Android. r=dougt
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user