Commit 82acf866 authored by Shri Borde's avatar Shri Borde Committed by Android Git Automerger
Browse files

am a58acf30: Use INVALID_SUB_ID as default value for sub_id columns

* commit 'a58acf30':
  Use INVALID_SUB_ID as default value for sub_id columns
parents db88fac6 a58acf30
......@@ -42,6 +42,7 @@ import android.provider.Telephony.Mms.Addr;
import android.provider.Telephony.Mms.Part;
import android.provider.Telephony.Mms.Rate;
import android.provider.Telephony.MmsSms.PendingMessages;
import android.telephony.SubscriptionManager;
import android.util.Log;
import com.google.android.mms.pdu.EncodedStringValue;
......@@ -592,7 +593,7 @@ public class MmsSmsDatabaseHelper extends SQLiteOpenHelper {
Mms.DELIVERY_TIME + " INTEGER," +
Mms.DELIVERY_REPORT + " INTEGER," +
Mms.LOCKED + " INTEGER DEFAULT 0," +
Mms.SUB_ID + " INTEGER DEFAULT -1, " +
Mms.SUB_ID + " INTEGER DEFAULT " + SubscriptionManager.INVALID_SUB_ID + ", " +
Mms.SEEN + " INTEGER DEFAULT 0," +
Mms.CREATOR + " TEXT," +
Mms.TEXT_ONLY + " INTEGER DEFAULT 0" +
......@@ -837,7 +838,7 @@ public class MmsSmsDatabaseHelper extends SQLiteOpenHelper {
"body TEXT," +
"service_center TEXT," +
"locked INTEGER DEFAULT 0," +
"sub_id INTEGER DEFAULT -1, " +
"sub_id INTEGER DEFAULT " + SubscriptionManager.INVALID_SUB_ID + ", " +
"error_code INTEGER DEFAULT 0," +
"creator TEXT," +
"seen INTEGER DEFAULT 0" +
......@@ -855,7 +856,7 @@ public class MmsSmsDatabaseHelper extends SQLiteOpenHelper {
"sequence INTEGER," + // the part number of this message
"destination_port INTEGER," +
"address TEXT," +
"sub_id INTEGER DEFAULT -1, " +
"sub_id INTEGER DEFAULT " + SubscriptionManager.INVALID_SUB_ID + ", " +
"pdu TEXT);"); // the raw PDU for this part
db.execSQL("CREATE TABLE attachments (" +
......@@ -923,7 +924,8 @@ public class MmsSmsDatabaseHelper extends SQLiteOpenHelper {
PendingMessages.ERROR_CODE + " INTEGER," +
PendingMessages.RETRY_INDEX + " INTEGER NOT NULL DEFAULT 0," +
PendingMessages.DUE_TIME + " INTEGER," +
PendingMessages.SUB_ID + " INTEGER DEFAULT 0, " +
PendingMessages.SUB_ID + " INTEGER DEFAULT " +
SubscriptionManager.INVALID_SUB_ID + ", " +
PendingMessages.LAST_TRY + " INTEGER);");
}
......@@ -1531,13 +1533,13 @@ public class MmsSmsDatabaseHelper extends SQLiteOpenHelper {
private void upgradeDatabaseToVersion58(SQLiteDatabase db) {
db.execSQL("ALTER TABLE " + MmsProvider.TABLE_PDU +" ADD COLUMN "
+ Mms.SUB_ID + " INTEGER DEFAULT -1");
+ Mms.SUB_ID + " INTEGER DEFAULT " + SubscriptionManager.INVALID_SUB_ID);
db.execSQL("ALTER TABLE " + MmsSmsProvider.TABLE_PENDING_MSG +" ADD COLUMN "
+ "pending_sub_id" + " INTEGER DEFAULT 0");
+ "pending_sub_id" + " INTEGER DEFAULT " + SubscriptionManager.INVALID_SUB_ID);
db.execSQL("ALTER TABLE " + SmsProvider.TABLE_SMS +" ADD COLUMN "
+ Sms.SUB_ID + " INTEGER DEFAULT -1");
+ Sms.SUB_ID + " INTEGER DEFAULT " + SubscriptionManager.INVALID_SUB_ID);
db.execSQL("ALTER TABLE " + SmsProvider.TABLE_RAW +" ADD COLUMN "
+ Sms.SUB_ID + " INTEGER DEFAULT -1");
+ Sms.SUB_ID + " INTEGER DEFAULT " + SubscriptionManager.INVALID_SUB_ID);
}
private void upgradeDatabaseToVersion59(SQLiteDatabase db) {
......@@ -1829,7 +1831,7 @@ public class MmsSmsDatabaseHelper extends SQLiteOpenHelper {
Mms.DELIVERY_TIME + " INTEGER," +
Mms.DELIVERY_REPORT + " INTEGER," +
Mms.LOCKED + " INTEGER DEFAULT 0," +
Mms.SUB_ID + " INTEGER DEFAULT -1," +
Mms.SUB_ID + " INTEGER DEFAULT " + SubscriptionManager.INVALID_SUB_ID + ", " +
Mms.SEEN + " INTEGER DEFAULT 0," +
Mms.TEXT_ONLY + " INTEGER DEFAULT 0" +
");");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment