From 10fc628397b54d6aba31489a2a3f63dbad7ee6d5 Mon Sep 17 00:00:00 2001 From: Nathan Harold Date: Tue, 25 Jan 2022 12:51:11 -0800 Subject: [PATCH] Expose Constructor for ModemActivityInfoException ModemActivityInfoException is a SystemApi but the constructor is not. There's a longstanding need to expose it for testing. Bug: 186152174 Test: make update-api && make offline-sdk-docs Change-Id: I609b4a893e2f4fad54d29e09234da08a45efac78 --- core/api/system-current.txt | 1 + telephony/java/android/telephony/TelephonyManager.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 8fd027182c3f0..8c56d79476c67 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -12312,6 +12312,7 @@ package android.telephony { } public static class TelephonyManager.ModemActivityInfoException extends java.lang.Exception { + ctor public TelephonyManager.ModemActivityInfoException(int); method public int getErrorCode(); field public static final int ERROR_INVALID_INFO_RECEIVED = 2; // 0x2 field public static final int ERROR_MODEM_RESPONSE_ERROR = 3; // 0x3 diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 9ac9d66b39658..aab6daa202795 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -11487,7 +11487,11 @@ public class TelephonyManager { private final int mErrorCode; - /** @hide */ + /** + * An exception with ModemActivityInfo specific error codes. + * + * @param errorCode a ModemActivityInfoError code. + */ public ModemActivityInfoException(@ModemActivityInfoError int errorCode) { mErrorCode = errorCode; }