diff options
| author | 2020-10-23 19:54:57 +0000 | |
|---|---|---|
| committer | 2020-10-23 19:54:57 +0000 | |
| commit | 037195448a0c812cb84d87ddc03ef17e23fb17cf (patch) | |
| tree | 65e8b0915d3ee49f7ec772eedb9592825e159202 | |
| parent | 2cbc12ba3ef672020cf6e4c8c5488a6f4cf06c6d (diff) | |
| parent | ae9309bc05ec7a123cbbfaf9c687113213533838 (diff) | |
Merge "Expose methods to enumerate constants" am: ae9309bc05
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1470085
Change-Id: I94962c9e84cf186d9b5af95522a9140b6410341f
| -rw-r--r-- | api/module-lib-current.txt | 12 | ||||
| -rw-r--r-- | non-updatable-api/module-lib-current.txt | 12 | ||||
| -rw-r--r-- | telephony/java/android/telephony/CellSignalStrength.java | 6 | ||||
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 6 |
4 files changed, 32 insertions, 4 deletions
diff --git a/api/module-lib-current.txt b/api/module-lib-current.txt index 2f0ae78f7e2d..3b32b535f0bc 100644 --- a/api/module-lib-current.txt +++ b/api/module-lib-current.txt @@ -71,6 +71,18 @@ package android.os { } +package android.telephony { + + public abstract class CellSignalStrength { + method public static int getNumSignalStrengthLevels(); + } + + public class TelephonyManager { + method @NonNull public static int[] getAllNetworkTypes(); + } + +} + package android.util { public final class Log { diff --git a/non-updatable-api/module-lib-current.txt b/non-updatable-api/module-lib-current.txt index d4d9f62964c8..198134edbb5b 100644 --- a/non-updatable-api/module-lib-current.txt +++ b/non-updatable-api/module-lib-current.txt @@ -26,6 +26,18 @@ package android.os { } +package android.telephony { + + public abstract class CellSignalStrength { + method public static int getNumSignalStrengthLevels(); + } + + public class TelephonyManager { + method @NonNull public static int[] getAllNetworkTypes(); + } + +} + package android.util { public final class Log { diff --git a/telephony/java/android/telephony/CellSignalStrength.java b/telephony/java/android/telephony/CellSignalStrength.java index 2e7bde3b3d89..e0896570d3ed 100644 --- a/telephony/java/android/telephony/CellSignalStrength.java +++ b/telephony/java/android/telephony/CellSignalStrength.java @@ -17,6 +17,7 @@ package android.telephony; import android.annotation.IntRange; +import android.annotation.SystemApi; import android.os.PersistableBundle; /** @@ -155,11 +156,12 @@ public abstract class CellSignalStrength { /** * Returns the number of signal strength levels. - * @return Number of signal strength levels, enforced to be 5 + * @return Number of signal strength levels, currently defined in the HAL as 5. * * @hide */ - public static final int getNumSignalStrengthLevels() { + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) + public static int getNumSignalStrengthLevels() { return NUM_SIGNAL_STRENGTH_BINS; } } diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 072527beeff9..04a06f58d1c8 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -2829,11 +2829,13 @@ public class TelephonyManager { }; /** - * Return a collection of all network types - * @return network types + * Returns an array of all valid network types. + * + * @return An integer array containing all valid network types in no particular order. * * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static @NonNull @NetworkType int[] getAllNetworkTypes() { return NETWORK_TYPES; } |