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

46 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 13592
// Function ID: 13593
2026-07-29 08:29:29 +00:00
// Name: handleBackPress
2026-08-05 07:35:12 +00:00
// Dependencies: [17, 8381, 4121, 1579, 1478, 4433, 500, 2]
2026-07-20 16:05:17 +00:00
2026-08-05 07:35:12 +00:00
// Module 13592 (handleBackPress)
2026-07-29 08:29:29 +00:00
import "initialize";
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
function handleBackPress() {
2026-08-05 07:35:12 +00:00
let obj = require(8381) /* updateContextMenuState */;
2026-07-20 16:05:17 +00:00
obj.hideContextMenu();
2026-08-05 07:35:12 +00:00
const keyboardType = require(4121) /* useKeyboardType */.getKeyboardType();
2026-07-29 08:29:29 +00:00
let flag = keyboardType !== require(1579) /* KeyboardTypes */.KeyboardTypes.SYSTEM;
2026-07-20 16:05:17 +00:00
if (flag) {
2026-07-29 08:29:29 +00:00
obj = { type: null };
obj[0] = tmp(1579).KeyboardTypes.SYSTEM;
tmp(1478).setKeyboardType(obj);
2026-07-20 16:05:17 +00:00
flag = true;
2026-07-29 08:29:29 +00:00
const tmpResult = tmp(1478);
2026-07-20 16:05:17 +00:00
}
return flag;
}
2026-07-23 10:11:24 +00:00
require("get ActivityIndicator").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 = require("useKeyboardType").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;