2026-10-02 13:37:24 +00:00
|
|
|
// Module ID: 10722
|
|
|
|
|
// Function ID: 10723
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: applyOrientationLock
|
2026-10-02 13:37:24 +00:00
|
|
|
// Dependencies: [8829, 7784, 2]
|
2026-09-18 19:45:33 +00:00
|
|
|
// Exports: applyOrientationLock, releaseOrientationLock, restoreDefaultOrientationLock
|
|
|
|
|
|
2026-10-02 13:37:24 +00:00
|
|
|
// Module 10722 (applyOrientationLock)
|
|
|
|
|
import DeviceOrientation from "DeviceOrientation" /* 7784 */;
|
|
|
|
|
import isOrientationLockSupportedDefault from "isOrientationLockSupported" /* 8829 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
|
|
|
|
|
|
|
|
|
let result = size.fileFinishedImporting("modules/device/native/applyOrientationLock.tsx");
|
|
|
|
|
|
|
|
|
|
export const applyOrientationLock = function applyOrientationLock(PORTRAIT, flag) {
|
|
|
|
|
if (flag === undefined) {
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
|
if (isOrientationLockSupportedDefault()) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj = DeviceOrientation;
|
|
|
|
|
obj.lockOrientation(PORTRAIT, flag);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
export const releaseOrientationLock = function releaseOrientationLock(unlockAfterRotatingToPreviousLock) {
|
2026-10-01 14:13:23 +00:00
|
|
|
unlockAfterRotatingToPreviousLock = unlockAfterRotatingToPreviousLock.unlockAfterRotatingToPreviousLock;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (isOrientationLockSupportedDefault()) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj2 = { unlockAfterRotatingToPreviousLock };
|
|
|
|
|
const obj = DeviceOrientation;
|
|
|
|
|
obj.unlockOrientation(obj2);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
export const restoreDefaultOrientationLock = function restoreDefaultOrientationLock() {
|
|
|
|
|
if (isOrientationLockSupportedDefault()) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj = DeviceOrientation;
|
|
|
|
|
const result = obj.restoreDefaultOrientation();
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
};
|