From e0f24e6f5e922e84d81510cea8833fa23157efb8 Mon Sep 17 00:00:00 2001 From: lindatseng Date: Wed, 27 Mar 2019 16:25:12 -0700 Subject: [PATCH] Make the text appearance consistant in add vpn dialog Set the password fields text appearance programatically to get the appearance consistant. The style set in xml will be overriden if the field is set to password. I set the text appearance programmatically in order to keep the appearance consistent with the others. The color of the text become gray after setting the text appearance for some reason. Note that I also do changes to the password field which is not mentioned in the bug. Test: visual inspection. Bug: 127728228 Change-Id: Ie206f60877eb39addc1370ae4e2aee379597960e --- src/com/android/settings/vpn2/ConfigDialog.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/android/settings/vpn2/ConfigDialog.java b/src/com/android/settings/vpn2/ConfigDialog.java index 07e957d6123..9f2176c4f02 100644 --- a/src/com/android/settings/vpn2/ConfigDialog.java +++ b/src/com/android/settings/vpn2/ConfigDialog.java @@ -143,6 +143,7 @@ class ConfigDialog extends AlertDialog implements TextWatcher, } mMppe.setChecked(mProfile.mppe); mL2tpSecret.setText(mProfile.l2tpSecret); + mL2tpSecret.setTextAppearance(android.R.style.TextAppearance_DeviceDefault_Medium); mIpsecIdentifier.setText(mProfile.ipsecIdentifier); mIpsecSecret.setText(mProfile.ipsecSecret); loadCertificates(mIpsecUserCert, Credentials.USER_PRIVATE_KEY, 0, mProfile.ipsecUserCert); @@ -152,6 +153,7 @@ class ConfigDialog extends AlertDialog implements TextWatcher, R.string.vpn_no_server_cert, mProfile.ipsecServerCert); mSaveLogin.setChecked(mProfile.saveLogin); mAlwaysOnVpn.setChecked(mProfile.key.equals(VpnUtils.getLockdownVpn())); + mPassword.setTextAppearance(android.R.style.TextAppearance_DeviceDefault_Medium); // Hide lockdown VPN on devices that require IMS authentication if (SystemProperties.getBoolean("persist.radio.imsregrequired", false)) {