summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiwon Park <kiwonp@google.com>2022-10-04 20:22:42 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-10-04 20:22:42 +0000
commit7a5fdd717cbcbef3c64295b9c59f2179f7fce61c (patch)
treeed978f5613c6586029a0cbb293a9c5c93a78b73c
parent670153546cc318aed8f8e00f004460b9451ca82b (diff)
parenta22a5bd1b8f4a999ba170d2e116fd6f0fef9f1e8 (diff)
downloadImsServiceEntitlement-7a5fdd717cbcbef3c64295b9c59f2179f7fce61c.tar.gz
Add ability to bypass EAP-AKA authentication. am: df256106df am: a22a5bd1b8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/ImsServiceEntitlement/+/2239965 Change-Id: Iadb9b8cc48424d5e1b36d8684cd4b1536b849ba9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--src/com/android/imsserviceentitlement/ImsEntitlementApi.java9
-rw-r--r--src/com/android/imsserviceentitlement/debug/DebugUtils.java10
2 files changed, 18 insertions, 1 deletions
diff --git a/src/com/android/imsserviceentitlement/ImsEntitlementApi.java b/src/com/android/imsserviceentitlement/ImsEntitlementApi.java
index 74943ac..d6ccd65 100644
--- a/src/com/android/imsserviceentitlement/ImsEntitlementApi.java
+++ b/src/com/android/imsserviceentitlement/ImsEntitlementApi.java
@@ -26,6 +26,7 @@ import android.util.Log;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
+import com.android.imsserviceentitlement.debug.DebugUtils;
import com.android.imsserviceentitlement.entitlement.EntitlementConfiguration;
import com.android.imsserviceentitlement.entitlement.EntitlementConfiguration.ClientBehavior;
import com.android.imsserviceentitlement.entitlement.EntitlementResult;
@@ -75,7 +76,13 @@ public class ImsEntitlementApi {
this.mSubId = subId;
CarrierConfig carrierConfig = getCarrierConfig(context);
this.mNeedsImsProvisioning = TelephonyUtils.isImsProvisioningRequired(context, subId);
- this.mServiceEntitlement = new ServiceEntitlement(context, carrierConfig, subId);
+ this.mServiceEntitlement =
+ new ServiceEntitlement(
+ context,
+ carrierConfig,
+ subId,
+ /* saveHttpHistory = */ false,
+ DebugUtils.getBypassEapAkaResponse());
this.mLastEntitlementConfiguration = new EntitlementConfiguration(context, subId);
}
diff --git a/src/com/android/imsserviceentitlement/debug/DebugUtils.java b/src/com/android/imsserviceentitlement/debug/DebugUtils.java
index 8936948..ddd71d6 100644
--- a/src/com/android/imsserviceentitlement/debug/DebugUtils.java
+++ b/src/com/android/imsserviceentitlement/debug/DebugUtils.java
@@ -25,6 +25,7 @@ import java.util.Optional;
/** Provides API for debugging and not allow to debug on user build. */
public final class DebugUtils {
private static final String PROP_PII_LOGGABLE = "dbg.imsse.pii_loggable";
+ private static final String PROP_BYPASS_EAP_AKA_RESPONSE = "dbg.imsse.bypass_eap_aka_response";
private static final String PROP_SERVER_URL_OVERRIDE = "persist.dbg.imsse.server_url";
private static final String BUILD_TYPE_USER = "user";
@@ -48,6 +49,15 @@ public final class DebugUtils {
return SystemProperties.getBoolean(PROP_PII_LOGGABLE, false);
}
+ /** Returns a non empty string if bypass EAP-AKA authentication is enabled. */
+ public static String getBypassEapAkaResponse() {
+ if (!isDebugBuild()) {
+ return "";
+ }
+
+ return SystemProperties.get(PROP_BYPASS_EAP_AKA_RESPONSE);
+ }
+
/**
* Returns {@link Optional} if testing server url was set in system property.
*/