From bc0e400d78ccba89af9a1472dcbf1853a73f7d0d Mon Sep 17 00:00:00 2001 From: John Wang Date: Mon, 13 Sep 2010 19:10:21 -0700 Subject: [PATCH] Return immutable copies of private callList. Change-Id: I3da97acf89e044515e98fa04233dd378c32c250d --- .../android/internal/telephony/CallManager.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/telephony/java/com/android/internal/telephony/CallManager.java b/telephony/java/com/android/internal/telephony/CallManager.java index 4bf32829e761f..d522bde69d0ac 100644 --- a/telephony/java/com/android/internal/telephony/CallManager.java +++ b/telephony/java/com/android/internal/telephony/CallManager.java @@ -1144,22 +1144,22 @@ public final class CallManager { /** * @return list of all ringing calls */ - public ArrayList getRingingCalls() { - return mRingingCalls; + public List getRingingCalls() { + return Collections.unmodifiableList(mRingingCalls); } /** * @return list of all foreground calls */ - public ArrayList getForegroundCalls() { - return mForegroundCalls; + public List getForegroundCalls() { + return Collections.unmodifiableList(mForegroundCalls); } /** * @return list of all background calls */ - public ArrayList getBackgroundCalls() { - return mBackgroundCalls; + public List getBackgroundCalls() { + return Collections.unmodifiableList(mBackgroundCalls); } /** @@ -1269,7 +1269,7 @@ public final class CallManager { /** * @return the connections of active foreground call - * return null if there is no active foreground call + * return empty list if there is no active foreground call */ public List getFgCallConnections() { Call fgCall = getActiveFgCall();