summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nazanin <nazaninb@google.com> 2020-08-11 15:42:54 -0700
committer Nazanin <nazaninb@google.com> 2020-08-11 15:53:32 -0700
commitdf80878c8e3976dc198bdd21efc05ce09b9fe24b (patch)
treefe3faa4be13e55558c588275c4f4707de7791b3a
parent6fd5ba3a44d738f952de95b16180c7d3eb6e0fe7 (diff)
add logs to investigate flakey test
Test: atest Bug: b/162266130 Change-Id: I55fe46821489747088d821a0e2b2f78fd28e01c0
-rw-r--r--telephony/java/android/telephony/SmsManager.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java
index 2b2608724e12..78dc377a303c 100644
--- a/telephony/java/android/telephony/SmsManager.java
+++ b/telephony/java/android/telephony/SmsManager.java
@@ -46,6 +46,7 @@ import com.android.internal.telephony.IIntegerConsumer;
import com.android.internal.telephony.ISms;
import com.android.internal.telephony.ITelephony;
import com.android.internal.telephony.SmsRawData;
+import com.android.telephony.Rlog;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -1953,7 +1954,6 @@ public final class SmsManager {
public boolean enableCellBroadcastRange(int startMessageId, int endMessageId,
@android.telephony.SmsCbMessage.MessageFormat int ranType) {
boolean success = false;
-
if (endMessageId < startMessageId) {
throw new IllegalArgumentException("endMessageId < startMessageId");
}
@@ -1962,10 +1962,14 @@ public final class SmsManager {
if (iSms != null) {
// If getSubscriptionId() returns INVALID or an inactive subscription, we will use
// the default phone internally.
- success = iSms.enableCellBroadcastRangeForSubscriber(getSubscriptionId(),
+ int subId = getSubscriptionId();
+ success = iSms.enableCellBroadcastRangeForSubscriber(subId,
startMessageId, endMessageId, ranType);
+ Rlog.d(TAG, "enableCellBroadcastRange: " + (success ? "succeeded" : "failed")
+ + " at calling enableCellBroadcastRangeForSubscriber. subId = " + subId);
}
} catch (RemoteException ex) {
+ Rlog.d(TAG, "enableCellBroadcastRange: " + ex.getStackTrace());
// ignore it
}
@@ -2019,10 +2023,14 @@ public final class SmsManager {
if (iSms != null) {
// If getSubscriptionId() returns INVALID or an inactive subscription, we will use
// the default phone internally.
- success = iSms.disableCellBroadcastRangeForSubscriber(getSubscriptionId(),
+ int subId = getSubscriptionId();
+ success = iSms.disableCellBroadcastRangeForSubscriber(subId,
startMessageId, endMessageId, ranType);
+ Rlog.d(TAG, "disableCellBroadcastRange: " + (success ? "succeeded" : "failed")
+ + " at calling disableCellBroadcastRangeForSubscriber. subId = " + subId);
}
} catch (RemoteException ex) {
+ Rlog.d(TAG, "disableCellBroadcastRange: " + ex.getStackTrace());
// ignore it
}