File indexing completed on 2024-12-15 04:23:42

0001 /*
0002     SPDX-FileCopyrightText: 2019 Nicolas Fella <nicolas.fella@gmx.de>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "androidlockbackend.h"
0008 
0009 #include <QDebug>
0010 #include <QtAndroid>
0011 #include <QAndroidJniObject>
0012 
0013 AndroidLockBackend::AndroidLockBackend(QObject *parent)
0014     : LockBackend(parent)
0015 {
0016 }
0017 
0018 AndroidLockBackend::~AndroidLockBackend()
0019 {
0020 }
0021 
0022 void AndroidLockBackend::setInhibitionOff()
0023 {
0024     QAndroidJniObject::callStaticMethod<void>("org.maui.clip.Solid", "setLockInhibitionOff", "(Landroid/app/Activity;)V", QtAndroid::androidActivity().object());
0025 }
0026 
0027 void AndroidLockBackend::setInhibitionOn(const QString &explanation)
0028 {
0029     Q_UNUSED(explanation)
0030     QAndroidJniObject::callStaticMethod<void>("org.maui.clip.Solid", "setLockInhibitionOn", "(Landroid/app/Activity;)V", QtAndroid::androidActivity().object());
0031 }