Use full wakelock instead of partial
This commit is contained in:
parent
4c5a999f34
commit
6b1f3a1486
@ -74,10 +74,10 @@ function initCordova() {
|
||||
|
||||
document.addEventListener("deviceready", function () {
|
||||
if (localStorage.getItem("wakelock") == "true") {
|
||||
window.powerManagement.dim(function () {
|
||||
console.log('Partial wakelock acquired');
|
||||
window.powerManagement.acquire(function () {
|
||||
console.log('Wakelock acquired');
|
||||
}, function () {
|
||||
console.log('Failed to acquire partial wakelock');
|
||||
console.log('Failed to acquire wakelock');
|
||||
});
|
||||
} else {
|
||||
window.powerManagement.release(function () {
|
||||
|
@ -24,10 +24,10 @@ $('.item-content[data-setting=wakelock] .toggle input').on("change", function ()
|
||||
|
||||
if (platform_type == "cordova") {
|
||||
if (localStorage.getItem("wakelock") == "true") {
|
||||
window.powerManagement.dim(function () {
|
||||
console.log('Partial wakelock acquired');
|
||||
window.powerManagement.acquire(function () {
|
||||
console.log('Wakelock acquired');
|
||||
}, function () {
|
||||
console.log('Failed to acquire partial wakelock');
|
||||
console.log('Failed to acquire wakelock');
|
||||
});
|
||||
} else {
|
||||
window.powerManagement.release(function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user