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
16 lines
449 B
TypeScript
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;
|
|
}
|
|
}
|