summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHai Shalom <haishalom@google.com>2020-03-16 12:30:55 -0700
committerHai Shalom <haishalom@google.com>2020-03-16 12:30:55 -0700
commit9a471250cede3b2186a6232e7f228b65d276479e (patch)
treeb76deacd5d44efdedcb0c2632246e1566e329c11
parentb809d33d5c375556ba5903c4b052f2603e95aaad (diff)
[WiFi] Hide IMSI in ClientModeImpl logs
Hide IMSI in ClientModeImpl logs. Bug: 151627844 Test: Verify logs: SUP_REQUEST_IDENTITY: identityPair=[0310410****, <NONE>] Change-Id: Idc2a1f63ef3a0d70b4c5836495924124b06e013d
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index 004437d2e..3580795bc 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -3894,7 +3894,12 @@ public class ClientModeImpl extends StateMachine {
// Pair<identity, encrypted identity>
Pair<String, String> identityPair = mTelephonyUtil
.getSimIdentity(mTargetWifiConfiguration);
- Log.i(TAG, "SUP_REQUEST_IDENTITY: identityPair=" + identityPair);
+ Log.i(TAG, "SUP_REQUEST_IDENTITY: identityPair=["
+ + ((identityPair.first.length() >= 7)
+ ? identityPair.first.substring(0, 7 /* Prefix+PLMN ID */) + "****"
+ : identityPair.first) + ", "
+ + (!TextUtils.isEmpty(identityPair.second) ? identityPair.second
+ : "<NONE>") + "]");
if (identityPair != null && identityPair.first != null) {
mWifiNative.simIdentityResponse(mInterfaceName, identityPair.first,
identityPair.second);