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

52 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-09-01 10:26:29 +00:00
// Module ID: 14095
// Function ID: 14096
2026-07-29 08:29:29 +00:00
// Name: handleBackPress
2026-09-01 10:26:29 +00:00
// Dependencies: [17, 8793, 4342, 1626, 1497, 4662, 500, 2]
2026-07-20 16:05:17 +00:00
2026-09-01 10:26:29 +00:00
// Module 14095 (handleBackPress)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
2026-08-31 15:47:37 +00:00
import KeyboardTypes from "KeyboardTypes" /* 1626 */;
2026-09-01 10:26:29 +00:00
import useKeyboardType from "useKeyboardType" /* 4342 */;
import initializeDefault from "initialize" /* 4662 */;
import updateContextMenuState from "updateContextMenuState" /* 8793 */;
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
function handleBackPress() {
2026-08-24 06:08:38 +00:00
let obj = updateContextMenuState;
2026-07-20 16:05:17 +00:00
obj.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) {
2026-07-29 08:29:29 +00:00
obj = { type: null };
2026-08-31 15:47:37 +00:00
obj[0] = tmp(1626).KeyboardTypes.SYSTEM;
tmp(1497).setKeyboardType(obj);
2026-07-20 16:05:17 +00:00
flag = true;
2026-08-31 15:47:37 +00:00
const tmpResult = tmp(1497);
2026-07-20 16:05:17 +00:00
}
return flag;
}
2026-08-24 06:08:38 +00:00
get_ActivityIndicator.BackHandler;
initializeDefault;
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();
2026-08-24 06:08:38 +00:00
let result = set.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;