-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent screensaver while route navigation is active
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package mahomaps; | ||
|
||
import com.nokia.mid.ui.DeviceControl; | ||
|
||
public class DeviceControlInvoker { | ||
|
||
public static boolean supported; | ||
|
||
static { | ||
try { | ||
if (System.getProperty("com.nokia.mid.ui.version") != null && | ||
System.getProperty("com.nokia.mid.ui.screensaverprevention") != null) { | ||
Class.forName("com.nokia.mid.ui.DeviceControl"); | ||
supported = true; | ||
} | ||
} catch (Exception e) { | ||
} | ||
} | ||
|
||
public static void resetUserInactivityTime() { | ||
if (!supported) return; | ||
try { | ||
DeviceControl.resetUserInactivityTime(); | ||
} catch (Throwable e) { | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters