File tree 2 files changed +6
-6
lines changed
app/src/main/java/com/espressif/esptouch/android/v2
esptouch-v2/src/main/java/com/espressif/iot/esptouch2/provision 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -193,16 +193,16 @@ private void check() {
193
193
}
194
194
195
195
private EspProvisioningRequest genRequest () {
196
- mBinding .aesKeyEdit .setError (null );
197
- mBinding .customDataEdit .setError (null );
196
+ mBinding .aesKeyLayout .setError (null );
197
+ mBinding .customDataLayout .setError (null );
198
198
199
199
CharSequence aesKeyChars = mBinding .aesKeyEdit .getText ();
200
200
byte [] aesKey = null ;
201
201
if (aesKeyChars != null && aesKeyChars .length () > 0 ) {
202
202
aesKey = aesKeyChars .toString ().getBytes ();
203
203
}
204
204
if (aesKey != null && aesKey .length != 16 ) {
205
- mBinding .aesKeyEdit .setError (getString (R .string .esptouch2_aes_key_error ));
205
+ mBinding .aesKeyLayout .setError (getString (R .string .esptouch2_aes_key_error ));
206
206
return null ;
207
207
}
208
208
@@ -223,7 +223,7 @@ private EspProvisioningRequest genRequest() {
223
223
}
224
224
int customDataMaxLen = EspProvisioningRequest .RESERVED_LENGTH_MAX ;
225
225
if (customData != null && customData .length > customDataMaxLen ) {
226
- mBinding .customDataEdit .setError (getString (R .string .esptouch2_custom_data_error , customDataMaxLen ));
226
+ mBinding .customDataLayout .setError (getString (R .string .esptouch2_custom_data_error , customDataMaxLen ));
227
227
return null ;
228
228
}
229
229
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class EspProvisioningParams {
24
24
25
25
private final List <byte []> mDataPacketList ;
26
26
27
- private int mAppPortMark ;
27
+ private final int mAppPortMark ;
28
28
private byte [] mPassword ;
29
29
private byte [] mSsid ;
30
30
private byte [] mReservedData ;
@@ -78,7 +78,7 @@ private void parse(EspProvisioningRequest request) {
78
78
79
79
mWillEncrypt = request .aesKey != null && (mPassword .length > 0 || mReservedData .length > 0 );
80
80
mAesKey = mWillEncrypt ? request .aesKey : EMPTY_DATA ;
81
- mSecurityVer = request .securityVer ;
81
+ mSecurityVer = request .securityVer & 0b11 ;
82
82
83
83
mPasswordEncode = checkCharEncode (mPassword );
84
84
mReservedEncode = checkCharEncode (mReservedData );
You can’t perform that action at this time.
0 commit comments