Merge "Pipe through Identity through wilhelm" into sc-dev
diff --git a/src/Android.bp b/src/Android.bp
index e33bff1..9a41708 100644
--- a/src/Android.bp
+++ b/src/Android.bp
@@ -242,6 +242,7 @@
         "libdl",
         "libandroid_runtime",
         "libstagefright_http_support",
+        "media_permission-aidl-cpp",
     ],
 
     include_dirs: [
diff --git a/src/android/AudioRecorder_to_android.cpp b/src/android/AudioRecorder_to_android.cpp
index b1fd5ef..e33b9c6 100644
--- a/src/android/AudioRecorder_to_android.cpp
+++ b/src/android/AudioRecorder_to_android.cpp
@@ -29,6 +29,8 @@
 #define KEY_RECORDING_PRESET_PARAMSIZE  sizeof(SLuint32)
 #define KEY_PERFORMANCE_MODE_PARAMSIZE  sizeof(SLuint32)
 
+using android::media::permission::Identity;
+
 //-----------------------------------------------------------------------------
 // Internal utility functions
 //----------------------------
@@ -693,7 +695,7 @@
             sampleRate,            // sample rate in Hertz
             sles_to_android_sampleFormat(df_pcm),               // format
             channelMask,           // channel mask
-            android::String16(),   // app ops
+            Identity(),            // client identity (will be filled in later)
             0,                     // frameCount
             audioRecorder_callback,// callback_t
             (void*)ar,             // user, callback data, here the AudioRecorder
diff --git a/src/android/android_Effect.cpp b/src/android/android_Effect.cpp
index 9341d04..0f14314 100644
--- a/src/android/android_Effect.cpp
+++ b/src/android/android_Effect.cpp
@@ -32,6 +32,8 @@
 
 #include <system/audio.h>
 
+using android::media::permission::Identity;
+
 static const int EQUALIZER_PARAM_SIZE_MAX = sizeof(effect_param_t) + 2 * sizeof(int32_t)
         + EFFECT_STRING_LEN_MAX;
 
@@ -665,7 +667,7 @@
         const effect_uuid_t *type) {
     //SL_LOGV("android_fx_initEffectObj on session %d", sessionId);
 
-    effect = new android::AudioEffect(android::String16());
+    effect = new android::AudioEffect(Identity());
     effect->set(type, EFFECT_UUID_NULL,
             0,// priority
             0,// effect callback
@@ -806,7 +808,7 @@
     }
 
     // create new effect
-    android::sp<android::AudioEffect> pFx = new android::AudioEffect(android::String16());
+    android::sp<android::AudioEffect> pFx = new android::AudioEffect(Identity());
     pFx->set(NULL, // not using type to create effect
             (const effect_uuid_t*)pUuid,
             0,// priority