summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorJonathan Basseri <misterikkit@google.com>2015-05-05 12:00:59 -0700
committerJonathan Basseri <misterikkit@google.com>2015-05-13 14:58:28 -0700
commitb731c3d944ccf46b7d0115f63b63eee5ab8abf1a (patch)
tree718b377e99425122116664454ee09dff07a93717 /telephony
parent782509076bf4ca155865c465985a458e83d9b577 (diff)
downloadframeworks_base-b731c3d944ccf46b7d0115f63b63eee5ab8abf1a.zip
frameworks_base-b731c3d944ccf46b7d0115f63b63eee5ab8abf1a.tar.gz
frameworks_base-b731c3d944ccf46b7d0115f63b63eee5ab8abf1a.tar.bz2
Add null annotations for getting carrier config.
CarrierConfigManager can return null Bundles for carrier config, but never returns null when getting default values. Add the appropriate annotations. Change-Id: Iffbed3b54ca7cc28cf8b04f133aacdf9e6e4fd20
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/CarrierConfigManager.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 2caa83c..4941df6 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -18,6 +18,8 @@ package android.telephony;
import com.android.internal.telephony.ICarrierConfigLoader;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.content.Context;
import android.os.PersistableBundle;
@@ -279,6 +281,7 @@ public class CarrierConfigManager {
* @return A {@link PersistableBundle} containing the config for the given subId, or default
* values for an invalid subId.
*/
+ @Nullable
public PersistableBundle getConfigForSubId(int subId) {
try {
return getICarrierConfigLoader().getConfigForSubId(subId);
@@ -297,6 +300,7 @@ public class CarrierConfigManager {
*
* @see #getConfigForSubId
*/
+ @Nullable
public PersistableBundle getConfig() {
return getConfigForSubId(SubscriptionManager.getDefaultSubId());
}
@@ -348,6 +352,7 @@ public class CarrierConfigManager {
*
* @hide
*/
+ @NonNull
@SystemApi
public static PersistableBundle getDefaultConfig() {
return new PersistableBundle(sDefaults);