Files
faceclaw/app/native/phone-do-not-disturb.ts
T
MasterControl 9ca3574ae7
Tests / test (pull_request) Canceled after 0s
Tests / stats-server (pull_request) Canceled after 0s
Tests / evenhub-extensions (pull_request) Canceled after 0s
Secret scan / gitleaks (pull_request) Canceled after 0s
Tests / test-kotlin (pull_request) Canceled after 0s
[verified] feat: follow phone Do Not Disturb for notification wake
2026-11-11 17:43:35 +00:00

16 lines
449 B
TypeScript

import { Utils } from "@nativescript/core";
declare const com: any;
/** Read the phone's current interruption filter; never change its DND policy. */
export function isPhoneDoNotDisturbEnabled(): boolean {
if (!global.isAndroid) return false;
try {
return Boolean(com.faceclaw.app.FaceclawMediaNotificationListenerService.isPhoneDoNotDisturbEnabled(
Utils.android.getApplicationContext(),
));
} catch {
return false;
}
}