diff options
author | John Spurlock <jspurlock@google.com> | 2014-03-10 08:33:35 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-03-19 15:32:51 -0400 |
commit | 1af30c7ac480e5d335f267a3ac3b2e6c748ce240 (patch) | |
tree | 584362f9abb3f28a21f144811fd86fc2bc3c73f0 /policy | |
parent | 31dc8f701fb14e185bf1c1b35d68bd7d1a42a54a (diff) | |
download | frameworks_base-1af30c7ac480e5d335f267a3ac3b2e6c748ce240.zip frameworks_base-1af30c7ac480e5d335f267a3ac3b2e6c748ce240.tar.gz frameworks_base-1af30c7ac480e5d335f267a3ac3b2e6c748ce240.tar.bz2 |
Add stream-level suppression to vibrate/audio services.
- Add new audio restriction layer to app-ops. Restrictions add
additional constraints to audio operations at a stream-level.
Restrictions do not affect the persistable state, and are purely
additive: that is, they can only impose additional contstraints, not
enable something that has already been disabled. Restrictions
also support a whitelisted set of exempt package names.
- Add new audio stream-level checks to app-ops.
- Implement a provisional OP_PLAY_AUDIO suppression to three
java entry points MediaPlayer, AudioTrack, & SoundPool.
- Enhance vibrator api to take stream information as an optional
hint - the constants correspond to AudioManager stream types.
OP_VIBRATE now supports the stream-level restriction check.
- Simplify Vibrator subclasses by adding default implementations
for two .vibrate calls.
- Migrate NoMan's zen-mode control to use the new app-ops
stream-level restriction mechanism.
Change-Id: Ifae8952647202f728cf1c73e881452660c704678
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 1cca164..afa68da 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -5083,10 +5083,10 @@ public class PhoneWindowManager implements WindowManagerPolicy { } if (pattern.length == 1) { // One-shot vibration - mVibrator.vibrate(owningUid, owningPackage, pattern[0]); + mVibrator.vibrate(owningUid, owningPackage, pattern[0], AudioManager.STREAM_SYSTEM); } else { // Pattern vibration - mVibrator.vibrate(owningUid, owningPackage, pattern, -1); + mVibrator.vibrate(owningUid, owningPackage, pattern, -1, AudioManager.STREAM_SYSTEM); } return true; } |