android_device_lenovo_msm89.../doze
ezio84 9270e5e3b3 msm8937-common: doze: use ExecutorService for listener registration
Replicate what Google did for SystemUI in this commit.
fabc743bcf

Registering a sensor seems to be an expensive operation,
and we do it on each screen-on event, so moving it to
an asynchronous task looks like a good idea anyway.

By moving all non-essential binder calls of the main thread or to the
next frame, we bring this down to 5ms, such that window animation
and Keyguard animation starts about at the same time.

The interesting part about the ExecutorService:
"Memory consistency effects: Actions in a thread prior to the submission
of a Runnable or Callable task to an ExecutorService happen-before any
actions taken by that task, which in turn happen-before the result is
retrieved via Future.get()."
(from https://developer.android.com/reference/java/util/concurrent/ExecutorService)

Change-Id: I4f37bb9a7dc9d7775d587d4ebd4b6619f3b77e81
2018-06-29 00:05:46 +08:00
..
res msm8937-common: Doze: Re-integrate into Settings 2018-06-29 00:05:04 +08:00
src/org/lineageos/settings/doze msm8937-common: doze: use ExecutorService for listener registration 2018-06-29 00:05:46 +08:00
Android.mk msm8937-common: Doze: Build with AAPT2 2018-06-29 00:05:16 +08:00
AndroidManifest.xml msm8937-common: Doze: Apply LineageOS rebrand 2018-06-29 00:04:52 +08:00
proguard.flags msm8937-common: Doze: Apply LineageOS rebrand 2018-06-29 00:04:52 +08:00