Merge "Move SMS raw db deletion to phone process." am: 479ec92c27 am: f784db5cae

am: 1285b12980

Change-Id: I349002ff9a72b08056a8af47361de4914afb2b3d
This commit is contained in:
Amit Mahajan
2019-03-14 18:55:13 -07:00
committed by android-build-merger

View File

@@ -157,20 +157,9 @@ public class ResetNetworkConfirm extends InstrumentedFragment {
SubscriptionManager.getPhoneId(mSubId)).factoryReset(); SubscriptionManager.getPhoneId(mSubId)).factoryReset();
restoreDefaultApn(context); restoreDefaultApn(context);
esimFactoryReset(context, context.getPackageName()); esimFactoryReset(context, context.getPackageName());
// There has been issues when Sms raw table somehow stores orphan
// fragments. They lead to garbled message when new fragments come
// in and combied with those stale ones. In case this happens again,
// user can reset all network settings which will clean up this table.
cleanUpSmsRawTable(context);
} }
}; };
private void cleanUpSmsRawTable(Context context) {
ContentResolver resolver = context.getContentResolver();
Uri uri = Uri.withAppendedPath(Telephony.Sms.CONTENT_URI, "raw/permanentDelete");
resolver.delete(uri, null, null);
}
@VisibleForTesting @VisibleForTesting
void esimFactoryReset(Context context, String packageName) { void esimFactoryReset(Context context, String packageName) {
if (mEraseEsim) { if (mEraseEsim) {