[automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" am: 637cb220d9 -s ours am: c6b8f310e9 -s ours

am skip reason: subject contains skip directive

Original change: https://android-review.googlesource.com/c/platform/packages/providers/TelephonyProvider/+/1943360

Change-Id: If95a151b9ba03194fc0dd9e33138cefa06ebca3a
diff --git a/OWNERS b/OWNERS
index 6c500bf..799e5d3 100644
--- a/OWNERS
+++ b/OWNERS
@@ -1,3 +1,4 @@
+amitmahajan@google.com
 breadley@google.com
 fionaxu@google.com
 jackyu@google.com
diff --git a/res/values-as/strings.xml b/res/values-as/strings.xml
index 20ad0b0..6994d18 100644
--- a/res/values-as/strings.xml
+++ b/res/values-as/strings.xml
@@ -17,5 +17,5 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" product="tablet" msgid="9194799012395299737">"ম’বাইল নেটৱৰ্ক কনফিগাৰেশ্বন"</string>
-    <string name="app_label" product="default" msgid="8338087656149558019">"ফ’ন আৰু বাৰ্তাৰ ষ্ট’ৰেজ"</string>
+    <string name="app_label" product="default" msgid="8338087656149558019">"ফ\'ন আৰু বাৰ্তাৰ সঞ্চয়াগাৰ"</string>
 </resources>
diff --git a/src/com/android/providers/telephony/TelephonyProvider.java b/src/com/android/providers/telephony/TelephonyProvider.java
index a77fa7c..956cebf 100644
--- a/src/com/android/providers/telephony/TelephonyProvider.java
+++ b/src/com/android/providers/telephony/TelephonyProvider.java
@@ -3450,10 +3450,11 @@
             }
 
             if (bestRestoreMatch != null) {
-                if (bestRestoreMatch.getMatchScore() != 0) {
+                ContentValues newContentValues = bestRestoreMatch.getContentValues();
+                if (bestRestoreMatch.getMatchScore() != 0 && newContentValues != null) {
                     if (restoreCase == TelephonyProtoEnums.SIM_RESTORE_CASE_SUW) {
                         update(SubscriptionManager.SIM_INFO_SUW_RESTORE_CONTENT_URI,
-                                bestRestoreMatch.getContentValues(),
+                                newContentValues,
                                 Telephony.SimInfo.COLUMN_UNIQUE_KEY_SUBSCRIPTION_ID + "=?",
                                 new String[]{Integer.toString(currSubIdFromDb)});
                     } else if (restoreCase == TelephonyProtoEnums.SIM_RESTORE_CASE_SIM_INSERTED) {
@@ -3461,7 +3462,7 @@
                                 SubscriptionManager.SIM_INFO_BACKUP_AND_RESTORE_CONTENT_URI,
                                 SIM_INSERTED_RESTORE_URI_SUFFIX);
                         update(simInsertedRestoreUri,
-                                bestRestoreMatch.getContentValues(),
+                                newContentValues,
                                 Telephony.SimInfo.COLUMN_UNIQUE_KEY_SUBSCRIPTION_ID + "=?",
                                 new String[]{Integer.toString(currSubIdFromDb)});
                     }
@@ -3472,6 +3473,9 @@
                             restoreCase, bestRestoreMatch.getMatchingCriteriaForLogging());
                     newlyRestoredSubIds.add(currSubIdFromDb);
                 } else {
+                    /* If this block was reached because ContentValues was null, that means the
+                    database schema was newer during backup than during restore. We consider this
+                    a no-match to avoid updating columns that don't exist */
                     TelephonyStatsLog.write(TelephonyStatsLog.SIM_SPECIFIC_SETTINGS_RESTORED,
                             TelephonyProtoEnums.SIM_RESTORE_RESULT_NONE_MATCH,
                             restoreCase, bestRestoreMatch.getMatchingCriteriaForLogging());