Decrease delay to improve battery life
Arbitrary delays were introduced a while ago to deal with device specific issues but these delays ended up affecting battery life significantly. Although removing them completely isn't possible, they can be reduced to more conservative values. Test: cover prox. sensor multiple times with multiple durations Fixes: 110902271 Change-Id: I2731fc7a5414f796e96a6c97959c395b10c32faa
This commit is contained in:
@@ -113,9 +113,7 @@ public class DozeUi implements DozeMachine.Part {
|
||||
// The display buffers will be empty and need to be filled.
|
||||
mHost.dozeTimeTick();
|
||||
// The first frame may arrive when the display isn't ready yet.
|
||||
mHandler.postDelayed(mWakeLock.wrap(mHost::dozeTimeTick), 100);
|
||||
// The the delayed frame may arrive when the display isn't ready yet either.
|
||||
mHandler.postDelayed(mWakeLock.wrap(mHost::dozeTimeTick), 1000);
|
||||
mHandler.postDelayed(mWakeLock.wrap(mHost::dozeTimeTick), 500);
|
||||
}
|
||||
scheduleTimeTick();
|
||||
break;
|
||||
|
||||
@@ -23,7 +23,7 @@ import android.os.Handler;
|
||||
*/
|
||||
public class DelayedWakeLock implements WakeLock {
|
||||
|
||||
private static final long RELEASE_DELAY_MS = 140;
|
||||
private static final long RELEASE_DELAY_MS = 100;
|
||||
|
||||
private final Handler mHandler;
|
||||
private final WakeLock mInner;
|
||||
|
||||
Reference in New Issue
Block a user