Detect if power management not available and hide setting for it

This commit is contained in:
Skylar Ittner 2021-02-19 00:23:34 -07:00
parent 3d2e187a11
commit ad820cab3c

View File

@ -801,7 +801,7 @@ var routes = [
] ]
} }
]; ];
if (platform_type == "cordova" && cordova.platformId != "browser") { if (platform_type == "cordova" && cordova.platformId != "browser" && typeof window.powerManagement != "undefined") {
settings.push({ settings.push({
setting: "wakelock", setting: "wakelock",
title: "Keep screen on", title: "Keep screen on",