diff --git a/src/com/android/providers/telephony/DeviceEncryptedMmsSmsDatabaseHelper.java b/src/com/android/providers/telephony/DeviceEncryptedMmsSmsDatabaseHelper.java
deleted file mode 100644
index 04a7abb..0000000
--- a/src/com/android/providers/telephony/DeviceEncryptedMmsSmsDatabaseHelper.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.providers.telephony;
-
-import android.content.Context;
-import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteOpenHelper;
-import android.telephony.SubscriptionManager;
-import android.util.Log;
-
-/**
- * Database open helper responsible for Mms/Sms tables in the Device-Encrypted storage.
- */
-public class DeviceEncryptedMmsSmsDatabaseHelper extends SQLiteOpenHelper {
-  private static final String TAG = "MmsSmsDeDatabaseHelper";
-
-    private static DeviceEncryptedMmsSmsDatabaseHelper sInstance = null;
-
-
-    private DeviceEncryptedMmsSmsDatabaseHelper(Context context) {
-      super(
-          context, MmsSmsDatabaseHelper.DATABASE_NAME, null, MmsSmsDatabaseHelper.DATABASE_VERSION);
-    }
-
-    /**
-     * Return a singleton helper for the combined MMS and SMS
-     * database.
-     */
-    /* package */ static synchronized DeviceEncryptedMmsSmsDatabaseHelper getInstance(Context context) {
-        if (sInstance == null) {
-            sInstance = new DeviceEncryptedMmsSmsDatabaseHelper(context);
-        }
-        return sInstance;
-    }
-
-    @Override
-    public void onCreate(SQLiteDatabase db) {
-        createSmsTables(db);
-    }
-
-    private void createSmsTables(SQLiteDatabase db) {
-        /**
-         * This table is used by the SMS dispatcher to hold
-         * incomplete partial messages until all the parts arrive.
-         */
-        db.execSQL("CREATE TABLE raw (" +
-                   "_id INTEGER PRIMARY KEY," +
-                   "date INTEGER," +
-                   "reference_number INTEGER," + // one per full message
-                   "count INTEGER," + // the number of parts
-                   "sequence INTEGER," + // the part number of this message
-                   "destination_port INTEGER," +
-                   "address TEXT," +
-                   "sub_id INTEGER DEFAULT " + SubscriptionManager.INVALID_SUBSCRIPTION_ID + ", " +
-                   "pdu TEXT);"); // the raw PDU for this part
-    }
-
-    @Override
-    public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) {
-        Log.w(TAG, "Upgrading database from version " + oldVersion
-                + " to " + currentVersion + ".");
-        Log.e(TAG, "Destroying all old data.");
-        dropAll(db);
-        onCreate(db);
-    }
-
-    private void dropAll(SQLiteDatabase db) {
-        // Clean the database out in order to start over from scratch.
-        // We don't need to drop our triggers here because SQLite automatically
-        // drops a trigger when its attached database is dropped.
-        db.execSQL("DROP TABLE IF EXISTS raw");
-    }
-
-    @Override
-    public synchronized SQLiteDatabase getWritableDatabase() {
-      return super.getWritableDatabase();
-    }
-}
diff --git a/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java b/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
index 5d668ec..f2d12d3 100644
--- a/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
+++ b/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
@@ -16,9 +16,6 @@
 
 package com.android.providers.telephony;
 
-import com.google.android.mms.pdu.EncodedStringValue;
-import com.google.android.mms.pdu.PduHeaders;
-
 import android.content.BroadcastReceiver;
 import android.content.ContentValues;
 import android.content.Context;
@@ -40,6 +37,9 @@
 import android.telephony.SubscriptionManager;
 import android.util.Log;
 
+import com.google.android.mms.pdu.EncodedStringValue;
+import com.google.android.mms.pdu.PduHeaders;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -48,9 +48,6 @@
 import java.util.HashSet;
 import java.util.Iterator;
 
-/**
- * Database open helper responsible for tables in the Credentials-Encrypted storage.
- */
 public class MmsSmsDatabaseHelper extends SQLiteOpenHelper {
     private static final String TAG = "MmsSmsDatabaseHelper";
 
@@ -235,7 +232,6 @@
      * database.
      */
     /* package */ static synchronized MmsSmsDatabaseHelper getInstance(Context context) {
-        context = ProviderUtil.getCredentialEncryptedContext(context);
         if (sInstance == null) {
             sInstance = new MmsSmsDatabaseHelper(context);
         }
@@ -858,6 +854,21 @@
                    "seen INTEGER DEFAULT 0" +
                    ");");
 
+        /**
+         * This table is used by the SMS dispatcher to hold
+         * incomplete partial messages until all the parts arrive.
+         */
+        db.execSQL("CREATE TABLE raw (" +
+                   "_id INTEGER PRIMARY KEY," +
+                   "date INTEGER," +
+                   "reference_number INTEGER," + // one per full message
+                   "count INTEGER," + // the number of parts
+                   "sequence INTEGER," + // the part number of this message
+                   "destination_port INTEGER," +
+                   "address TEXT," +
+                   "sub_id INTEGER DEFAULT " + SubscriptionManager.INVALID_SUBSCRIPTION_ID + ", " +
+                   "pdu TEXT);"); // the raw PDU for this part
+
         db.execSQL("CREATE TABLE attachments (" +
                    "sms_id INTEGER," +
                    "content_url TEXT," +
@@ -1368,6 +1379,7 @@
         db.execSQL("DROP TABLE IF EXISTS threads");
         db.execSQL("DROP TABLE IF EXISTS " + MmsSmsProvider.TABLE_PENDING_MSG);
         db.execSQL("DROP TABLE IF EXISTS sms");
+        db.execSQL("DROP TABLE IF EXISTS raw");
         db.execSQL("DROP TABLE IF EXISTS attachments");
         db.execSQL("DROP TABLE IF EXISTS thread_ids");
         db.execSQL("DROP TABLE IF EXISTS sr_pending");
@@ -1562,6 +1574,9 @@
         db.execSQL("ALTER TABLE " + SmsProvider.TABLE_SMS
                 + " ADD COLUMN " + Sms.SUBSCRIPTION_ID
                 + " INTEGER DEFAULT " + SubscriptionManager.INVALID_SUBSCRIPTION_ID);
+        db.execSQL("ALTER TABLE " + SmsProvider.TABLE_RAW
+                +" ADD COLUMN " + Sms.SUBSCRIPTION_ID
+                + " INTEGER DEFAULT " + SubscriptionManager.INVALID_SUBSCRIPTION_ID);
     }
 
     private void upgradeDatabaseToVersion59(SQLiteDatabase db) {
@@ -1888,7 +1903,6 @@
         public LowStorageMonitor() {
         }
 
-        @Override
         public void onReceive(Context context, Intent intent) {
             String action = intent.getAction();
 
diff --git a/src/com/android/providers/telephony/ProviderUtil.java b/src/com/android/providers/telephony/ProviderUtil.java
index 7d8ab21..34c6da9 100644
--- a/src/com/android/providers/telephony/ProviderUtil.java
+++ b/src/com/android/providers/telephony/ProviderUtil.java
@@ -23,6 +23,7 @@
 import android.net.Uri;
 import android.os.Process;
 import android.provider.Telephony;
+import android.provider.Telephony.Sms;
 import android.text.TextUtils;
 import android.util.Log;
 
@@ -111,12 +112,4 @@
         context.sendBroadcast(intent);
     }
 
-    public static Context getCredentialEncryptedContext(Context context) {
-        if (context.isCredentialEncryptedStorage()) {
-            return context;
-        }
-        Context ceContext = context.createCredentialEncryptedStorageContext();
-        return ceContext != null ? ceContext : context;
-    }
-
 }
diff --git a/src/com/android/providers/telephony/SmsProvider.java b/src/com/android/providers/telephony/SmsProvider.java
index 4201eca..c282a7f 100644
--- a/src/com/android/providers/telephony/SmsProvider.java
+++ b/src/com/android/providers/telephony/SmsProvider.java
@@ -17,10 +17,12 @@
 package com.android.providers.telephony;
 
 import android.app.AppOpsManager;
+import android.content.ComponentName;
 import android.content.ContentProvider;
 import android.content.ContentResolver;
 import android.content.ContentValues;
 import android.content.Context;
+import android.content.Intent;
 import android.content.UriMatcher;
 import android.database.Cursor;
 import android.database.DatabaseUtils;
@@ -42,6 +44,8 @@
 import android.text.TextUtils;
 import android.util.Log;
 
+import com.android.internal.telephony.SmsApplication;
+
 import java.util.ArrayList;
 import java.util.HashMap;
 
@@ -87,7 +91,6 @@
     public boolean onCreate() {
         setAppOps(AppOpsManager.OP_READ_SMS, AppOpsManager.OP_WRITE_SMS);
         mOpenHelper = MmsSmsDatabaseHelper.getInstance(getContext());
-        mDeOpenHelper = DeviceEncryptedMmsSmsDatabaseHelper.getInstance(getContext());
         return true;
     }
 
@@ -253,7 +256,7 @@
             orderBy = Sms.DEFAULT_SORT_ORDER;
         }
 
-        SQLiteDatabase db = getDBOpenHelper(match).getReadableDatabase();
+        SQLiteDatabase db = mOpenHelper.getReadableDatabase();
         Cursor ret = qb.query(db, projectionIn, selection, selectionArgs,
                               null, null, orderBy);
 
@@ -263,13 +266,6 @@
         return ret;
     }
 
-    private SQLiteOpenHelper getDBOpenHelper(int match) {
-        if (match == SMS_RAW_MESSAGE) {
-            return mDeOpenHelper;
-        }
-        return mOpenHelper;
-    }
-
     private Object[] convertIccToSms(SmsMessage message, int id) {
         // N.B.: These calls must appear in the same order as the
         // columns appear in ICC_COLUMNS.
@@ -473,7 +469,7 @@
                 return null;
         }
 
-        SQLiteDatabase db = getDBOpenHelper(match).getWritableDatabase();
+        SQLiteDatabase db = mOpenHelper.getWritableDatabase();
 
         if (table.equals(TABLE_SMS)) {
             boolean addDate = false;
@@ -602,7 +598,7 @@
     public int delete(Uri url, String where, String[] whereArgs) {
         int count;
         int match = sURLMatcher.match(url);
-        SQLiteDatabase db = getDBOpenHelper(match).getWritableDatabase();
+        SQLiteDatabase db = mOpenHelper.getWritableDatabase();
         boolean notifyIfNotDefault = true;
         switch (match) {
             case SMS_ALL:
@@ -695,10 +691,9 @@
         String table = TABLE_SMS;
         String extraWhere = null;
         boolean notifyIfNotDefault = true;
-        int match = sURLMatcher.match(url);
-        SQLiteDatabase db = getDBOpenHelper(match).getWritableDatabase();
+        SQLiteDatabase db = mOpenHelper.getWritableDatabase();
 
-        switch (match) {
+        switch (sURLMatcher.match(url)) {
             case SMS_RAW_MESSAGE:
                 table = TABLE_RAW;
                 notifyIfNotDefault = false;
@@ -784,7 +779,6 @@
     }
 
     private SQLiteOpenHelper mOpenHelper;
-    private SQLiteOpenHelper mDeOpenHelper;
 
     private final static String TAG = "SmsProvider";
     private final static String VND_ANDROID_SMS = "vnd.android.cursor.item/sms";
