Android: Remove unused components strings

Only removes strings unused by android from being included in the apk.

Now that components strings is linted, no more unused strings will be
added as future CL owners will be responsible for removing the string
from android if they remove the last usage in android code.

Bug: 731159
Change-Id: Idd3cef1d13f48fa047b00a5abc5c5c965921dd63
Reviewed-on: https://chromium-review.googlesource.com/628958
Commit-Queue: Peter Wen <[email protected]>
Reviewed-by: Sylvain Defresne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#497139}
diff --git a/build/android/lint/suppressions.xml b/build/android/lint/suppressions.xml
index bd388d4..5640000 100644
--- a/build/android/lint/suppressions.xml
+++ b/build/android/lint/suppressions.xml
@@ -322,8 +322,6 @@
     <ignore regexp="R.string.private_browsing_warning"/>
     <!-- 1 set of strings used dynamically by remoting apk -->
     <ignore regexp="R.string.offline_reason_*"/>
-    <!-- TODO(wnwen): Clean up components strings so it is linted -->
-    <ignore regexp="components/strings/components_strings_grd.resources.zip/values.*/components_strings.xml"/>
   </issue>
   <issue id="UseCompoundDrawables">
     <!-- Upscaling 24dp to 48dp doesn't work as expected with a TextView compound drawable. -->
diff --git a/components/autofill_strings.grdp b/components/autofill_strings.grdp
index b4128bb4..2767c577 100644
--- a/components/autofill_strings.grdp
+++ b/components/autofill_strings.grdp
@@ -63,7 +63,7 @@
   <message name="IDS_AUTOFILL_CC_DISCOVER" desc="Discover credit card name." formatter_data="android_java">
     Discover
   </message>
-  <message name="IDS_AUTOFILL_CC_ELO" desc="Elo credit card name." formatter_data="android_java">
+  <message name="IDS_AUTOFILL_CC_ELO" desc="Elo credit card name.">
     Elo
   </message>
   <message name="IDS_AUTOFILL_CC_JCB" desc="JCB credit card name." formatter_data="android_java">
@@ -345,12 +345,12 @@
   </if>
   <if expr="is_ios">
     <if expr="_google_chrome">
-      <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_TOOLTIP" desc="Text that provides further explanation on iOS for the option in the card unmasking dialog that allows user to store a Wallet card on their local device." formatter_data="android_java">
+      <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_TOOLTIP" desc="Text that provides further explanation on iOS for the option in the card unmasking dialog that allows user to store a Wallet card on their local device.">
         If enabled, Chrome will store a copy of your card on this device for faster form filling.
       </message>
     </if>
     <if expr="not _google_chrome">
-      <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_TOOLTIP" desc="Text that provides further explanation on iOS for the option in the card unmasking dialog that allows user to store a Wallet card on their local device." formatter_data="android_java">
+      <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_TOOLTIP" desc="Text that provides further explanation on iOS for the option in the card unmasking dialog that allows user to store a Wallet card on their local device.">
         If enabled, Chromium will store a copy of your card on this device for faster form filling.
       </message>
     </if>
diff --git a/components/new_or_sad_tab_strings.grdp b/components/new_or_sad_tab_strings.grdp
index 46e48aa..6f33404 100644
--- a/components/new_or_sad_tab_strings.grdp
+++ b/components/new_or_sad_tab_strings.grdp
@@ -34,22 +34,22 @@
       <message name="IDS_SAD_TAB_RELOAD_TITLE" desc="The title of the web page displayed if content in Chrome browser does not load for an unknown reason, and a reload failed to fix the issue." formatter_data="android_java">
         Can't open this page
       </message>
-      <message name="IDS_SAD_TAB_OOM_MESSAGE_TABS" desc="The message displayed on the web page if content in Chrome browser does not load due to the browser being out of memory, a reload failed to fix the issue and other tabs are open." formatter_data="android_java">
+      <message name="IDS_SAD_TAB_OOM_MESSAGE_TABS" desc="The message displayed on the web page if content in Chrome browser does not load due to the browser being out of memory, a reload failed to fix the issue and other tabs are open.">
         Try closing other tabs or programs to free up memory.
       </message>
-      <message name="IDS_SAD_TAB_OOM_MESSAGE_NOTABS" desc="The message displayed on the web page if content in Chrome browser does not load due to the browser being out of memory, a reload failed to fix the issue and no other tabs are open." formatter_data="android_java">
+      <message name="IDS_SAD_TAB_OOM_MESSAGE_NOTABS" desc="The message displayed on the web page if content in Chrome browser does not load due to the browser being out of memory, a reload failed to fix the issue and no other tabs are open.">
         Try exiting other programs to free up memory.
       </message>
       <message name="IDS_SAD_TAB_RELOAD_TRY" desc="The message displayed on the web page if content in Chrome browser does not load and a reload failed to fix the issue. Introduces a bulleted list of solutions/tips for the user to try." formatter_data="android_java">
         Try the following tips:
       </message>
       <if expr="is_macosx">
-        <message name="IDS_SAD_TAB_RELOAD_INCOGNITO" desc="One of the bullet points displayed on the web page if a reload failed to fix the issue, advising the user to open the web page in Chrome's Incognito mode." formatter_data="android_java">
+        <message name="IDS_SAD_TAB_RELOAD_INCOGNITO" desc="One of the bullet points displayed on the web page if a reload failed to fix the issue, advising the user to open the web page in Chrome's Incognito mode.">
           Open page in a new Incognito window (⇧⌘N)
         </message>
       </if>
       <if expr="is_win or is_linux or chromeos">
-        <message name="IDS_SAD_TAB_RELOAD_INCOGNITO" desc="One of the bullet points displayed on the web page if a reload failed to fix the issue, advising the user to open the web page in Chrome's Incognito mode." formatter_data="android_java">
+        <message name="IDS_SAD_TAB_RELOAD_INCOGNITO" desc="One of the bullet points displayed on the web page if a reload failed to fix the issue, advising the user to open the web page in Chrome's Incognito mode.">
           Open page in a new Incognito window (Ctrl-Shift-N)
         </message>
       </if>
@@ -59,22 +59,22 @@
         </message>
       </if>
       <if expr="is_macosx or chromeos">
-        <message name="IDS_SAD_TAB_RELOAD_CLOSE_TABS" desc="One of the bullet points displayed on the web page if a reload failed to fix the issue, advising the user to close other Chrome tabs or apps running on their computer (Mac, Chrome OS)." formatter_data="android_java">
+        <message name="IDS_SAD_TAB_RELOAD_CLOSE_TABS" desc="One of the bullet points displayed on the web page if a reload failed to fix the issue, advising the user to close other Chrome tabs or apps running on their computer (Mac, Chrome OS).">
           Close other tabs or apps
         </message>
       </if>
       <if expr="is_linux and not chromeos">
-        <message name="IDS_SAD_TAB_RELOAD_CLOSE_TABS" desc="One of the bullet points displayed on the web page if a reload failed to fix the issue, advising the user to close other Chrome tabs or programs running on their computer." formatter_data="android_java">
+        <message name="IDS_SAD_TAB_RELOAD_CLOSE_TABS" desc="One of the bullet points displayed on the web page if a reload failed to fix the issue, advising the user to close other Chrome tabs or programs running on their computer.">
           Close other tabs or programs
         </message>
       </if>
-      <if expr="is_macosx or chromeos or is_android or is_ios">
-        <message name="IDS_SAD_TAB_RELOAD_CLOSE_NOTABS" desc="One of the bullet points displayed on the web page if a reload failed to fix the issue, advising the user to close other apps running on their computer or device." formatter_data="android_java">
+      <if expr="is_macosx or chromeos or is_ios">
+        <message name="IDS_SAD_TAB_RELOAD_CLOSE_NOTABS" desc="One of the bullet points displayed on the web page if a reload failed to fix the issue, advising the user to close other apps running on their computer or device.">
           Close other apps
         </message>
       </if>
       <if expr="is_linux and not chromeos">
-        <message name="IDS_SAD_TAB_RELOAD_CLOSE_NOTABS" desc="One of the bullet points displayed on the web page if a reload failed to fix the issue, advising the user to close other programs running on their computer (Linux)." formatter_data="android_java">
+        <message name="IDS_SAD_TAB_RELOAD_CLOSE_NOTABS" desc="One of the bullet points displayed on the web page if a reload failed to fix the issue, advising the user to close other programs running on their computer (Linux).">
           Close other programs
         </message>
       </if>
@@ -89,7 +89,7 @@
         </message>
       </if>
       <if expr="is_win or is_linux or is_macosx or chromeos">
-        <message name="IDS_SAD_TAB_RELOAD_RESTART_DEVICE" desc="One of the bullet points displayed on the web page if a reload failed to fix the issue, advising the user to restart their computer." formatter_data="android_java">
+        <message name="IDS_SAD_TAB_RELOAD_RESTART_DEVICE" desc="One of the bullet points displayed on the web page if a reload failed to fix the issue, advising the user to restart their computer.">
           Restart your computer
         </message>
       </if>
@@ -103,9 +103,6 @@
           Learn more
         </message>
       </if>
-      <message name="IDS_SAD_TAB_UMA_OPTIN" desc="Text that appears next to a checkbox, allowing the user to opt-in to sending statistics about their Chrome browser usage and reports of crashes to Google." formatter_data="android_java">
-        Automatically send usage statistics and crash reports to Google
-      </message>
 
       <!-- New Tab -->
       <message name="IDS_NEW_TAB_TITLE"
diff --git a/components/payments_strings.grdp b/components/payments_strings.grdp
index edcda78..cf64037 100644
--- a/components/payments_strings.grdp
+++ b/components/payments_strings.grdp
@@ -21,7 +21,7 @@
     <message name="IDS_PAYMENTS_EDIT_CONTACT_DETAILS_LABEL" desc="The title of the dialog for user to edit their contact information, such as the user's full name, an email address or a phone number. Sentence-cased." formatter_data="android_java">
       Edit contact info
     </message>
-    <message name="IDS_PAYMENTS_ADD_CARD_LABEL" desc="The title of the dialog for user to add new payment card. Sentence-cased." formatter_data="android_java">
+    <message name="IDS_PAYMENTS_ADD_CARD_LABEL" desc="The title of the dialog for user to add new payment card. Sentence-cased.">
       Add card
     </message>
     <message name="IDS_PAYMENTS_ADD_BILLING_ADDRESS" desc="The title of the dialog for user to add billing address to payment card. Sentence-cased." formatter_data="android_java">
@@ -304,7 +304,7 @@
   <message name="IDS_PAYMENTS_LOADING_MESSAGE" desc="The text that informs the user that payment information is being loaded up." formatter_data="android_java">
     Loading
   </message>
-  <message name="IDS_PAYMENTS_PROCESSING_MESSAGE" desc="The text that informs the user that payment is being processed." formatter_data="android_java">
+  <message name="IDS_PAYMENTS_PROCESSING_MESSAGE" desc="The text that informs the user that payment is being processed.">
     Processing
   </message>
   <message name="IDS_PAYMENTS_ERROR_MESSAGE_DIALOG_TITLE" desc="The title of the dialog that informs the user that there is error in verifying and charging the payment.">
@@ -395,7 +395,7 @@
   <message name="IDS_PAYMENTS_NAME_ON_CARD_REQUIRED" desc="The label to indicate the cardholder name (the name of the owner or 'holder' of the credit card)  must be entered." formatter_data="android_java">
     Cardholder name required
   </message>
-  <message name="IDS_PAYMENTS_CARD_BILLING_ADDRESS_REQUIRED" desc="The label to indicate the billing address of the credit card  must be entered." formatter_data="android_java">
+  <message name="IDS_PAYMENTS_CARD_BILLING_ADDRESS_REQUIRED" desc="The label to indicate the billing address of the credit card  must be entered.">
     Card billing address required
   </message>
   <message name="IDS_PAYMENTS_MORE_INFORMATION_REQUIRED" desc="The label to indicate more information is required for payment card or shipping address or contact info." formatter_data="android_java">
@@ -440,7 +440,7 @@
   <message name="IDS_PAYMENTS_UNSUPPORTED_SHIPPING_ADDRESS" desc="Text implying that a user needs to pick a different shipping address, because the currently selected address is not supported. 'Ship' is typically used for packages and items that are sent through the mail. In American English, we differentiate 'ship' from 'deliver." formatter_data="android_java">
     Can’t ship to this address. Select a different address.
   </message>
-  <message name="IDS_PAYMENTS_UNSUPPORTED_SHIPPING_OPTION" desc="Text implying that a user needs to pick a different shipping option, because the currently selected option is not supported. 'Ship' is typically used for packages and items that are sent through the mail. In American English, we differentiate 'ship' from deliver." formatter_data="android_java">
+  <message name="IDS_PAYMENTS_UNSUPPORTED_SHIPPING_OPTION" desc="Text implying that a user needs to pick a different shipping option, because the currently selected option is not supported. 'Ship' is typically used for packages and items that are sent through the mail. In American English, we differentiate 'ship' from deliver.">
     This shipping method isn’t available. Try a different method.
   </message>
 
@@ -451,7 +451,7 @@
   <message name="IDS_PAYMENTS_UNSUPPORTED_DELIVERY_ADDRESS" desc="Text implying that a user needs to pick a different delivery address, because the currently selected address is not supported. Delivery is commonly faster than shipping. For example, it might be used for food delivery." formatter_data="android_java">
     Can’t deliver to this address. Select a different address.
   </message>
-  <message name="IDS_PAYMENTS_UNSUPPORTED_DELIVERY_OPTION" desc="Text implying that a user needs to pick a different delivery option, because the currently selected option is not supported. Delivery is commonly faster than shipping. For example, it might be used for food delivery." formatter_data="android_java">
+  <message name="IDS_PAYMENTS_UNSUPPORTED_DELIVERY_OPTION" desc="Text implying that a user needs to pick a different delivery option, because the currently selected option is not supported. Delivery is commonly faster than shipping. For example, it might be used for food delivery.">
     This delivery method isn’t available. Try a different method.
   </message>
 
@@ -462,7 +462,7 @@
   <message name="IDS_PAYMENTS_UNSUPPORTED_PICKUP_ADDRESS" desc="Text implying that a user needs to choose a different pickup address, because the service can’t pick up items from that address. This address can be used, for example, for laundry pickup. Note that here, 'pick up' is a verb." formatter_data="android_java">
     Can’t pick up from this address. Select a different address.
   </message>
-  <message name="IDS_PAYMENTS_UNSUPPORTED_PICKUP_OPTION" desc="Text implying that a user needs to choose a different pickup option, because the currently selected option is not supported. This option can be used, for example, for laundry pickup." formatter_data="android_java">
+  <message name="IDS_PAYMENTS_UNSUPPORTED_PICKUP_OPTION" desc="Text implying that a user needs to choose a different pickup option, because the currently selected option is not supported. This option can be used, for example, for laundry pickup.">
     This pickup method isn’t available. Try a different method.
   </message>
 
@@ -487,7 +487,7 @@
        =1 {<ph name="PAYMENT_METHOD_PREVIEW">{1}<ex>VISA ....1234</ex></ph> and <ph name="NUMBER_OF_ADDITIONAL_PAYMENT_METHODS">{2}<ex>1</ex></ph> more}
        other {<ph name="PAYMENT_METHOD_PREVIEW">{1}<ex>VISA ....1234</ex></ph> and <ph name="NUMBER_OF_ADDITIONAL_PAYMENT_METHODS">{2}<ex>2</ex></ph> more}}
     </message>
-    <message name="IDS_PAYMENT_REQUEST_SHIPPING_ADDRESSES_PREVIEW" desc="This is a snippet of a shipping address a user has saved to Chrome, plus an indication of the number of additional shipping addresses the user has saved. Its function is to show the user has shipping addresses that can be used to complete a purchase, and thus doesn't have to type the entire address. [ICU Syntax]" formatter_data="android_java">
+    <message name="IDS_PAYMENT_REQUEST_SHIPPING_ADDRESSES_PREVIEW" desc="This is a snippet of a shipping address a user has saved to Chrome, plus an indication of the number of additional shipping addresses the user has saved. Its function is to show the user has shipping addresses that can be used to complete a purchase, and thus doesn't have to type the entire address. [ICU Syntax]">
     {SHIPPING_ADDRESS, plural,
       =0 {<ph name="SHIPPING_ADDRESS_PREVIEW">{1}<ex>Jerry, 1253 Mcgill college</ex></ph>}
       =1 {<ph name="SHIPPING_ADDRESS_PREVIEW">{1}<ex>Jerry, 1253 Mcgill college</ex></ph> and <ph name="NUMBER_OF_ADDITIONAL_ADDRESSES">{2}<ex>1</ex></ph> more}