diff --git a/src/com/android/providers/telephony/MmsProvider.java b/src/com/android/providers/telephony/MmsProvider.java
index 2c7222a..5acfe13 100644
--- a/src/com/android/providers/telephony/MmsProvider.java
+++ b/src/com/android/providers/telephony/MmsProvider.java
@@ -71,6 +71,7 @@
     public boolean onCreate() {
         setAppOps(AppOpsManager.OP_READ_SMS, AppOpsManager.OP_WRITE_SMS);
         mOpenHelper = MmsSmsDatabaseHelper.getInstanceForCe(getContext());
+        TelephonyBackupAgent.DeferredSmsMmsRestoreService.startIfFilesExist(getContext());
         return true;
     }
 
diff --git a/src/com/android/providers/telephony/MmsSmsProvider.java b/src/com/android/providers/telephony/MmsSmsProvider.java
index b2fa117..d5e0ef9 100644
--- a/src/com/android/providers/telephony/MmsSmsProvider.java
+++ b/src/com/android/providers/telephony/MmsSmsProvider.java
@@ -312,6 +312,7 @@
         mUseStrictPhoneNumberComparation =
             getContext().getResources().getBoolean(
                     com.android.internal.R.bool.config_use_strict_phone_number_comparation);
+        TelephonyBackupAgent.DeferredSmsMmsRestoreService.startIfFilesExist(getContext());
         return true;
     }
 
diff --git a/src/com/android/providers/telephony/SmsProvider.java b/src/com/android/providers/telephony/SmsProvider.java
index d8b97c5..f50f804 100644
--- a/src/com/android/providers/telephony/SmsProvider.java
+++ b/src/com/android/providers/telephony/SmsProvider.java
@@ -92,6 +92,7 @@
         setAppOps(AppOpsManager.OP_READ_SMS, AppOpsManager.OP_WRITE_SMS);
         mDeOpenHelper = MmsSmsDatabaseHelper.getInstanceForDe(getContext());
         mCeOpenHelper = MmsSmsDatabaseHelper.getInstanceForCe(getContext());
+        TelephonyBackupAgent.DeferredSmsMmsRestoreService.startIfFilesExist(getContext());
         return true;
     }
 
diff --git a/src/com/android/providers/telephony/TelephonyBackupAgent.java b/src/com/android/providers/telephony/TelephonyBackupAgent.java
index 61796a2..5f4acaa 100644
--- a/src/com/android/providers/telephony/TelephonyBackupAgent.java
+++ b/src/com/android/providers/telephony/TelephonyBackupAgent.java
@@ -476,15 +476,9 @@
         protected void onHandleIntent(Intent intent) {
             try {
                 mWakeLock.acquire();
-                File[] files = getFilesDir().listFiles(new FileFilter() {
-                    @Override
-                    public boolean accept(File file) {
-                        return file.getName().endsWith(SMS_BACKUP_FILE_SUFFIX) ||
-                                file.getName().endsWith(MMS_BACKUP_FILE_SUFFIX);
-                    }
-                });
+                File[] files = getFilesToRestore(this);
 
-                if (files == null) {
+                if (files == null || files.length == 0) {
                     return;
                 }
                 Arrays.sort(files, mFileComparator);
@@ -525,15 +519,29 @@
             super.onDestroy();
         }
 
-        public static Intent getIntent(Context context) {
-            return new Intent(context, DeferredSmsMmsRestoreService.class);
+        static void startIfFilesExist(Context context) {
+            File[] files = getFilesToRestore(context);
+            if (files == null || files.length == 0) {
+                return;
+            }
+            context.startService(new Intent(context, DeferredSmsMmsRestoreService.class));
+        }
+
+        private static File[] getFilesToRestore(Context context) {
+            return context.getFilesDir().listFiles(new FileFilter() {
+                @Override
+                public boolean accept(File file) {
+                    return file.getName().endsWith(SMS_BACKUP_FILE_SUFFIX) ||
+                            file.getName().endsWith(MMS_BACKUP_FILE_SUFFIX);
+                }
+            });
         }
     }
 
     @Override
     public void onRestoreFinished() {
         super.onRestoreFinished();
-        startService(DeferredSmsMmsRestoreService.getIntent(this));
+        DeferredSmsMmsRestoreService.startIfFilesExist(this);
     }
 
     private void doRestoreFile(String fileName, FileDescriptor fd) throws IOException {
