18 lines
693 B
TypeScript
18 lines
693 B
TypeScript
// Metro module 15835 (f15836).
|
|
import { OrientationLockState } from "../Constants";
|
|
import { getIsTabletActivitySurface } from "./getDefaultOrientationLockState";
|
|
import { unlockOrientation, lockOrientation } from "../../device/native/DeviceOrientation";
|
|
export default function applyActivityOrientationLock(a0) {
|
|
if (!getIsTabletActivitySurface()) {
|
|
if (OrientationLockState.UNLOCKED === a0) {
|
|
unlockOrientation({
|
|
unlockAfterRotatingToPreviousLock: true
|
|
});
|
|
} else if (OrientationLockState.PORTRAIT === a0) {
|
|
lockOrientation("PORTRAIT", true);
|
|
} else if (OrientationLockState.LANDSCAPE === a0) {
|
|
lockOrientation("LANDSCAPE", true);
|
|
}
|
|
}
|
|
};
|