summaryrefslogtreecommitdiffstats
path: root/media/jni
diff options
context:
space:
mode:
authorDave Burke <daveburke@google.com>2011-08-30 14:39:17 +0100
committerDave Burke <daveburke@google.com>2011-09-02 11:26:59 +0100
commitfc301b0bb5c635c6bb51b48c504a8db5f9010e5c (patch)
tree463dec648e238d2e6821a86d121f2a3f8048b3ff /media/jni
parent117999d1f44ec3423369385495ae207898b7b73e (diff)
downloadframeworks_base-fc301b0bb5c635c6bb51b48c504a8db5f9010e5c.zip
frameworks_base-fc301b0bb5c635c6bb51b48c504a8db5f9010e5c.tar.gz
frameworks_base-fc301b0bb5c635c6bb51b48c504a8db5f9010e5c.tar.bz2
Require INTERNET permission for network-based content.
Bug #1870981 Change-Id: Ia3ad166390c4d60cea19c3783895b078a2c4c15f
Diffstat (limited to 'media/jni')
-rw-r--r--media/jni/android_media_MediaPlayer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index 354f2c9..5dfbe01 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -155,6 +155,8 @@ static void process_media_player_call(JNIEnv *env, jobject thiz, status_t opStat
} else { // Throw exception!
if ( opStatus == (status_t) INVALID_OPERATION ) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ } else if ( opStatus == (status_t) PERMISSION_DENIED ) {
+ jniThrowException(env, "java/lang/SecurityException", NULL);
} else if ( opStatus != (status_t) OK ) {
if (strlen(message) > 230) {
// if the message is too long, don't bother displaying the status code