Lines Matching defs:rotation
100 WLOGFD("If the current display rotation is same to sensor rotation, return.");
192 WLOGFI("dms: Set screen rotation: %{public}u withAnimation: %{public}u", targetRotation, withAnimation);
200 // offset(in degree) divided by 90 to get rotation bias
209 // %2 to determine whether the rotation is horizontal or vertical.
211 // if device's default rotation is landscape, use -2 to swap 0 and 90, 180 and 270.
271 void ScreenRotationController::ProcessSwitchToAutoRotation(DeviceRotation rotation)
273 if (rotation != DeviceRotation::INVALID) {
274 SetScreenRotation(ConvertDeviceToDisplayRotation(rotation));
278 void ScreenRotationController::ProcessSwitchToAutoRotationPortrait(DeviceRotation rotation)
280 if (IsDeviceRotationVertical(rotation)) {
281 SetScreenRotation(ConvertDeviceToDisplayRotation(rotation));
287 void ScreenRotationController::ProcessSwitchToAutoRotationLandscape(DeviceRotation rotation)
289 if (IsDeviceRotationHorizontal(rotation)) {
290 SetScreenRotation(ConvertDeviceToDisplayRotation(rotation));
328 DisplayOrientation ScreenRotationController::ConvertRotationToDisplayOrientation(Rotation rotation)
333 return displayToDisplayOrientationMap_.at(rotation);
417 bool ScreenRotationController::IsDisplayRotationVertical(Rotation rotation)
419 return (rotation == ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_PORTRAIT)) ||
420 (rotation == ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_PORTRAIT_INVERTED));
423 bool ScreenRotationController::IsDisplayRotationHorizontal(Rotation rotation)
425 return (rotation == ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_LANDSCAPE)) ||
426 (rotation == ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_LANDSCAPE_INVERTED));