Delete frameworks/base/voip use voip-common from frameworks/opt/net/voip

Move the files down a level under src/, add Android.mk,
CleanSpec.mk and restore src/jni/rtp/Android.mk.

Change-Id: Ieaba759a0f69b45c4b8839cbed1fe757cdf190c5
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..35eaad2
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,36 @@
+# Copyright (C) 2011 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_AIDL_INCLUDES := $(LOCAL_PATH)/src/java
+LOCAL_SRC_FILES := $(call all-java-files-under, src/java) \
+	$(call all-Iaidl-files-under, src/java) \
+	$(call all-logtags-files-under, src/java)
+
+#LOCAL_JAVA_LIBRARIES := telephony-common
+LOCAL_JNI_SHARED_LIBRARIES := librtp_jni 
+LOCAL_REQUIRED_MODULES := librtp_jni
+
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE := voip-common
+
+include $(BUILD_JAVA_LIBRARY)
+
+# Include subdirectory makefiles
+# ============================================================
+include $(call all-makefiles-under,$(LOCAL_PATH)/src/jni)
+
diff --git a/CleanSpec.mk b/CleanSpec.mk
new file mode 100644
index 0000000..31916d3
--- /dev/null
+++ b/CleanSpec.mk
@@ -0,0 +1,45 @@
+# Copyright (C) 2011 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.
+#
+
+# If you don't need to do a full clean build but would like to touch
+# a file or delete some intermediate files, add a clean step to the end
+# of the list.  These steps will only be run once, if they haven't been
+# run before.
+#
+# E.g.:
+#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
+#     $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
+#
+# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
+# files that are missing or have been moved.
+#
+# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
+# Use $(OUT_DIR) to refer to the "out" directory.
+#
+# If you need to re-do something that's already mentioned, just copy
+# the command and add it to the bottom of the list.  E.g., if a change
+# that you made last week required touching a file and a change you
+# made today requires touching the same file, just copy the old
+# touch step and add it to the end of the list.
+#
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
+
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/voip_intermediates)
+
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
diff --git a/java/android/net/rtp/AudioCodec.java b/src/java/android/net/rtp/AudioCodec.java
similarity index 100%
rename from java/android/net/rtp/AudioCodec.java
rename to src/java/android/net/rtp/AudioCodec.java
diff --git a/java/android/net/rtp/AudioGroup.java b/src/java/android/net/rtp/AudioGroup.java
similarity index 100%
rename from java/android/net/rtp/AudioGroup.java
rename to src/java/android/net/rtp/AudioGroup.java
diff --git a/java/android/net/rtp/AudioStream.java b/src/java/android/net/rtp/AudioStream.java
similarity index 100%
rename from java/android/net/rtp/AudioStream.java
rename to src/java/android/net/rtp/AudioStream.java
diff --git a/java/android/net/rtp/RtpStream.java b/src/java/android/net/rtp/RtpStream.java
similarity index 100%
rename from java/android/net/rtp/RtpStream.java
rename to src/java/android/net/rtp/RtpStream.java
diff --git a/java/android/net/rtp/package.html b/src/java/android/net/rtp/package.html
similarity index 100%
rename from java/android/net/rtp/package.html
rename to src/java/android/net/rtp/package.html
diff --git a/java/android/net/sip/ISipService.aidl b/src/java/android/net/sip/ISipService.aidl
similarity index 100%
rename from java/android/net/sip/ISipService.aidl
rename to src/java/android/net/sip/ISipService.aidl
diff --git a/java/android/net/sip/ISipSession.aidl b/src/java/android/net/sip/ISipSession.aidl
similarity index 100%
rename from java/android/net/sip/ISipSession.aidl
rename to src/java/android/net/sip/ISipSession.aidl
diff --git a/java/android/net/sip/ISipSessionListener.aidl b/src/java/android/net/sip/ISipSessionListener.aidl
similarity index 100%
rename from java/android/net/sip/ISipSessionListener.aidl
rename to src/java/android/net/sip/ISipSessionListener.aidl
diff --git a/java/android/net/sip/SimpleSessionDescription.java b/src/java/android/net/sip/SimpleSessionDescription.java
similarity index 100%
rename from java/android/net/sip/SimpleSessionDescription.java
rename to src/java/android/net/sip/SimpleSessionDescription.java
diff --git a/java/android/net/sip/SipAudioCall.java b/src/java/android/net/sip/SipAudioCall.java
similarity index 100%
rename from java/android/net/sip/SipAudioCall.java
rename to src/java/android/net/sip/SipAudioCall.java
diff --git a/java/android/net/sip/SipErrorCode.java b/src/java/android/net/sip/SipErrorCode.java
similarity index 100%
rename from java/android/net/sip/SipErrorCode.java
rename to src/java/android/net/sip/SipErrorCode.java
diff --git a/java/android/net/sip/SipException.java b/src/java/android/net/sip/SipException.java
similarity index 100%
rename from java/android/net/sip/SipException.java
rename to src/java/android/net/sip/SipException.java
diff --git a/java/android/net/sip/SipManager.java b/src/java/android/net/sip/SipManager.java
similarity index 100%
rename from java/android/net/sip/SipManager.java
rename to src/java/android/net/sip/SipManager.java
diff --git a/java/android/net/sip/SipProfile.aidl b/src/java/android/net/sip/SipProfile.aidl
similarity index 100%
rename from java/android/net/sip/SipProfile.aidl
rename to src/java/android/net/sip/SipProfile.aidl
diff --git a/java/android/net/sip/SipProfile.java b/src/java/android/net/sip/SipProfile.java
similarity index 100%
rename from java/android/net/sip/SipProfile.java
rename to src/java/android/net/sip/SipProfile.java
diff --git a/java/android/net/sip/SipRegistrationListener.java b/src/java/android/net/sip/SipRegistrationListener.java
similarity index 100%
rename from java/android/net/sip/SipRegistrationListener.java
rename to src/java/android/net/sip/SipRegistrationListener.java
diff --git a/java/android/net/sip/SipSession.java b/src/java/android/net/sip/SipSession.java
similarity index 100%
rename from java/android/net/sip/SipSession.java
rename to src/java/android/net/sip/SipSession.java
diff --git a/java/android/net/sip/SipSessionAdapter.java b/src/java/android/net/sip/SipSessionAdapter.java
similarity index 100%
rename from java/android/net/sip/SipSessionAdapter.java
rename to src/java/android/net/sip/SipSessionAdapter.java
diff --git a/java/android/net/sip/package.html b/src/java/android/net/sip/package.html
similarity index 100%
rename from java/android/net/sip/package.html
rename to src/java/android/net/sip/package.html
diff --git a/java/com/android/server/sip/SipHelper.java b/src/java/com/android/server/sip/SipHelper.java
similarity index 100%
rename from java/com/android/server/sip/SipHelper.java
rename to src/java/com/android/server/sip/SipHelper.java
diff --git a/java/com/android/server/sip/SipService.java b/src/java/com/android/server/sip/SipService.java
similarity index 100%
rename from java/com/android/server/sip/SipService.java
rename to src/java/com/android/server/sip/SipService.java
diff --git a/java/com/android/server/sip/SipSessionGroup.java b/src/java/com/android/server/sip/SipSessionGroup.java
similarity index 100%
rename from java/com/android/server/sip/SipSessionGroup.java
rename to src/java/com/android/server/sip/SipSessionGroup.java
diff --git a/java/com/android/server/sip/SipSessionListenerProxy.java b/src/java/com/android/server/sip/SipSessionListenerProxy.java
similarity index 100%
rename from java/com/android/server/sip/SipSessionListenerProxy.java
rename to src/java/com/android/server/sip/SipSessionListenerProxy.java
diff --git a/java/com/android/server/sip/SipWakeLock.java b/src/java/com/android/server/sip/SipWakeLock.java
similarity index 100%
rename from java/com/android/server/sip/SipWakeLock.java
rename to src/java/com/android/server/sip/SipWakeLock.java
diff --git a/java/com/android/server/sip/SipWakeupTimer.java b/src/java/com/android/server/sip/SipWakeupTimer.java
similarity index 100%
rename from java/com/android/server/sip/SipWakeupTimer.java
rename to src/java/com/android/server/sip/SipWakeupTimer.java
diff --git a/jni/rtp/AmrCodec.cpp b/src/jni/rtp/AmrCodec.cpp
similarity index 100%
rename from jni/rtp/AmrCodec.cpp
rename to src/jni/rtp/AmrCodec.cpp
diff --git a/src/jni/rtp/Android.mk b/src/jni/rtp/Android.mk
new file mode 100644
index 0000000..b265cdd
--- /dev/null
+++ b/src/jni/rtp/Android.mk
@@ -0,0 +1,59 @@
+#
+# Copyright (C) 2010 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 := librtp_jni
+
+LOCAL_SRC_FILES := \
+	AudioCodec.cpp \
+	AudioGroup.cpp \
+	EchoSuppressor.cpp \
+	RtpStream.cpp \
+	util.cpp \
+	rtp_jni.cpp
+
+LOCAL_SRC_FILES += \
+	AmrCodec.cpp \
+	G711Codec.cpp \
+	GsmCodec.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+	libnativehelper \
+	libcutils \
+	libutils \
+	libmedia \
+	libstagefright_amrnb_common
+
+LOCAL_STATIC_LIBRARIES := libgsm libstagefright_amrnbdec libstagefright_amrnbenc
+
+LOCAL_C_INCLUDES += \
+	$(JNI_H_INCLUDE) \
+	external/libgsm/inc \
+	frameworks/av/media/libstagefright/codecs/amrnb/common/include \
+	frameworks/av/media/libstagefright/codecs/amrnb/common/ \
+	frameworks/av/media/libstagefright/codecs/amrnb/enc/include \
+	frameworks/av/media/libstagefright/codecs/amrnb/enc/src \
+	frameworks/av/media/libstagefright/codecs/amrnb/dec/include \
+	frameworks/av/media/libstagefright/codecs/amrnb/dec/src \
+	$(call include-path-for, audio-effects)
+
+LOCAL_CFLAGS += -fvisibility=hidden
+
+
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/jni/rtp/AudioCodec.cpp b/src/jni/rtp/AudioCodec.cpp
similarity index 100%
rename from jni/rtp/AudioCodec.cpp
rename to src/jni/rtp/AudioCodec.cpp
diff --git a/jni/rtp/AudioCodec.h b/src/jni/rtp/AudioCodec.h
similarity index 100%
rename from jni/rtp/AudioCodec.h
rename to src/jni/rtp/AudioCodec.h
diff --git a/jni/rtp/AudioGroup.cpp b/src/jni/rtp/AudioGroup.cpp
similarity index 100%
rename from jni/rtp/AudioGroup.cpp
rename to src/jni/rtp/AudioGroup.cpp
diff --git a/jni/rtp/EchoSuppressor.cpp b/src/jni/rtp/EchoSuppressor.cpp
similarity index 100%
rename from jni/rtp/EchoSuppressor.cpp
rename to src/jni/rtp/EchoSuppressor.cpp
diff --git a/jni/rtp/EchoSuppressor.h b/src/jni/rtp/EchoSuppressor.h
similarity index 100%
rename from jni/rtp/EchoSuppressor.h
rename to src/jni/rtp/EchoSuppressor.h
diff --git a/jni/rtp/G711Codec.cpp b/src/jni/rtp/G711Codec.cpp
similarity index 100%
rename from jni/rtp/G711Codec.cpp
rename to src/jni/rtp/G711Codec.cpp
diff --git a/jni/rtp/GsmCodec.cpp b/src/jni/rtp/GsmCodec.cpp
similarity index 100%
rename from jni/rtp/GsmCodec.cpp
rename to src/jni/rtp/GsmCodec.cpp
diff --git a/jni/rtp/RtpStream.cpp b/src/jni/rtp/RtpStream.cpp
similarity index 100%
rename from jni/rtp/RtpStream.cpp
rename to src/jni/rtp/RtpStream.cpp
diff --git a/jni/rtp/rtp_jni.cpp b/src/jni/rtp/rtp_jni.cpp
similarity index 100%
rename from jni/rtp/rtp_jni.cpp
rename to src/jni/rtp/rtp_jni.cpp
diff --git a/jni/rtp/util.cpp b/src/jni/rtp/util.cpp
similarity index 100%
rename from jni/rtp/util.cpp
rename to src/jni/rtp/util.cpp