aboutsummaryrefslogtreecommitdiffstats
path: root/cm/res
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-04-23 00:57:07 -0700
committerSteve Kondik <steve@cyngn.com>2016-04-27 22:13:36 -0700
commitbf3c0cf948d3fc0134d44ba5d8986e070d3d6439 (patch)
tree86d3e2b60a04f208b85a5d59cb66c19f8a1ffa26 /cm/res
parent153bd2287cf5658d8eba9e9179404c223fbb9d51 (diff)
downloadvendor_cmsdk-bf3c0cf948d3fc0134d44ba5d8986e070d3d6439.zip
vendor_cmsdk-bf3c0cf948d3fc0134d44ba5d8986e070d3d6439.tar.gz
vendor_cmsdk-bf3c0cf948d3fc0134d44ba5d8986e070d3d6439.tar.bz2
cmsdk: Add CMAudioManager
* This is a rework of the session callback API which previously lived in the framework due to JNI usage. This has been split out and cleaned up for CMSDK. * The JNI library lives on the server side, and the app-level callback has been changed to a protected broadcast. This allows us to wake up registered services when these events occur. * Additionally, we support listing all active audio sessions. * Also brings some JNI love/hate over to CMSDK. Change-Id: I31c293943474419e3db088bb7ffab75f7440ac0f
Diffstat (limited to 'cm/res')
-rw-r--r--cm/res/AndroidManifest.xml9
-rw-r--r--cm/res/res/values/config.xml1
-rw-r--r--cm/res/res/values/strings.xml4
3 files changed, 14 insertions, 0 deletions
diff --git a/cm/res/AndroidManifest.xml b/cm/res/AndroidManifest.xml
index c2be8dc..4c2d228 100644
--- a/cm/res/AndroidManifest.xml
+++ b/cm/res/AndroidManifest.xml
@@ -24,6 +24,7 @@
<protected-broadcast android:name="cyanogenmod.intent.action.SCREEN_CAMERA_GESTURE" />
<protected-broadcast android:name="cyanogenmod.intent.action.INITIALIZE_CM_HARDWARE" />
+ <protected-broadcast android:name="cyanogenmod.intent.action.ACTION_AUDIO_SESSIONS_CHANGED" />
<!-- Must be required by an, to ensure that only the system can bind to it.
@hide -->
@@ -211,6 +212,14 @@
android:description="@string/permdesc_weather_bind"
android:protectionLevel="signature"/>
+ <!-- Allows an application to observe system-wide changes to audio sessions
+ @hide -->
+ <permission android:name="cyanogenmod.permission.OBSERVE_AUDIO_SESSIONS"
+ android:label="@string/permlab_observe_audio_sessions"
+ android:description="@string/permdesc_observe_audio_sessions"
+ android:protectionLevel="normal"/>
+
+
<!-- Allows an application to access the weather service.
<p>Although the protection is normal, this permission should be required ONLY by those apps
meant to do something meaningful with the data provided by the service (LockClock, SysUI)-->
diff --git a/cm/res/res/values/config.xml b/cm/res/res/values/config.xml
index 3755e4b..db621b1 100644
--- a/cm/res/res/values/config.xml
+++ b/cm/res/res/values/config.xml
@@ -98,5 +98,6 @@
<item>org.cyanogenmod.platform.internal.LiveLockScreenServiceBroker</item>
<item>org.cyanogenmod.platform.internal.CMWeatherManagerService</item>
<item>org.cyanogenmod.platform.internal.display.LiveDisplayService</item>
+ <item>org.cyanogenmod.platform.internal.CMAudioService</item>
</string-array>
</resources>
diff --git a/cm/res/res/values/strings.xml b/cm/res/res/values/strings.xml
index 18bfd6a..2c57e00 100644
--- a/cm/res/res/values/strings.xml
+++ b/cm/res/res/values/strings.xml
@@ -214,4 +214,8 @@
<string name="permlab_manageLiveDisplay">manage LiveDisplay settings</string>
<string name="permdesc_manageLiveDisplay">Allows an app to configure advanced display settings.</string>
+ <!-- CMAudioService - observe session changes permission -->
+ <string name="permlab_observe_audio_sessions">observe audio session changes</string>
+ <string name="permdesc_observe_audio_sessions">Allows an app to observe audio streams being created and destroyed.</string>
+
</resources>