Commit graph

7 commits

Author SHA1 Message Date
ezio84
34b53614b3 whyred: 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-07-09 15:37:26 +05:30
Bruno Martins
700ccf86f6 whyred: Doze: Minor code simplification and clean up
Change-Id: Idff05f2626138c96dccd3ab4c26c4df1be40a606
2018-06-25 21:15:45 +05:30
Bruno Martins
c1cfc3152b whyred: Doze: Build with AAPT2
Change-Id: Iab14804817e6b90bf4d773d9359a04f1e119264a
2018-06-25 21:15:33 +05:30
Bruno Martins
390020d0b2 whyred: Doze: Re-integrate into Settings
* Apply the default Oreo theme and inherit the layouts
   from Google for the Settings app, in order to keep
   UI consistency.

 * Get rid of SettingsDrawerActivity as it no longer fits in
   and include the back button in the action bar.

 * Kill the icon drawable not only because is a leftover,
   but also doesn't really serve any puropose in the new UI.

Change-Id: I53b6d3bb99d63852ba34d71e16ae99f05223569e
2018-06-25 21:15:15 +05:30
Bruno Martins
6d733eaae1 whyred: Doze: Apply LineageOS rebrand
Change-Id: I4daa1092494fdf207ef54dc79f787bcbe1d01a08
2018-06-25 21:15:00 +05:30
Álvaro Brey
55a8e721f2 modules: doze: Fix devicesettings path
* Was broken when moved to modules, since it iss a relative path
Change-Id: I7d934e7cfeccdc4bcaaf917de1316e81b34ae220
2018-06-25 21:14:58 +05:30
xiaobai
d02b8b9943 whyred: import doze from mi5 2018-06-25 21:14:49 +05:30