зеркало из https://github.com/mozilla/gecko-dev.git
Bug 787532 - Update Android HAL backend to take into account new screen lock values. r=jlebar
This commit is contained in:
Родитель
37e88bfeb1
Коммит
41eb3be4c0
|
@ -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
|
||||
|
|
|
@ -283,8 +283,10 @@ OrientationObserver::DisableAutoOrientation()
|
|||
bool
|
||||
OrientationObserver::LockScreenOrientation(ScreenOrientation aOrientation)
|
||||
{
|
||||
MOZ_ASSERT(eScreenOrientation_None < aOrientation &&
|
||||
aOrientation < eScreenOrientation_EndGuard);
|
||||
MOZ_ASSERT(aOrientation | (eScreenOrientation_PortraitPrimary |
|
||||
eScreenOrientation_PortraitSecondary |
|
||||
eScreenOrientation_LandscapePrimary |
|
||||
eScreenOrientation_LandscapeSecondary));
|
||||
|
||||
// Enable/disable the observer depending on 1. multiple orientations
|
||||
// allowed, and 2. observer enabled.
|
||||
|
|
Загрузка…
Ссылка в новой задаче