Logging carrier restriction status information in case of debug binary
Flag: EXEMPT bugfix
Bug: 359450368
Test: Verified manually
Change-Id: Ic50315c18951964b69a0a0dad95df83b4cb4abdb
diff --git a/telephony/java/android/telephony/CarrierRestrictionRules.java b/telephony/java/android/telephony/CarrierRestrictionRules.java
index 65e8e13..ddf5ef2 100644
--- a/telephony/java/android/telephony/CarrierRestrictionRules.java
+++ b/telephony/java/android/telephony/CarrierRestrictionRules.java
@@ -463,8 +463,9 @@
public String toString() {
return "CarrierRestrictionRules(allowed:" + mAllowedCarriers + ", excluded:"
+ mExcludedCarriers + ", default:" + mCarrierRestrictionDefault
- + ", MultiSim policy:" + mMultiSimPolicy + getCarrierInfoList() +
- " mIsCarrierLockInfoSupported = " + mUseCarrierLockInfo + ")";
+ + ", MultiSim policy:" + mMultiSimPolicy + getCarrierInfoList()
+ + ", mIsCarrierLockInfoSupported = " + mUseCarrierLockInfo
+ + getCarrierRestrictionStatusToLog() + ")";
}
private String getCarrierInfoList() {
@@ -476,6 +477,13 @@
}
}
+ private String getCarrierRestrictionStatusToLog() {
+ if(android.os.Build.isDebuggable()) {
+ return ", CarrierRestrictionStatus = " + mCarrierRestrictionStatus;
+ }
+ return "";
+ }
+
/**
* Builder for a {@link CarrierRestrictionRules}.
*/