decord/source/modules/routing/native/BackPressManager.tsx
github-actions 03cf168fbc chore: update source for alpha 347.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4825.js (118.4 MB)
2026-09-17 08:17:09 +00:00

48 lines
1.7 KiB
TypeScript

// Module ID: 14564
// Function ID: 14565
// Name: BackPressManager
// Dependencies: [17, 8053, 4508, 1610, 1482, 1899, 1364, 2]
// Module 14564 (BackPressManager)
import _mod17 from "module_17" /* 17 */;
import KeyboardTypes from "KeyboardTypes" /* 1610 */;
import useKeyboardType from "useKeyboardType" /* 4508 */;
import ContextMenuState from "ContextMenuState" /* 8053 */;
import LifecycleManager from "LifecycleManager" /* 1899 */;
import size from "module_2" /* 2 */;
function handleBackPress() {
ContextMenuState.hideContextMenu();
const keyboardType = useKeyboardType.getKeyboardType();
let flag = keyboardType !== KeyboardTypes.KeyboardTypes.SYSTEM;
if (flag) {
const obj3 = { type: tmp(1610).KeyboardTypes.SYSTEM };
tmp(1482).setKeyboardType(obj3);
flag = true;
const tmpResult = tmp(1482);
}
return flag;
}
_mod17.BackHandler;
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");
export default backPressManager;