diff options
Diffstat (limited to 'telecomm/java')
| -rw-r--r-- | telecomm/java/android/telecom/Call.java | 18 | ||||
| -rw-r--r-- | telecomm/java/android/telecom/Log.java | 2 |
2 files changed, 6 insertions, 14 deletions
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java index e8e06808e189..c1289d3f1401 100644 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -19,7 +19,6 @@ package android.telecom; import android.annotation.IntDef; import android.annotation.Nullable; import android.annotation.SystemApi; -import android.annotation.TestApi; import android.net.Uri; import android.os.Bundle; import android.os.Handler; @@ -1090,17 +1089,12 @@ public final class Call { * @return A string containing text sent by the remote user, or {@code null} if the * conversation has been terminated or if there was an error while reading. */ - public String read() { - try { - int numRead = mReceiveStream.read(mReadBuffer, 0, READ_BUFFER_SIZE); - if (numRead < 0) { - return null; - } - return new String(mReadBuffer, 0, numRead); - } catch (IOException e) { - Log.w(this, "Exception encountered when reading from InputStreamReader: %s", e); + public String read() throws IOException { + int numRead = mReceiveStream.read(mReadBuffer, 0, READ_BUFFER_SIZE); + if (numRead < 0) { + return null; } - return null; + return new String(mReadBuffer, 0, numRead); } /** @@ -1108,9 +1102,7 @@ public final class Call { * be read. * @return A string containing text entered by the user, or {@code null} if the user has * not entered any new text yet. - * @hide */ - @TestApi public String readImmediately() throws IOException { if (mReceiveStream.ready()) { return read(); diff --git a/telecomm/java/android/telecom/Log.java b/telecomm/java/android/telecom/Log.java index de205380c3a7..3361b5b6e777 100644 --- a/telecomm/java/android/telecom/Log.java +++ b/telecomm/java/android/telecom/Log.java @@ -56,7 +56,7 @@ public class Log { public static boolean ERROR = isLoggable(android.util.Log.ERROR); private static final boolean FORCE_LOGGING = false; /* STOP SHIP if true */ - private static final boolean USER_BUILD = Build.TYPE.equals("user"); + private static final boolean USER_BUILD = Build.IS_USER; // Used to synchronize singleton logging lazy initialization private static final Object sSingletonSync = new Object(); |
