summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDan Elkouby <streetwalrus@codewalr.us>2015-12-19 21:12:23 +0200
committerSteve Kondik <shade@chemlab.org>2015-12-19 19:31:00 -0800
commit86595f912d8593a9581a8bd99f1849b8e4505de3 (patch)
tree8b693bbfee43ff9830a8ee8029b066011e76196b /services
parent9547f28464cb5470236c4e8d8d15cc2e4b46f4ed (diff)
downloadframeworks_base-86595f912d8593a9581a8bd99f1849b8e4505de3.zip
frameworks_base-86595f912d8593a9581a8bd99f1849b8e4505de3.tar.gz
frameworks_base-86595f912d8593a9581a8bd99f1849b8e4505de3.tar.bz2
TwilightService: always fall back to timezone-based location
This allows using LiveDisplay when all location services are disabled. Change-Id: I988656c323a759c15f2cafd2b9d73dba60e93d75
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/twilight/TwilightService.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/twilight/TwilightService.java b/services/core/java/com/android/server/twilight/TwilightService.java
index a71961c..2185b19 100644
--- a/services/core/java/com/android/server/twilight/TwilightService.java
+++ b/services/core/java/com/android/server/twilight/TwilightService.java
@@ -309,6 +309,13 @@ public final class TwilightService extends SystemService {
}
sendEmptyMessageDelayed(MSG_ENABLE_LOCATION_UPDATES, mLastUpdateInterval);
}
+
+ if (!networkLocationEnabled && mLocation == null) {
+ if (DEBUG) {
+ Slog.d(TAG, "Network location unavailable");
+ }
+ retrieveLocation();
+ }
break;
case MSG_DO_TWILIGHT_UPDATE: