decord/source/modules/routing/native/BackPressManager.tsx

49 lines
1.7 KiB
TypeScript
Raw Normal View History

// Module ID: 14529
// Function ID: 14530
// Name: BackPressManager
// Dependencies: [17, 8790, 4504, 1609, 1481, 1898, 1363, 2]
2026-07-20 16:05:17 +00:00
// Module 14529 (BackPressManager)
import _mod17 from "module_17" /* 17 */;
import KeyboardTypes from "KeyboardTypes" /* 1609 */;
import useKeyboardType from "useKeyboardType" /* 4504 */;
import ContextMenuState from "ContextMenuState" /* 8790 */;
import LifecycleManager from "LifecycleManager" /* 1898 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
function handleBackPress() {
ContextMenuState.hideContextMenu();
2026-08-24 06:08:38 +00:00
const keyboardType = useKeyboardType.getKeyboardType();
let flag = keyboardType !== KeyboardTypes.KeyboardTypes.SYSTEM;
2026-07-20 16:05:17 +00:00
if (flag) {
const obj3 = { type: tmp(1609).KeyboardTypes.SYSTEM };
tmp(1481).setKeyboardType(obj3);
2026-07-20 16:05:17 +00:00
flag = true;
const tmpResult = tmp(1481);
2026-07-20 16:05:17 +00:00
}
return flag;
}
_mod17.BackHandler;
2026-07-29 08:29:29 +00:00
class BackPressManager extends tmp2 {
}
const prototype = BackPressManager.prototype;
prototype["_initialize"] = function _initialize() {
if (obj.isAndroid()) {
const self = this;
const result = this._initializeGlobalBackPressListener();
}
};
prototype["_initializeGlobalBackPressListener"] = function _initializeGlobalBackPressListener() {
this._backPressEventSubscription = BackHandler.addEventListener("hardwareBackPress", handleBackPress);
};
prototype["_terminate"] = function _terminate() {
const _backPressEventSubscription = this._backPressEventSubscription;
if (_backPressEventSubscription != null) {
_backPressEventSubscription.remove();
}
};
const backPressManager = new BackPressManager();
let result = size.fileFinishedImporting("modules/routing/native/BackPressManager.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default backPressManager;