Bug 846203 - the user activity timer will be reset when the Wakelock is released(for Android). r=snorp

MozReview-Commit-ID: 8GN81YzNjGM

--HG--
extra : rebase_source : 95477c1560d1969b70d4feb8fe1e878dd7d4a9fe
This commit is contained in:
Farmer Tseng 2016-09-05 16:52:18 +08:00
Родитель a61ae5ffdb
Коммит 480caffe1a
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -2573,7 +2573,9 @@ public abstract class GeckoApp
if (CPU.equals(topic)) {
wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, topic);
} else if (SCREEN.equals(topic)) {
wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, topic);
// ON_AFTER_RELEASE is set, the user activity timer will be reset when the
// WakeLock is released, causing the illumination to remain on a bit longer.
wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.ON_AFTER_RELEASE, topic);
}
if (wl != null) {