forked from Blendman974/faceclaw
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;
|
|
}
|
|
}
|