51 lines
1.8 KiB
TypeScript
51 lines
1.8 KiB
TypeScript
// Module ID: 14095
|
|
// Function ID: 14096
|
|
// Name: handleBackPress
|
|
// Dependencies: [17, 8793, 4342, 1626, 1497, 4662, 500, 2]
|
|
|
|
// Module 14095 (handleBackPress)
|
|
import set from "set" /* 2 */;
|
|
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
|
|
import KeyboardTypes from "KeyboardTypes" /* 1626 */;
|
|
import useKeyboardType from "useKeyboardType" /* 4342 */;
|
|
import initializeDefault from "initialize" /* 4662 */;
|
|
import updateContextMenuState from "updateContextMenuState" /* 8793 */;
|
|
|
|
function handleBackPress() {
|
|
let obj = updateContextMenuState;
|
|
obj.hideContextMenu();
|
|
const keyboardType = useKeyboardType.getKeyboardType();
|
|
let flag = keyboardType !== KeyboardTypes.KeyboardTypes.SYSTEM;
|
|
if (flag) {
|
|
obj = { type: null };
|
|
obj[0] = tmp(1626).KeyboardTypes.SYSTEM;
|
|
tmp(1497).setKeyboardType(obj);
|
|
flag = true;
|
|
const tmpResult = tmp(1497);
|
|
}
|
|
return flag;
|
|
}
|
|
get_ActivityIndicator.BackHandler;
|
|
initializeDefault;
|
|
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 = set.fileFinishedImporting("modules/routing/native/BackPressManager.tsx");
|
|
|
|
export default backPressManager;
|