summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jack Yu <jackyu@google.com> 2022-05-25 15:46:25 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-05-25 15:46:25 +0000
commite55b0a1f178f295bba783f1acaa815b9601f47b8 (patch)
tree0ff9b583515b2764b33a60ba81ed955efcd98e14
parentc003cb87851950d8aa5934e56fb53aa120390bbf (diff)
parentd11b29cfe0a0f2210b1ce228cfd8f5628dced8f5 (diff)
Merge "Traffic descriptor only data profile should be enabled" into tm-dev
-rw-r--r--telephony/java/android/telephony/data/DataProfile.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/telephony/java/android/telephony/data/DataProfile.java b/telephony/java/android/telephony/data/DataProfile.java
index fa1bae41f433..5e111639b100 100644
--- a/telephony/java/android/telephony/data/DataProfile.java
+++ b/telephony/java/android/telephony/data/DataProfile.java
@@ -232,13 +232,14 @@ public final class DataProfile implements Parcelable {
}
/**
- * @return True if the profile is enabled.
+ * @return {@code true} if the profile is enabled. If the profile only has a
+ * {@link TrafficDescriptor}, but no {@link ApnSetting}, then this profile is always enabled.
*/
public boolean isEnabled() {
if (mApnSetting != null) {
return mApnSetting.isEnabled();
}
- return false;
+ return true;
}
/**
@@ -534,7 +535,7 @@ public final class DataProfile implements Parcelable {
@Type
private int mType = -1;
- private boolean mEnabled;
+ private boolean mEnabled = true;
@ApnType
private int mSupportedApnTypesBitmask;