forked from Blendman974/faceclaw
[verified] feat: follow phone Do Not Disturb for notification wake
This commit is contained in:
1 parent
54ba6b4f10
commit
9ca3574ae7
14 files changed
+574
-20
No files matched your search
@@ -0,0 +1,15 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user