OSDN Git Service

TwilightService v2.0
authorJustin Klaassen <justinklaassen@google.com>
Mon, 8 Aug 2016 16:18:42 +0000 (09:18 -0700)
committerJustin Klaassen <justinklaassen@google.com>
Wed, 10 Aug 2016 04:19:54 +0000 (21:19 -0700)
commit908b86c796443ba4ec55c669e8a0297fc80574a6
treebf59593581d66c8233310441e0bb686e2b780079
parent3cc5d047a7f295a3cd444d0b59dbd9214d37641a
TwilightService v2.0

- Switched to using CalendarAstronomer for more accurate sunrise/sunset
  times.
- Exposed sunrise/sunset times via TwilightState so that clients can
  track the current twilight period and perform their own
  interpolations.
- Adopted LocationRequest API for fused location updates:
  (low power, min 1h, max 10m).
- TwilightService is now only activated when a listener is registered,
  minimizing impact to system health on platforms / configurations
  where twilight state is not needed.

Bug: 28588307
Bug: 30190450
Bug: 30282370
Bug: 30650316
Change-Id: Ic5c94d8608e8bb3a3d895e623676a1468d4abdcd
services/core/java/com/android/server/TwilightCalculator.java [deleted file]
services/core/java/com/android/server/UiModeManagerService.java
services/core/java/com/android/server/display/AutomaticBrightnessController.java
services/core/java/com/android/server/display/NightDisplayService.java
services/core/java/com/android/server/twilight/TwilightListener.java
services/core/java/com/android/server/twilight/TwilightManager.java
services/core/java/com/android/server/twilight/TwilightService.java
services/core/java/com/android/server/twilight/TwilightState.java