Bug 787532 - Update Android HAL backend to take into account new screen lock values. r=jlebar

This commit is contained in:
Mounir Lamouri
2012-09-11 11:57:20 +01:00
parent ea8e1c7bcf
commit 34204028e8
2 changed files with 17 additions and 4 deletions

View File

@@ -185,8 +185,19 @@ LockScreenOrientation(const ScreenOrientation& aOrientation)
return false;
}
bridge->LockScreenOrientation(aOrientation);
return true;
switch (aOrientation) {
// The Android backend only supports these orientations.
case eScreenOrientation_PortraitPrimary:
case eScreenOrientation_PortraitSecondary:
case eScreenOrientation_Portrait:
case eScreenOrientation_LandscapePrimary:
case eScreenOrientation_LandscapeSecondary:
case eScreenOrientation_Landscape:
bridge->LockScreenOrientation(aOrientation);
return true;
default:
return false;
}
}
void