summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/CountryDetectorService.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2013-05-03 01:48:55 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-05-03 01:48:55 +0000
commitc9dc93e5ca71ce1df792e6ac9fcfe8d9eda4f96c (patch)
tree303020ac6d4a85ce0a06dce07f2112221f6e6b4b /services/java/com/android/server/CountryDetectorService.java
parent56af3176b9e69f10e52b663315a769f58ad2ca10 (diff)
parent8d044e8bc287c1a567d82aedbe30085b011544c3 (diff)
Merge "Start combining threads in system process."
Diffstat (limited to 'services/java/com/android/server/CountryDetectorService.java')
-rw-r--r--services/java/com/android/server/CountryDetectorService.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/services/java/com/android/server/CountryDetectorService.java b/services/java/com/android/server/CountryDetectorService.java
index fc762777727a..8407fa44648f 100644
--- a/services/java/com/android/server/CountryDetectorService.java
+++ b/services/java/com/android/server/CountryDetectorService.java
@@ -20,6 +20,7 @@ import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.HashMap;
+import com.android.internal.os.BackgroundThread;
import com.android.server.location.ComprehensiveCountryDetector;
import android.content.Context;
@@ -29,8 +30,6 @@ import android.location.ICountryDetector;
import android.location.ICountryListener;
import android.os.Handler;
import android.os.IBinder;
-import android.os.Looper;
-import android.os.Process;
import android.os.RemoteException;
import android.util.PrintWriterPrinter;
import android.util.Printer;
@@ -169,8 +168,7 @@ public class CountryDetectorService extends ICountryDetector.Stub implements Run
void systemReady() {
// Shall we wait for the initialization finish.
- Thread thread = new Thread(this, "CountryDetectorService");
- thread.start();
+ BackgroundThread.getHandler().post(this);
}
private void initialize() {
@@ -187,12 +185,9 @@ public class CountryDetectorService extends ICountryDetector.Stub implements Run
}
public void run() {
- Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
- Looper.prepare();
mHandler = new Handler();
initialize();
mSystemReady = true;
- Looper.loop();
}
protected void setCountryListener(final CountryListener listener) {