mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-21 02:01:03 +07:00
20 lines
612 B
C++
20 lines
612 B
C++
|
|
#include "android_notificationhandler.h"
|
||
|
|
|
||
|
|
#include "android_controller.h"
|
||
|
|
|
||
|
|
AndroidNotificationHandler::AndroidNotificationHandler(QObject *parent)
|
||
|
|
: NotificationHandler(parent)
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
void AndroidNotificationHandler::notify(Message type, const QString &title, const QString &message, int timerMsec)
|
||
|
|
{
|
||
|
|
Q_UNUSED(type);
|
||
|
|
Q_UNUSED(timerMsec);
|
||
|
|
// Permission is checked on the Kotlin side as well; avoid JNI if already denied.
|
||
|
|
if (!AndroidController::instance()->isNotificationPermissionGranted()) {
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
AndroidController::instance()->showVpnStateNotification(title, message);
|
||
|
|
}
|