45 lines
1.5 KiB
TypeScript
45 lines
1.5 KiB
TypeScript
// Module ID: 13592
|
|
// Function ID: 13593
|
|
// Name: handleBackPress
|
|
// Dependencies: [17, 8381, 4121, 1579, 1478, 4433, 500, 2]
|
|
|
|
// Module 13592 (handleBackPress)
|
|
import "initialize";
|
|
|
|
function handleBackPress() {
|
|
let obj = require(8381) /* updateContextMenuState */;
|
|
obj.hideContextMenu();
|
|
const keyboardType = require(4121) /* useKeyboardType */.getKeyboardType();
|
|
let flag = keyboardType !== require(1579) /* KeyboardTypes */.KeyboardTypes.SYSTEM;
|
|
if (flag) {
|
|
obj = { type: null };
|
|
obj[0] = tmp(1579).KeyboardTypes.SYSTEM;
|
|
tmp(1478).setKeyboardType(obj);
|
|
flag = true;
|
|
const tmpResult = tmp(1478);
|
|
}
|
|
return flag;
|
|
}
|
|
require("get ActivityIndicator").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 = require("useKeyboardType").fileFinishedImporting("modules/routing/native/BackPressManager.tsx");
|
|
|
|
export default backPressManager;
|