Set AuthType to NONE if username of APN is not set
When APN is edited, if authType and username are both not set, authType should be set to NONE before setup of data call. The code today checks mApn.user for NULL, but if user has edited APN the mApn.user field will be set to an empty string. Change the check of mApn.user to also take care of this case. Change-Id: I0e49247d46e1ba93da6dd951bbb75acc63fac73f
This commit is contained in:
committed by
Robert Greenwalt
parent
70c8723e63
commit
53eb13ce0a
@@ -91,8 +91,8 @@ public class GsmDataConnection extends DataConnection {
|
||||
|
||||
int authType = mApn.authType;
|
||||
if (authType == -1) {
|
||||
authType = (mApn.user != null) ? RILConstants.SETUP_DATA_AUTH_PAP_CHAP :
|
||||
RILConstants.SETUP_DATA_AUTH_NONE;
|
||||
authType = TextUtils.isEmpty(mApn.user) ? RILConstants.SETUP_DATA_AUTH_NONE
|
||||
: RILConstants.SETUP_DATA_AUTH_PAP_CHAP;
|
||||
}
|
||||
|
||||
String protocol;
|
||||
|
||||
Reference in New Issue
Block a user