wxr
2022-11-24 2af932533ef851bf983385244e9912976dbd4daa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.mm.android.deviceaddmodule.presenter;
 
import android.text.TextUtils;
 
import com.mm.android.deviceaddmodule.contract.ManualInputConstract;
import com.mm.android.deviceaddmodule.mobilecommon.AppConsume.ScanResult;
import com.mm.android.deviceaddmodule.mobilecommon.entity.deviceadd.DeviceAddInfo;
import com.mm.android.deviceaddmodule.model.DeviceAddModel;
 
public class ManualInputPresenter extends ScanPresenter {
    public ManualInputPresenter(ManualInputConstract.View view){
        super(view);
        DeviceAddInfo deviceAddInfo = DeviceAddModel.newInstance().getDeviceInfoCache();
        deviceAddInfo.setManualInput(true);
    }
 
    @Override
    public ScanResult parseScanStr(String scanStr, String sc) {
        return super.parseScanStr(scanStr, sc);
    }
 
    @Override
    public boolean isManualInputPage() {
        return true;
    }
 
    @Override
    public boolean isSnInValid(String sn) {
        if(TextUtils.isEmpty(sn)){
            return true;
        }else{
                if(sn.length()<10){
                    return true;
                }
        }
        return false;
    }
 
    @Override
    public boolean isScCodeInValid(String scCode) {
        return false;
    }
}