summaryrefslogtreecommitdiffstats
path: root/voip
diff options
context:
space:
mode:
authorChia-chi Yeh <chiachi@android.com>2012-03-27 15:27:25 -0700
committerChia-chi Yeh <chiachi@android.com>2012-03-27 15:27:25 -0700
commitfb982db41060a2914cddb43200f3ee53627f8762 (patch)
treebe758657bb51b962f497d9dba4c0289d6494960e /voip
parent80e4ee46008d2817dc0496e0cf8c9470c6851755 (diff)
downloadframeworks_base-fb982db41060a2914cddb43200f3ee53627f8762.zip
frameworks_base-fb982db41060a2914cddb43200f3ee53627f8762.tar.gz
frameworks_base-fb982db41060a2914cddb43200f3ee53627f8762.tar.bz2
RTP: add a null-check in AudioStream.setDtmfType().
Change-Id: I52cbdea48affae3747942940451f4fd5ca47030f
Diffstat (limited to 'voip')
-rw-r--r--voip/java/android/net/rtp/AudioStream.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/voip/java/android/net/rtp/AudioStream.java b/voip/java/android/net/rtp/AudioStream.java
index d761214..b7874f7 100644
--- a/voip/java/android/net/rtp/AudioStream.java
+++ b/voip/java/android/net/rtp/AudioStream.java
@@ -158,7 +158,7 @@ public class AudioStream extends RtpStream {
if (type < 96 || type > 127) {
throw new IllegalArgumentException("Invalid type");
}
- if (type == mCodec.type) {
+ if (mCodec != null && type == mCodec.type) {
throw new IllegalArgumentException("The type is used by codec");
}
}