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

52 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 13909
// Function ID: 13910
2026-07-29 08:29:29 +00:00
// Name: handleBackPress
2026-08-25 06:04:03 +00:00
// Dependencies: [17, 8746, 4244, 1627, 1498, 4562, 500, 2]
2026-07-20 16:05:17 +00:00
2026-08-25 06:04:03 +00:00
// Module 13909 (handleBackPress)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import KeyboardTypes from "KeyboardTypes" /* 1627 */;
2026-08-25 06:04:03 +00:00
import useKeyboardType from "useKeyboardType" /* 4244 */;
import initializeDefault from "initialize" /* 4562 */;
import updateContextMenuState from "updateContextMenuState" /* 8746 */;
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-15 05:55:55 +00:00
obj[0] = tmp(1627).KeyboardTypes.SYSTEM;
tmp(1498).setKeyboardType(obj);
2026-07-20 16:05:17 +00:00
flag = true;
2026-08-15 05:55:55 +00:00
const tmpResult = tmp(1498);
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;