// 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;
package com.xiaomi.alertsystem.utils;




public class ReadLocalSmsHelper {
    public final static String SMS_URI_ALL = "content://sms/";
    public final static String SMS_URI_INBOX = "content://sms/inbox";
    public final static String SMS_URI_SEND = "content://sms/sent";
    public final static String SMS_URI_DRAFT = "content://sms/draft";
    public final static String SMS_URI_OUTBOX = "content://sms/outbox";
    public final static String SMS_URI_FAILED = "content://sms/failed";
    public final static String SMS_URI_QUEUED = "content://sms/queued";

    public static class SmsColoumn {
        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};

// 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;

package com.xiaomi.alertsystem.utils;




public class ReadLocalSmsHelper {
    public final static String SMS_URI_ALL = "content://sms/";
    public final static String SMS_URI_INBOX = "content://sms/inbox";
    public final static String SMS_URI_SEND = "content://sms/sent";
    public final static String SMS_URI_DRAFT = "content://sms/draft";
    public final static String SMS_URI_OUTBOX = "content://sms/outbox";
    public final static String SMS_URI_FAILED = "content://sms/failed";
    public final static String SMS_URI_QUEUED = "content://sms/queued";

    public static class SmsColoumn {
        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,