summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Stewart <pstew@google.com>2015-11-11 10:23:43 -0800
committergitbuildkicker <android-build@google.com>2016-07-21 17:34:48 -0700
commit55271d454881b67ff38485fdd97598c542cc2d55 (patch)
tree1ad23b2daa7530e3920c73bb7a5723224188de08
parent4e4743a354e26467318b437892a9980eb9b8328a (diff)
downloadframeworks_base-55271d454881b67ff38485fdd97598c542cc2d55.zip
frameworks_base-55271d454881b67ff38485fdd97598c542cc2d55.tar.gz
frameworks_base-55271d454881b67ff38485fdd97598c542cc2d55.tar.bz2
WifiEnterpriseConfiguration: Do not print credentials in toString
BUG:25624963 Change-Id: I939a12a27d6b915d8a9cc8b142f645fba0ee42ec
-rw-r--r--wifi/java/android/net/wifi/WifiEnterpriseConfig.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
index 59b22bd..16035ad 100644
--- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
+++ b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
@@ -768,7 +768,9 @@ public class WifiEnterpriseConfig implements Parcelable {
public String toString() {
StringBuffer sb = new StringBuffer();
for (String key : mFields.keySet()) {
- sb.append(key).append(" ").append(mFields.get(key)).append("\n");
+ // Don't display password in toString().
+ String value = (key == PASSWORD_KEY) ? "<removed>" : mFields.get(key);
+ sb.append(key).append(" ").append(value).append("\n");
}
return sb.toString();
}