2026-09-11 10:30:06 +00:00
|
|
|
// Module ID: 11878
|
|
|
|
|
// Function ID: 11879
|
2026-08-12 06:57:52 +00:00
|
|
|
// Name: applyOrientationLock
|
2026-09-11 10:30:06 +00:00
|
|
|
// Dependencies: [9565, 8420, 2]
|
2026-08-12 06:57:52 +00:00
|
|
|
// Exports: applyOrientationLock, releaseOrientationLock, restoreDefaultOrientationLock
|
|
|
|
|
|
2026-09-11 10:30:06 +00:00
|
|
|
// Module 11878 (applyOrientationLock)
|
|
|
|
|
import DeviceOrientation from "DeviceOrientation" /* 8420 */;
|
|
|
|
|
import isOrientationLockSupportedDefault from "isOrientationLockSupported" /* 9565 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-08-24 06:08:38 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
let result = size.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()) {
|
2026-09-10 05:38:07 +00:00
|
|
|
DeviceOrientation.lockOrientation(PORTRAIT, flag);
|
2026-08-12 06:57:52 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
export const releaseOrientationLock = function releaseOrientationLock(unlockAfterRotatingToPreviousLock) {
|
2026-08-24 06:08:38 +00:00
|
|
|
if (isOrientationLockSupportedDefault()) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj2 = { unlockAfterRotatingToPreviousLock: unlockAfterRotatingToPreviousLock.unlockAfterRotatingToPreviousLock };
|
|
|
|
|
DeviceOrientation.unlockOrientation(obj2);
|
2026-08-12 06:57:52 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
export const restoreDefaultOrientationLock = function restoreDefaultOrientationLock() {
|
2026-08-24 06:08:38 +00:00
|
|
|
if (isOrientationLockSupportedDefault()) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = DeviceOrientation.restoreDefaultOrientation();
|
2026-08-12 06:57:52 +00:00
|
|
|
}
|
|
|
|
|
};
|