Skip to content
Commit bfca3a00 authored by Bernd Holzhey's avatar Bernd Holzhey Committed by Bernd Holzhey
Browse files

Add the automatic handling of night/notnight UI modes.

The automatic switching between night/notnight is based on the calulcation of
the civil twilight of the current location. The location is mainly retrieved
from the NetworkLocationProvider.

Automatic switching will only be available, when
1) the device is in UI_MODE_TYPE_CAR
2) the setting for the UI mode are set to 'automatic'

If mode is set to automatic, the next twilight is caluclated and
an alarm is set that timestamp. The alarm will trigger a new calculation
of the twilight and sets the UI_MODE_NIGHT to the appropriate value.

	modified:   services/java/com/android/server/DockObserver.java
	new file:   services/java/com/android/server/TwilightCalculator.java
parent bd275440
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment