Add the missing functions for compatibility.

+change the default incoming call intent to Phone2.
Change-Id: Ifd3585a5c1d2484258261650422d66334664776e
diff --git a/settings/com/android/settings/sip/SipSettings.java b/settings/com/android/settings/sip/SipSettings.java
index b7c26ba..289772e 100644
--- a/settings/com/android/settings/sip/SipSettings.java
+++ b/settings/com/android/settings/sip/SipSettings.java
@@ -70,7 +70,7 @@
     private static final String UNREGISTERED = "NOT REGISTERED";
 
     public static final String INCOMING_CALL_ACTION =
-            "com.android.sip.demo.SipMain";
+            "com.android.phone.SIP_INCOMING_CALL";
 
     private static final int REQUEST_ADD_OR_EDIT_SIP_PROFILE = 1;
 
diff --git a/src/android/net/rtp/AudioCodec.java b/src/android/net/rtp/AudioCodec.java
index 0b43e89..242ad58 100644
--- a/src/android/net/rtp/AudioCodec.java
+++ b/src/android/net/rtp/AudioCodec.java
@@ -20,6 +20,27 @@
     public static final AudioCodec ULAW = new AudioCodec("PCMU", 8000, 160, 0);
     public static final AudioCodec ALAW = new AudioCodec("PCMA", 8000, 160, 8);
 
+    /**
+     * Returns system supported codecs.
+     */
+    public static AudioCodec[] getSystemSupportedCodecs() {
+        return new AudioCodec[] {AudioCodec.ULAW, AudioCodec.ALAW};
+    }
+
+    /**
+     * Returns the codec instance if it is supported by the system.
+     *
+     * @param name name of the codec
+     * @return the matched codec or null if the codec name is not supported by
+     *      the system
+     */
+    public static AudioCodec getSystemSupportedCodec(String name) {
+        for (AudioCodec codec : getSystemSupportedCodecs()) {
+            if (codec.name.equals(name)) return codec;
+        }
+        return null;
+    }
+
     public final String name;
     public final int sampleRate;
     public final int sampleCount;