90 lines
4.4 KiB
TypeScript
90 lines
4.4 KiB
TypeScript
/* Metro module 4663; source: modules/native_permissions/NativePermissionManager.tsx; dependencies: [6, 7, 15, 17, 18, 4661, 661, 477, 4664, 694, 4662, 4561, 2] */
|
|
function _fun40362(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4841:6, offset: 0x010fec20, size: 270 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
|
const env0_8 = (require(4661) /* metro dependency 4661: NativePermissionConstants */).NativePermissionTypes;
|
|
const env0_9 = (require(661) /* metro dependency 661: Constants */).InputModes;
|
|
let value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
|
|
value = _fun40366(value);
|
|
value = new value();
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/native_permissions/NativePermissionManager.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_40363() { // fn#40363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4841:201, offset: 0x010fed2e, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_40363_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun40366(a0) { // fn#40366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4841:400, offset: 0x010fed8c, size: 137 bytes, params: 2, frame: 16
|
|
const closure = NativePermissionManager;
|
|
env0_7(closure, a0);
|
|
return env0_4(closure, [{key: 'isEnabled', value: value_40368}, {key: '_initialize', value: value_40369},
|
|
{key: '_terminate', value: value_40370}, {key: 'handleAudioSetMode', value: function({mode}) {
|
|
if (mode === InputModes.PUSH_TO_TALK) {
|
|
require(dependencyMap[10]).default.requestPermission(NativePermissionTypes.INPUT_MONITORING);
|
|
}
|
|
}}]);
|
|
}
|
|
|
|
function value_40368() { // fn#40368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4841:744, offset: 0x010fee15, size: 109 bytes, params: 1, frame: 14
|
|
var ProcessArgs;
|
|
const value = environment.__proto__;
|
|
let r0 = (require(477) /* metro dependency 477: PlatformUtils */).isDesktop() && (require(477) /* metro dependency 477: PlatformUtils */).isMac();
|
|
if (r0) {
|
|
ProcessArgs = (require(4664) /* metro dependency 4664: ProcessArgs */).ProcessArgs;
|
|
r0 = !ProcessArgs.isDiscordTestSet();
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_40369() { // fn#40369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4841:867, offset: 0x010fee82, size: 67 bytes, params: 1, frame: 13
|
|
var value;
|
|
if (this.isEnabled()) {
|
|
value = environment.__proto__;
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.subscribe('AUDIO_SET_MODE', this.handleAudioSetMode);
|
|
}
|
|
}
|
|
|
|
function value_40370() { // fn#40370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4841:982, offset: 0x010feec5, size: 67 bytes, params: 1, frame: 13
|
|
var value;
|
|
if (this.isEnabled()) {
|
|
value = environment.__proto__;
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.unsubscribe('AUDIO_SET_MODE', this.handleAudioSetMode);
|
|
}
|
|
}
|
|
|