Use full wakelock instead of partial

This commit is contained in:
Skylar Ittner 2019-09-10 20:34:05 -06:00
parent 4c5a999f34
commit 6b1f3a1486
2 changed files with 6 additions and 6 deletions

View File

@ -74,10 +74,10 @@ function initCordova() {
document.addEventListener("deviceready", function () { document.addEventListener("deviceready", function () {
if (localStorage.getItem("wakelock") == "true") { if (localStorage.getItem("wakelock") == "true") {
window.powerManagement.dim(function () { window.powerManagement.acquire(function () {
console.log('Partial wakelock acquired'); console.log('Wakelock acquired');
}, function () { }, function () {
console.log('Failed to acquire partial wakelock'); console.log('Failed to acquire wakelock');
}); });
} else { } else {
window.powerManagement.release(function () { window.powerManagement.release(function () {

View File

@ -24,10 +24,10 @@ $('.item-content[data-setting=wakelock] .toggle input').on("change", function ()
if (platform_type == "cordova") { if (platform_type == "cordova") {
if (localStorage.getItem("wakelock") == "true") { if (localStorage.getItem("wakelock") == "true") {
window.powerManagement.dim(function () { window.powerManagement.acquire(function () {
console.log('Partial wakelock acquired'); console.log('Wakelock acquired');
}, function () { }, function () {
console.log('Failed to acquire partial wakelock'); console.log('Failed to acquire wakelock');
}); });
} else { } else {
window.powerManagement.release(function () { window.powerManagement.release(function () {