summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/SystemServer.java
diff options
context:
space:
mode:
authorBai Tao <michaelbai@google.com>2010-07-13 15:32:16 +0800
committerBai Tao <michaelbai@google.com>2010-07-28 09:45:57 +0800
commita58a8751b4c2ce457f0082a0baaee61312d56195 (patch)
tree14521164e8ce7f53e55f3af25efa9c4078a8c8b0 /services/java/com/android/server/SystemServer.java
parent42d8f6f2fbf2d73f01dd485e043bc33b575f9881 (diff)
Add new system service CountryDetector
a. The CountryDetector detects the country the user is in in order of mobile network, location, sim card or locale. It will be used by contact and contact provider. b. All added APIs are hidden at this stage. Change-Id: I4ba278571ffb6ab6ded0996d4f440a18534f8ed4
Diffstat (limited to 'services/java/com/android/server/SystemServer.java')
-rw-r--r--services/java/com/android/server/SystemServer.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 3586d21df75e..2412b7d860a0 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -206,6 +206,7 @@ class ServerThread extends Thread {
NotificationManagerService notification = null;
WallpaperManagerService wallpaper = null;
LocationManagerService location = null;
+ CountryDetectorService countryDetector = null;
if (factoryTest != SystemServer.FACTORY_TEST_LOW_LEVEL) {
try {
@@ -316,6 +317,14 @@ class ServerThread extends Thread {
}
try {
+ Slog.i(TAG, "Country Detector");
+ countryDetector = new CountryDetectorService(context);
+ ServiceManager.addService(Context.COUNTRY_DETECTOR, countryDetector);
+ } catch (Throwable e) {
+ Slog.e(TAG, "Failure starting Country Detector", e);
+ }
+
+ try {
Slog.i(TAG, "Search Service");
ServiceManager.addService(Context.SEARCH_SERVICE,
new SearchManagerService(context));
@@ -479,6 +488,7 @@ class ServerThread extends Thread {
final InputMethodManagerService immF = imm;
final RecognitionManagerService recognitionF = recognition;
final LocationManagerService locationF = location;
+ final CountryDetectorService countryDetectorF = countryDetector;
// We now tell the activity manager it is okay to run third party
// code. It will call back into us once it has gotten to the state
@@ -506,6 +516,7 @@ class ServerThread extends Thread {
if (wallpaperF != null) wallpaperF.systemReady();
if (immF != null) immF.systemReady();
if (locationF != null) locationF.systemReady();
+ if (countryDetectorF != null) countryDetectorF.systemReady();
if (throttleF != null) throttleF.systemReady();
}
});