Snap for 9531772 from be4c50f0816e6bb48889cc9eb30ef18a18f763f4 to tm-qpr3-release
Change-Id: I6f2127caeb7d2bead6ceab81a45bb5a804863ba4
diff --git a/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java b/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
index d2667c1..34b717c 100644
--- a/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
+++ b/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
@@ -44,6 +44,7 @@
import android.provider.Telephony.Sms;
import android.provider.Telephony.Sms.Intents;
import android.provider.Telephony.Threads;
+import android.telephony.AnomalyReporter;
import android.telephony.SubscriptionManager;
import android.util.Log;
@@ -61,6 +62,7 @@
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
/**
@@ -273,6 +275,9 @@
// cache for INITIAL_CREATE_DONE shared pref so access to it can be avoided when possible
private static AtomicBoolean sInitialCreateDone = new AtomicBoolean(false);
+ private static final UUID CREATE_CALLED_MULTIPLE_TIMES_UUID = UUID.fromString(
+ "6ead002e-c001-4c05-9bca-67d7c4e29782");
+
/**
* The primary purpose of this DatabaseErrorHandler is to broadcast an intent on corruption and
* print a Log.wtf so database corruption can be caught earlier.
@@ -555,7 +560,9 @@
if (isInitialCreateDone()) {
// this onCreate is called after onCreate was called once initially. The db file
// disappeared mysteriously?
- localLogWtf("onCreate: was already called once earlier");
+ AnomalyReporter.reportAnomaly(CREATE_CALLED_MULTIPLE_TIMES_UUID,
+ "MmsSmsDatabaseHelper: onCreate() was already "
+ + "called once earlier");
intent.putExtra(Intents.EXTRA_IS_INITIAL_CREATE, false);
} else {
setInitialCreateDone();