Add permission for the broadcast intent with SIP profiles for security purpose. am: 0e459673aa am: 4ba90c33b5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/voip/+/13787771

Change-Id: I03f812b7134b5296335adf517a96600133017f2d
diff --git a/Android.bp b/Android.bp
index 0428c01..3dd8f09 100644
--- a/Android.bp
+++ b/Android.bp
@@ -28,6 +28,7 @@
 
 java_library {
     name: "voip-common",
+    installable: true,
     srcs: [
         "src/java/**/*.java",
         "src/java/**/I*.aidl",
diff --git a/src/jni/rtp/AudioGroup.cpp b/src/jni/rtp/AudioGroup.cpp
index a3f62b8..aa3fc66 100644
--- a/src/jni/rtp/AudioGroup.cpp
+++ b/src/jni/rtp/AudioGroup.cpp
@@ -576,9 +576,9 @@
 
 bool AudioGroup::set(int sampleRate, int sampleCount)
 {
-    mEventQueue = epoll_create(2);
+    mEventQueue = epoll_create1(EPOLL_CLOEXEC);
     if (mEventQueue == -1) {
-        ALOGE("epoll_create: %s", strerror(errno));
+        ALOGE("epoll_create1: %s", strerror(errno));
         return false;
     }
 
@@ -847,7 +847,7 @@
                                     0,
                                     0,
                                     record->getSessionId(),
-                                    record->getInput());
+                                    AUDIO_IO_HANDLE_NONE); // record sessionId is sufficient.
             status_t status = aec->initCheck();
             if (status == NO_ERROR || status == ALREADY_EXISTS) {
                 aec->setEnabled(true);