// Path: src/com/xiaomi/alertsystem/data/Sms.java
// public class Sms implements Parcelable {
// 	public long mId;
// 
// 	public String mAddress;
// 
// 	public String mPerson;
// 
// 	public String mBody;
// 
// 	public long mTimeStamp;
// 
// 	public String mType;
// 
// 	public int mStatus; // 0，未读，1，一读
// 
// 	public Sms(final long id, final String address, final String person,
// 			final String body, final long date, final String type,
// 			final int status) {
// 		mId = id;
// 		mAddress = address;
// 		mPerson = person;
// 		mBody = body;
// 		mTimeStamp = date;
// 		mType = type;
// 		mStatus = status;
// 	}
// 
// 	public Sms(Parcel in) {
// 		mId = in.readLong();
// 		mAddress = in.readString();
// 		mPerson = in.readString();
// 		mBody = in.readString();
// 		mTimeStamp = in.readLong();
// 		mType = in.readString();
// 		mStatus = in.readInt();
// 	}
// 
// 	public Sms() {
// 
// 	}
// 
// 	@Override
// 	public int describeContents() {
// 		return 0;
// 	}
// 
// 	public final static Parcelable.Creator<Sms> CREATOR = new Creator<Sms>() {
// 
// 		@Override
// 		public Sms[] newArray(int size) {
// 			return new Sms[size];
// 		}
// 
// 		@Override
// 		public Sms createFromParcel(Parcel source) {
// 			return new Sms(source);
// 		}
// 	};
// 
// 	@Override
// 	public void writeToParcel(Parcel dest, int flags) {
// 		dest.writeLong(mId);
// 		dest.writeString(mAddress);
// 		dest.writeString(mPerson);
// 		dest.writeString(mBody);
// 		dest.writeLong(mTimeStamp);
// 		dest.writeString(mType);
// 		dest.writeInt(mStatus);
// 	}
// 
// }


import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import com.xiaomi.alertsystem.data.Sms;
import java.util.ArrayList;
import java.util.List;
        public final static String id = "_id";
        public final static String address = "address";
        public final static String person = "person";
        public final static String body = "body";
        public final static String date = "date";
        public final static String type = "type";
    }

    public final static String[] sProjection = new String[]{SmsColoumn.id,
            SmsColoumn.address, SmsColoumn.person, SmsColoumn.body,
            SmsColoumn.date, SmsColoumn.type};

    public static List<Sms> querySms(final Context context, final Uri uri,
                                     final String[] projection) {
        List<Sms> sms = null;
        if (uri == null) {
            return sms;
        }

        ContentResolver contentResolver = context.getContentResolver();
        try {
            Cursor cursor = contentResolver.query(uri, projection, null, null,
                    "date desc");
            sms = parseResult(cursor);
        } catch (Exception e) {
        }
        return sms;
    }

    public static List<Sms> parseResult(Cursor cur) {
// Path: src/com/xiaomi/alertsystem/data/Sms.java
// public class Sms implements Parcelable {
// 	public long mId;
// 
// 	public String mAddress;
// 
// 	public String mPerson;
// 
// 	public String mBody;
// 
// 	public long mTimeStamp;
// 
// 	public String mType;
// 
// 	public int mStatus; // 0，未读，1，一读
// 
// 	public Sms(final long id, final String address, final String person,
// 			final String body, final long date, final String type,
// 			final int status) {
// 		mId = id;
// 		mAddress = address;
// 		mPerson = person;
// 		mBody = body;
// 		mTimeStamp = date;
// 		mType = type;
// 		mStatus = status;
// 	}
// 
// 	public Sms(Parcel in) {
// 		mId = in.readLong();
// 		mAddress = in.readString();
// 		mPerson = in.readString();
// 		mBody = in.readString();
// 		mTimeStamp = in.readLong();
// 		mType = in.readString();
// 		mStatus = in.readInt();
// 	}
// 
// 	public Sms() {
// 
// 	}
// 
// 	@Override
// 	public int describeContents() {
// 		return 0;
// 	}
// 
// 	public final static Parcelable.Creator<Sms> CREATOR = new Creator<Sms>() {
// 
// 		@Override
// 		public Sms[] newArray(int size) {
// 			return new Sms[size];
// 		}
// 
// 		@Override
// 		public Sms createFromParcel(Parcel source) {
// 			return new Sms(source);
// 		}
// 	};
// 
// 	@Override
// 	public void writeToParcel(Parcel dest, int flags) {
// 		dest.writeLong(mId);
// 		dest.writeString(mAddress);
// 		dest.writeString(mPerson);
// 		dest.writeString(mBody);
// 		dest.writeLong(mTimeStamp);
// 		dest.writeString(mType);
// 		dest.writeInt(mStatus);
// 	}
// 
// }


// Path: src/com/xiaomi/alertsystem/utils/ReadLocalSmsHelper.java
import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import com.xiaomi.alertsystem.data.Sms;
import java.util.ArrayList;
import java.util.List;

        public final static String id = "_id";
        public final static String address = "address";
        public final static String person = "person";
        public final static String body = "body";
        public final static String date = "date";
        public final static String type = "type";
    }

    public final static String[] sProjection = new String[]{SmsColoumn.id,
            SmsColoumn.address, SmsColoumn.person, SmsColoumn.body,
            SmsColoumn.date, SmsColoumn.type};

    public static List<Sms> querySms(final Context context, final Uri uri,
                                     final String[] projection) {
        List<Sms> sms = null;
        if (uri == null) {
            return sms;
        }

        ContentResolver contentResolver = context.getContentResolver();
        try {
            Cursor cursor = contentResolver.query(uri, projection, null, null,
                    "date desc");
            sms = parseResult(cursor);
        } catch (Exception e) {
        }
        return sms;
    }

    public static List<Sms> parseResult(Cursor cur) {
        List<Sms> sms = new ArrayList<Sms>();