decord/beta/source/modules/notifications/settings/DeclarativeSystemNotifPermissionHelpers.android.tsx
github-actions e7a050048e chore: update source for beta 347.7
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
2026-09-21 19:31:18 +00:00

79 lines
3 KiB
TypeScript

// Module ID: 16236
// Function ID: 16237
// Name: DeclarativeSystemNotifPermissionHelpers
// Dependencies: [17, 14727, 14732, 4737, 1367, 5366, 2]
// Exports: openSystemNotifSettings, refreshSystemNotifPermissions
// Module 16236 (DeclarativeSystemNotifPermissionHelpers)
import _mod17 from "module_17" /* 17 */;
import ClientInfoUtilsAll from "ClientInfoUtils" /* 1367 */;
import DeviceUtils from "DeviceUtils" /* 4737 */;
import NativeDeviceSettingsModuleDefault from "NativeDeviceSettingsModule" /* 5366 */;
import NotificationSettingsConstants from "NotificationSettingsConstants" /* 14727 */;
import NativeNotifSettingsModuleDefault from "NativeNotifSettingsModule" /* 14732 */;
import size from "module_2" /* 2 */;
function refreshSystemNotifPermissions() {
const tmp = NativeNotifSettingsModuleDefault;
let androidNotifChannelStates;
if (tmp != null) {
const getAndroidNotifChannelStates = tmp.getAndroidNotifChannelStates;
if (getAndroidNotifChannelStates != null) {
androidNotifChannelStates = getAndroidNotifChannelStates();
}
}
if (null != androidNotifChannelStates) {
const items = [];
const _Set = Set;
const set = new Set();
const iter = androidNotifChannelStates[Symbol.iterator]();
const nextResult = iter.next();
while (iter !== undefined) {
if (0 === nextResult.importance) {
let addResult = set.add(tmp11.channelId);
}
continue;
}
for (const item10036 of NOTIF_SETTINGS) {
let tmp16 = item10036;
if (set.has(item10036.string_id)) {
let arr = items.push(tmp16.id);
}
continue;
}
const obj = { type: "DECLARATIVE_SYSTEM_NOTIF_PERMISSIONS_UPDATED", disabledSettings: items };
return obj;
}
}
function openSystemNotifSettings(arg0) {
for (const item10008 of NOTIF_SETTINGS) {
if (item10008.id === arg0) {
let string_id = item10008.string_id;
obj.return();
break;
}
if (null != string_id) {
let obj6 = DeviceUtils;
if (obj6.getSystemVersionMajor() >= 26) {
let entry = { key: "android.provider.extra.APP_PACKAGE", value: null };
let obj4 = ClientInfoUtilsAll;
entry.value = obj4.getConstants().Identifier;
let items = [entry, ];
let entry1 = { key: "android.provider.extra.CHANNEL_ID", value: string_id };
items[1] = entry1;
let str = "android.settings.CHANNEL_NOTIFICATION_SETTINGS";
let sendIntentResult = Linking.sendIntent("android.settings.CHANNEL_NOTIFICATION_SETTINGS", items);
} else {
let obj2 = NativeDeviceSettingsModuleDefault;
let result = obj2.openNotificationSettings();
}
}
}
}
const Linking = _mod17.Linking;
const NOTIF_SETTINGS = NotificationSettingsConstants.NOTIF_SETTINGS;
let result = size.fileFinishedImporting("modules/notifications/settings/DeclarativeSystemNotifPermissionHelpers.android.tsx");
export default { openSystemNotifSettings, refreshSystemNotifPermissions };
export { refreshSystemNotifPermissions };
export { openSystemNotifSettings };