package org.xdty.phone.number.model.marked;

import android.text.TextUtils;

import org.xdty.phone.number.model.INumber;
import org.xdty.phone.number.model.Type;

public class MarkedNumber implements INumber {

    private static String[] MARKED_NAMES =
            {"骚扰电话", "诈骗", "推销", "广告推销", "房产中介", "快递送餐", "诈骗电话", "外卖", "中介", "快递"};
    private String mNumber = null;
    private String mName = null;

    public MarkedNumber(String number, int type) {
        mNumber = number;
        mName = MARKED_NAMES[type - 1];
    }

    @Override
    public String getName() {
        return mName;
    }

    @Override
    public String getProvince() {
        return null;
    }

    @Override
    public Type getType() {
        return null;
    }

    @Override
    public String getCity() {
        return null;
    }

    @Override
    public String getNumber() {
        return mNumber;
    }

    @Override
    public String getProvider() {
        return null;
    }

    @Override
    public int getCount() {
        return 0;
    }

    @Override
    public boolean isValid() {
        return !TextUtils.isEmpty(mNumber) && !TextUtils.isEmpty(mName);
    }

    @Override
    public boolean isOnline() {
        return false;
    }

    @Override
    public int getApiId() {
        return INumber.API_ID_MARKED;
    }
}

@@ -398,16 +398,45 @@
  = null;
+%0A    private int mMarkedType;
 %0A%0A    pu
@@ -546,16 +546,44 @@
 e - 1%5D;%0A
+        mMarkedType = type;%0A
     %7D%0A%0A 
@@ -776,36 +776,176 @@
 ) %7B%0A        
-return null;
+if (mMarkedType == 6 %7C%7C mMarkedType == 8 %7C%7C mMarkedType == 10) %7B%0A            return Type.POI;%0A        %7D else %7B%0A            return Type.REPORT;%0A        %7D
 %0A    %7D%0A%0A    

fix marked type