Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a6e3f4b authored by Matías Hernández's avatar Matías Hernández
Browse files

Use elapsedRealtimeClock as time source for RateEstimator in NM

InstantSource.system is basically currentTimeMillis(), which means it's not suitable for timing (can jump forward or backwards). For rate estimation, we don't care about correspondence with real-world time, so elapsedRealtime() is what we want.

Also moved the creation of the InstantSource to NotificationManager; SystemServiceRegistry shouldn't need to be concerned about this, nor know the details of the specific time source that is best.

Bug: 381875150
Test: manual
Flag: android.app.nm_binder_perf_throttle_notify
Change-Id: Ic336b8d26777a875476c75950875657265b2fa16
parent 6b0271bd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment