Skip to content

Commit

Permalink
SIP Part 1, move sip code
Browse files Browse the repository at this point in the history
This CL moves the SIP code to
sip/src/com/android/services/telephony/sip

Moving the SIP code helps with a couple of things:
  - remove legacy dependency on old telephony code
    (PhoneUtils, etc...)
  - separate SIP from the PSTN connection code which
    is very different from SIP code
  - get the code ready for a future move out of
    Telephony all together

Bug: 14999064
Change-Id: Id32de6517d31be4aa177b2764d5bac1e1f9851c2
  • Loading branch information
Sailesh Nepal committed Jul 9, 2014
1 parent 9d67f24 commit 788959e
Show file tree
Hide file tree
Showing 28 changed files with 712 additions and 1,201 deletions.
9 changes: 5 additions & 4 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ include $(CLEAR_VARS)

phone_common_dir := ../../apps/PhoneCommon

src_dirs := src $(phone_common_dir)/src
res_dirs := res $(phone_common_dir)/res
src_dirs := src $(phone_common_dir)/src sip/src
res_dirs := res $(phone_common_dir)/res sip/res

LOCAL_JAVA_LIBRARIES := telephony-common voip-common ims-common
LOCAL_STATIC_JAVA_LIBRARIES := \
Expand All @@ -23,14 +23,15 @@ LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs))

LOCAL_AAPT_FLAGS := \
--auto-add-overlay \
--extra-packages com.android.phone.common
--extra-packages com.android.phone.common \
--extra-packages com.android.services.telephony.sip

LOCAL_PACKAGE_NAME := TeleService

LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true

LOCAL_PROGUARD_FLAG_FILES := proguard.flags
LOCAL_PROGUARD_FLAG_FILES := proguard.flags sip/proguard.flags

include $(BUILD_PACKAGE)

Expand Down
28 changes: 13 additions & 15 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -466,32 +466,38 @@
</intent-filter>
</activity>

<receiver android:name="SipBroadcastReceiver">
<service android:singleUser="true"
android:name="com.android.services.telephony.sip.SipConnectionService"
android:label="@string/sip_connection_service_label">
<intent-filter>
<action android:name="android.telecomm.ConnectionService" />
</intent-filter>
</service>
<receiver android:name="com.android.services.telephony.sip.SipBroadcastReceiver">
<intent-filter>
<action android:name="com.android.phone.SIP_INCOMING_CALL" />
<action android:name="com.android.phone.SIP_ADD_PHONE" />
<action android:name="com.android.phone.SIP_REMOVE_PHONE" />
<action android:name="android.net.sip.SIP_SERVICE_UP" />
</intent-filter>
</receiver>

<activity android:label="Sip Settings"
android:name=".sip.SipSettings"
android:name="com.android.services.telephony.sip.SipSettings"
android:theme="@style/SettingsLight"
android:launchMode="singleTop"
android:configChanges="orientation|screenSize|keyboardHidden"
android:uiOptions="splitActionBarWhenNarrow">
android:uiOptions="splitActionBarWhenNarrow"
android:parentActivityName="com.android.phone.CallFeaturesSetting" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.net.sip.NOTIFY" />
</intent-filter>
</activity>
<activity android:name=".sip.SipEditor"
<activity android:name="com.android.services.telephony.sip.SipEditor"
android:theme="@style/SettingsLight"
android:configChanges="orientation|screenSize|keyboardHidden"
android:uiOptions="splitActionBarWhenNarrow">
</activity>
<activity android:name=".SipCallOptionHandler"
<activity android:name="com.android.services.telephony.SipCallOptionHandler"
android:theme="@style/SipCallOptionHandlerTheme"
android:screenOrientation="nosensor"
android:configChanges="orientation|screenSize|keyboardHidden"
Expand Down Expand Up @@ -558,14 +564,6 @@
<action android:name="android.telecomm.ConnectionService" />
</intent-filter>
</service>
<service
android:singleUser="true"
android:name="com.android.services.telephony.SipConnectionService"
android:label="@string/sip_connection_service_label">
<intent-filter>
<action android:name="android.telecomm.ConnectionService" />
</intent-filter>
</service>
<provider
android:name="PhoneSearchIndexablesProvider"
android:authorities="com.android.phone"
Expand Down
198 changes: 0 additions & 198 deletions res/values/strings.xml

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions sip/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2014, The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, res)

LOCAL_JAVA_LIBRARIES := telephony-common voip-common

LOCAL_PACKAGE_NAME := com.android.services.telephony.sip

LOCAL_PROGUARD_FLAG_FILES := proguard.flags

include $(BUILD_PACKAGE)
include $(CLEAR_VARS)
22 changes: 22 additions & 0 deletions sip/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2014 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.services.telephony.sip">

</manifest>

3 changes: 3 additions & 0 deletions sip/proguard.flags
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-verbose
-keep class com.android.services.telephony.sip.SipConnectionService
-keep class com.android.services.telephony.sip.SipBroadcastReceiver
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 788959e

Please sign in to comment.