2026-08-24 06:08:38 +00:00
|
|
|
// Module ID: 11003
|
|
|
|
|
// Function ID: 11004
|
2026-08-12 06:57:52 +00:00
|
|
|
// Name: applyOrientationLock
|
2026-08-24 06:08:38 +00:00
|
|
|
// Dependencies: [8713, 8708, 2]
|
2026-08-12 06:57:52 +00:00
|
|
|
// Exports: applyOrientationLock, releaseOrientationLock, restoreDefaultOrientationLock
|
|
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
// Module 11003 (applyOrientationLock)
|
|
|
|
|
import set from "set" /* 2 */;
|
|
|
|
|
import handleOrientationChange from "handleOrientationChange" /* 8708 */;
|
|
|
|
|
import isOrientationLockSupportedDefault from "isOrientationLockSupported" /* 8713 */;
|
|
|
|
|
|
|
|
|
|
let result = set.fileFinishedImporting("modules/device/native/applyOrientationLock.tsx");
|
2026-08-12 06:57:52 +00:00
|
|
|
|
|
|
|
|
export const applyOrientationLock = function applyOrientationLock(PORTRAIT, flag) {
|
|
|
|
|
if (flag === undefined) {
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
if (isOrientationLockSupportedDefault()) {
|
|
|
|
|
handleOrientationChange.lockOrientation(PORTRAIT, flag);
|
|
|
|
|
const obj = handleOrientationChange;
|
2026-08-12 06:57:52 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
export const releaseOrientationLock = function releaseOrientationLock(unlockAfterRotatingToPreviousLock) {
|
2026-08-24 06:08:38 +00:00
|
|
|
if (isOrientationLockSupportedDefault()) {
|
|
|
|
|
let obj = handleOrientationChange;
|
2026-08-12 06:57:52 +00:00
|
|
|
obj = { unlockAfterRotatingToPreviousLock: null };
|
|
|
|
|
obj[0] = unlockAfterRotatingToPreviousLock.unlockAfterRotatingToPreviousLock;
|
|
|
|
|
obj.unlockOrientation(obj);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
export const restoreDefaultOrientationLock = function restoreDefaultOrientationLock() {
|
2026-08-24 06:08:38 +00:00
|
|
|
if (isOrientationLockSupportedDefault()) {
|
|
|
|
|
const result = handleOrientationChange.restoreDefaultOrientation();
|
|
|
|
|
const obj = handleOrientationChange;
|
2026-08-12 06:57:52 +00:00
|
|
|
}
|
|
|
|
|
};
|