summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2010-09-25 22:49:59 +0800
committerHung-ying Tyan <tyanh@google.com>2010-09-28 05:19:35 +0800
commit7e54ef71db3320a751571bba5259fba816399421 (patch)
treeac4c1a7d45c1406366e7f7ba02ec0b0d6117d386
parent04a426f5b50a628fb73bc29b003b0e5bece17c27 (diff)
downloadframeworks_base-7e54ef71db3320a751571bba5259fba816399421.zip
frameworks_base-7e54ef71db3320a751571bba5259fba816399421.tar.gz
frameworks_base-7e54ef71db3320a751571bba5259fba816399421.tar.bz2
Move SipService out of SystemServer to phone process.
Companion CL: https://android-git/g/#change,70187 http://b/issue?id=2998069 Change-Id: I90923ac522ef363a4e04292f652d413c5a1526ad
-rw-r--r--cmds/servicemanager/service_manager.c1
-rw-r--r--services/java/com/android/server/SystemServer.java11
-rw-r--r--voip/java/com/android/server/sip/SipHelper.java (renamed from services/java/com/android/server/sip/SipHelper.java)0
-rw-r--r--voip/java/com/android/server/sip/SipService.java (renamed from services/java/com/android/server/sip/SipService.java)13
-rw-r--r--voip/java/com/android/server/sip/SipSessionGroup.java (renamed from services/java/com/android/server/sip/SipSessionGroup.java)0
-rw-r--r--voip/java/com/android/server/sip/SipSessionListenerProxy.java (renamed from services/java/com/android/server/sip/SipSessionListenerProxy.java)0
6 files changed, 9 insertions, 16 deletions
diff --git a/cmds/servicemanager/service_manager.c b/cmds/servicemanager/service_manager.c
index 01cddc6..22d5b39 100644
--- a/cmds/servicemanager/service_manager.c
+++ b/cmds/servicemanager/service_manager.c
@@ -40,6 +40,7 @@ static struct {
{ AID_RADIO, "radio.simphonebook" },
/* TODO: remove after phone services are updated: */
{ AID_RADIO, "phone" },
+ { AID_RADIO, "sip" },
{ AID_RADIO, "isms" },
{ AID_RADIO, "iphonesubinfo" },
{ AID_RADIO, "simphonebook" },
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 9475005..a80ab1d 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -17,7 +17,6 @@
package com.android.server;
import com.android.server.am.ActivityManagerService;
-import com.android.server.sip.SipService;
import com.android.internal.os.BinderInternal;
import com.android.internal.os.SamplingProfilerIntegration;
@@ -417,16 +416,6 @@ class ServerThread extends Thread {
} catch (Throwable e) {
Slog.e(TAG, "Failure starting DiskStats Service", e);
}
-
- try {
- SipService sipService = SipService.create(context);
- if (sipService != null) {
- Slog.i(TAG, "Sip Service");
- ServiceManager.addService("sip", sipService);
- }
- } catch (Throwable e) {
- Slog.e(TAG, "Failure starting SIP Service", e);
- }
}
// make sure the ADB_ENABLED setting value matches the secure property value
diff --git a/services/java/com/android/server/sip/SipHelper.java b/voip/java/com/android/server/sip/SipHelper.java
index 050eddc..050eddc 100644
--- a/services/java/com/android/server/sip/SipHelper.java
+++ b/voip/java/com/android/server/sip/SipHelper.java
diff --git a/services/java/com/android/server/sip/SipService.java b/voip/java/com/android/server/sip/SipService.java
index 3f43e1c..0ff5586 100644
--- a/services/java/com/android/server/sip/SipService.java
+++ b/voip/java/com/android/server/sip/SipService.java
@@ -40,6 +40,7 @@ import android.os.HandlerThread;
import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
+import android.os.ServiceManager;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Log;
@@ -90,12 +91,14 @@ public final class SipService extends ISipService.Stub {
private ConnectivityReceiver mConnectivityReceiver;
/**
- * Creates a {@code SipService} instance. Returns null if SIP API is not
- * supported.
+ * Starts the SIP service. Do nothing if the SIP API is not supported on the
+ * device.
*/
- public static SipService create(Context context) {
- return (SipManager.isApiSupported(context) ? new SipService(context)
- : null);
+ public static void start(Context context) {
+ if (SipManager.isApiSupported(context)) {
+ ServiceManager.addService("sip", new SipService(context));
+ Log.i(TAG, "SIP service started");
+ }
}
private SipService(Context context) {
diff --git a/services/java/com/android/server/sip/SipSessionGroup.java b/voip/java/com/android/server/sip/SipSessionGroup.java
index 91677a2..91677a2 100644
--- a/services/java/com/android/server/sip/SipSessionGroup.java
+++ b/voip/java/com/android/server/sip/SipSessionGroup.java
diff --git a/services/java/com/android/server/sip/SipSessionListenerProxy.java b/voip/java/com/android/server/sip/SipSessionListenerProxy.java
index f8be0a8..f8be0a8 100644
--- a/services/java/com/android/server/sip/SipSessionListenerProxy.java
+++ b/voip/java/com/android/server/sip/SipSessionListenerProxy.java