Merge changes I572ef7cd,I4bb036ab,Icb2b9bc1,I6c9d9b6e,I7e3d9c3b, ...

* changes:
  Updated licenses for v22 release.
  Show "Calling accounts" for all users in DialerSettingsActivity
  Fix an AOSP build error caused by bottom sheet states.
  Check phone capabilities.
  Improve Coalescer performance
  Fix drag and drop crash.
  Fix bug that RTT call is conferenceable with voice call.
  Fully expand the bottom sheet when touch exploration is enabled.
diff --git a/java/com/android/dialer/about/res/raw/third_party_license_metadata b/java/com/android/dialer/about/res/raw/third_party_license_metadata
index 87440dc..bd6259c 100755
--- a/java/com/android/dialer/about/res/raw/third_party_license_metadata
+++ b/java/com/android/dialer/about/res/raw/third_party_license_metadata
@@ -29,32 +29,34 @@
 304646:10693 Compatibility Libraries for Android localbroadcastmanager.
 315386:10693 Compatibility Libraries for Android print.
 326138:10693 Compatibility Libraries for Android slidingpanelayout.
-336891:10693 Compatibility Libraries for Android swiperefreshlayout.
-347635:10693 Compatibility Libraries for Android viewpager.
-358339:11358 Dagger
-369713:11357 Error Prone
-381086:11358 Google Auto
-392459:11358 Guava JDK5
-403832:11362 Guava JDK7
-415205:11358 J2ObjC
-426575:11358 JSR 250
-437945:11365 JSR 330
-449346:11358 Material Components for Android
-460715:11358 OkHttp
-472082:11358 Okio
-483455:11358 OpenCensus
-494824:11358 Volley
-506192:11357 ZXing
-517569:12847 carrierservices
-530428:11358 flexbox
-541800:11358 gRPC Java
-553167:11358 gson
-564543:12847 jibercsclient
-577409:10173 libphonenumber
-587593:18982 mime4j
-606594:10699 shortcutbadger
-617309:16013 Android SDK
-633344:22655 Checker Framework
-656018:1096 Animal Sniffer
-657124:4771 Glide
-661907:1602 JSR 305
+336891:10695 Compatibility Libraries for Android support-slices_core
+347646:10693 Compatibility Libraries for Android swiperefreshlayout.
+358390:10693 Compatibility Libraries for Android viewpager.
+369094:11358 Dagger
+380468:11357 Error Prone
+391841:11358 Google Auto
+403214:11358 Guava JDK5
+414587:11362 Guava JDK7
+425960:11358 J2ObjC
+437330:11358 JSR 250
+448700:11365 JSR 330
+460101:11358 Material Components for Android
+471470:11358 OkHttp
+482837:11358 Okio
+494210:11358 OpenCensus
+505579:11358 Volley
+516947:11357 ZXing
+528316:11358 flexbox
+539688:11358 gRPC Java
+551055:11358 gson
+562432:10173 libphonenumber
+572624:10699 shortcutbadger
+583339:16013 Android SDK
+599371:1096 Animal Sniffer
+600479:1602 JSR 305
+602099:1732 Protobuf Nano
+603865:1846 Checker Framework Annotations
+605721:4771 Glide
+610512:12847 carrierservices
+623377:12847 jibercsclient
+636235:18982 mime4j
diff --git a/java/com/android/dialer/about/res/raw/third_party_licenses b/java/com/android/dialer/about/res/raw/third_party_licenses
index e55131b..d8d9506 100755
--- a/java/com/android/dialer/about/res/raw/third_party_licenses
+++ b/java/com/android/dialer/about/res/raw/third_party_licenses
@@ -6057,6 +6057,200 @@
 
    END OF TERMS AND CONDITIONS
 
+Compatibility Libraries for Android support-slices_core:
+
+
+   Copyright (c) 2005-2011, The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+
+
 Compatibility Libraries for Android swiperefreshlayout.:
 
 
@@ -9324,245 +9518,6 @@
    limitations under the License.
 
 
-carrierservices:
-
-These components
-  com.google.android.rcs.core,
-  com.google.android.rcs.core.utils.CaseInsensitiveMap,
-  com.google.android.rcs.core.utils.DateTime,
-  com.google.android.rcs.core.utils.InetAddresses,
-  com.google.android.rcs.core.network.ConnectivityMonitor,
-  com.google.android.rcs.client.PrivateDataStorage,
-  com.google.android.rcs.client.utils.FastXmlSerializer,
-  com.google.android.rcs.client.utils.XmlUtils,
-  com.google.android.rcs.client.utils.QueuedWork
-are licensed under Apache v2.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-===============================================================================
-
-These components
-  com.google.android.rcs.core.utils.FastBase64,
-  com.google.android.rcs.core.utils.LibraryLoaderHelper
-are licensed under BSD.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-   * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-   * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-
-   * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
 flexbox:
 
 
@@ -10181,245 +10136,6 @@
    limitations under the License.
 
 
-jibercsclient:
-
-These components
-  com.google.android.rcs.core,
-  com.google.android.rcs.core.utils.CaseInsensitiveMap,
-  com.google.android.rcs.core.utils.DateTime,
-  com.google.android.rcs.core.utils.InetAddresses,
-  com.google.android.rcs.core.network.ConnectivityMonitor,
-  com.google.android.rcs.client.PrivateDataStorage,
-  com.google.android.rcs.client.utils.FastXmlSerializer,
-  com.google.android.rcs.client.utils.XmlUtils,
-  com.google.android.rcs.client.utils.QueuedWork
-are licensed under Apache v2.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-===============================================================================
-
-These components
-  com.google.android.rcs.core.utils.FastBase64,
-  com.google.android.rcs.core.utils.LibraryLoaderHelper
-are licensed under BSD.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-   * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-   * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-
-   * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
 libphonenumber:
 
                                  Apache License
@@ -10600,371 +10316,6 @@
    END OF TERMS AND CONDITIONS
 
 
-mime4j:
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-   
-   
-   
-
-   THIS PRODUCT ALSO INCLUDES THIRD PARTY SOFTWARE REDISTRIBUTED UNDER THE
-   FOLLOWING LICENSES:
-
- Apache Commons Logging, 
-    The Apache Software License, Version 1.1 (commons-logging-1.1.1.jar)
-   
-   The Apache Software License, Version 1.1
-  
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-  
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-  
-   2. Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in
-      the documentation and/or other materials provided with the
-      distribution.
-  
-   3. The end-user documentation included with the redistribution,
-      if any, must include the following acknowledgment:
-         "This product includes software developed by the
-          Apache Software Foundation (http://www.apache.org/)."
-      Alternately, this acknowledgment may appear in the software itself,
-      if and wherever such third-party acknowledgments normally appear.
-  
-   4. The names "Apache" and "Apache Software Foundation" must
-      not be used to endorse or promote products derived from this
-      software without prior written permission. For written
-      permission, please contact apache@apache.org.
-  
-   5. Products derived from this software may not be called "Apache",
-      nor may "Apache" appear in their name, without prior written
-      permission of the Apache Software Foundation.
-  
-   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
-   ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-   SUCH DAMAGE.
-  
-
- Test messages from the Perl-MIME-Tools project,
- 
-      The "Artistic License"
-  
-      Preamble
-  
-  The intent of this document is to state the conditions under which a
-  Package may be copied, such that the Copyright Holder maintains some
-  semblance of artistic control over the development of the package,
-  while giving the users of the package the right to use and distribute
-  the Package in a more-or-less customary fashion, plus the right to make
-  reasonable modifications.
-  
-  Definitions:
-  
-   "Package" refers to the collection of files distributed by the
-   Copyright Holder, and derivatives of that collection of files
-   created through textual modification.
-  
-   "Standard Version" refers to such a Package if it has not been
-   modified, or has been modified in accordance with the wishes
-   of the Copyright Holder as specified below.
-  
-   "Copyright Holder" is whoever is named in the copyright or
-   copyrights for the package.
-  
-   "You" is you, if you're thinking about copying or distributing
-   this Package.
-  
-   "Reasonable copying fee" is whatever you can justify on the
-   basis of media cost, duplication charges, time of people involved,
-   and so on.  (You will not be required to justify it to the
-   Copyright Holder, but only to the computing community at large
-   as a market that must bear the fee.)
-  
-   "Freely Available" means that no fee is charged for the item
-   itself, though there may be fees involved in handling the item.
-   It also means that recipients of the item may redistribute it
-   under the same conditions they received it.
-  
-  1. You may make and give away verbatim copies of the source form of the
-  Standard Version of this Package without restriction, provided that you
-  duplicate all of the original copyright notices and associated disclaimers.
-  
-  2. You may apply bug fixes, portability fixes and other modifications
-  derived from the Public Domain or from the Copyright Holder.  A Package
-  modified in such a way shall still be considered the Standard Version.
-  
-  3. You may otherwise modify your copy of this Package in any way, provided
-  that you insert a prominent notice in each changed file stating how and
-  when you changed that file, and provided that you do at least ONE of the
-  following:
-  
-      a) place your modifications in the Public Domain or otherwise make them
-      Freely Available, such as by posting said modifications to Usenet or
-      an equivalent medium, or placing the modifications on a major archive
-      site such as uunet.uu.net, or by allowing the Copyright Holder to include
-      your modifications in the Standard Version of the Package.
-  
-      b) use the modified Package only within your corporation or organization.
-  
-      c) rename any non-standard executables so the names do not conflict
-      with standard executables, which must also be provided, and provide
-      a separate manual page for each non-standard executable that clearly
-      documents how it differs from the Standard Version.
-  
-      d) make other distribution arrangements with the Copyright Holder.
-  
-  4. You may distribute the programs of this Package in object code or
-  executable form, provided that you do at least ONE of the following:
-  
-      a) distribute a Standard Version of the executables and library files,
-      together with instructions (in the manual page or equivalent) on where
-      to get the Standard Version.
-  
-      b) accompany the distribution with the machine-readable source of
-      the Package with your modifications.
-  
-      c) give non-standard executables non-standard names, and clearly
-      document the differences in manual pages (or equivalent), together
-      with instructions on where to get the Standard Version.
-  
-      d) make other distribution arrangements with the Copyright Holder.
-  
-  5. You may charge a reasonable copying fee for any distribution of this
-  Package.  You may charge any fee you choose for support of this
-  Package.  You may not charge a fee for this Package itself.  However,
-  you may distribute this Package in aggregate with other (possibly
-  commercial) programs as part of a larger (possibly commercial) software
-  distribution provided that you do not advertise this Package as a
-  product of your own.  You may embed this Package's interpreter within
-  an executable of yours (by linking); this shall be construed as a mere
-  form of aggregation, provided that the complete Standard Version of the
-  interpreter is so embedded.
-  
-  6. The scripts and library files supplied as input to or produced as
-  output from the programs of this Package do not automatically fall
-  under the copyright of this Package, but belong to whoever generated
-  them, and may be sold commercially, and may be aggregated with this
-  Package.  If such scripts or library files are aggregated with this
-  Package via the so-called "undump" or "unexec" methods of producing a
-  binary executable image, then distribution of such an image shall
-  neither be construed as a distribution of this Package nor shall it
-  fall under the restrictions of Paragraphs 3 and 4, provided that you do
-  not represent such an executable image as a Standard Version of this
-  Package.
-  
-  7. C subroutines (or comparably compiled subroutines in other
-  languages) supplied by you and linked into this Package in order to
-  emulate subroutines and variables of the language defined by this
-  Package shall not be considered part of this Package, but are the
-  equivalent of input as in Paragraph 6, provided these subroutines do
-  not change the language in any way that would cause it to fail the
-  regression tests for the language.
-  
-  8. Aggregation of this Package with a commercial distribution is always
-  permitted provided that the use of this Package is embedded; that is,
-  when no overt attempt is made to make this Package's interfaces visible
-  to the end user of the commercial distribution.  Such use shall not be
-  construed as a distribution of this Package.
-  
-  9. The name of the Copyright Holder may not be used to endorse or promote
-  products derived from this software without specific prior written permission.
-  
-  10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-  WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-  
-      The End
-
- 
- 
-
 shortcutbadger:
 
 Licensed under the Apache License, Version 2.0 (the "License");
@@ -11429,11 +10780,101 @@
 April 10, 2009
 
 
-Checker Framework:
+Animal Sniffer:
 
-The Checker Framework is licensed under the GNU General Public License,
-version 2 (GPL2), with the classpath exception.  The text of this license
-appears below.  This is the same license used for OpenJDK.
+The MIT License
+
+Copyright (c) 2008 Kohsuke Kawaguchi and codehaus.org.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+JSR 305:
+
+Copyright (c) 2007-2009, JSR305 expert group
+All rights reserved.
+
+http://www.opensource.org/licenses/bsd-license.php
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, 
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, 
+      this list of conditions and the following disclaimer in the documentation 
+      and/or other materials provided with the distribution.
+    * Neither the name of the JSR305 expert group nor the names of its 
+      contributors may be used to endorse or promote products derived from 
+      this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+POSSIBILITY OF SUCH DAMAGE.
+
+
+Protobuf Nano:
+
+Copyright 2008, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+    * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Code generated by the Protocol Buffer compiler is owned by the owner
+of the input file used when generating it.  This code is not
+standalone and requires a support library to be linked with it.  This
+support library is itself covered by the above license.
+
+
+Checker Framework Annotations:
 
 A few parts of the Checker Framework have more permissive licenses.
 
@@ -11446,384 +10887,6 @@
    third-party annotations, which the Checker Framework recognizes as
    aliases for its own annotations, are licensed under the MIT License.
 
- * The Maven plugin is dual-licensed (you may use whichever you prefer)
-   under GPL2 and the Apache License, version 2.0 (Apache2).  The text of
-   Apache2 appears in file maven-plugin/LICENSE.txt.  Maven itself uses
-   Apache2.
-
- * The Eclipse plugin is dual-licensed (you may use whichever you prefer)
-   under GPL2 and the Eclipse Public License Version 1.0 (EPL).  EPL
-   appears http://www.eclipse.org/org/documents/epl-v10.php.  Eclipse
-   itself uses EPL.
-
-Some external libraries that are included with the Checker Framework have
-different licenses.
-
- * javaparser is licensed under the LGPL.  (The javaparser source code
-   contains a file with the text of the GPL, but it is not clear why, since
-   javaparser does not use the GPL.)  See file javaparser/COPYING.LESSER
-   and the source code of all its files.
-
- * junit is licensed under the Common Public License v1.0 (see
-   http://www.junit.org/license), with parts (Hamcrest) licensed under the
-   BSD License (see LICENSE.txt in checkers/tests/junit.jar ).
-
- * plume-lib is licensed under the MIT License.
-
-The Checker Framework includes annotations for several libraries, in
-directory checkers/jdk/.  The only one that uses a different license than
-the GPL is Google Guava, which uses Apache2.
-
-===========================================================================
-
-The GNU General Public License (GPL)
-
-Version 2, June 1991
-
-Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Everyone is permitted to copy and distribute verbatim copies of this license
-document, but changing it is not allowed.
-
-Preamble
-
-The licenses for most software are designed to take away your freedom to share
-and change it.  By contrast, the GNU General Public License is intended to
-guarantee your freedom to share and change free software--to make sure the
-software is free for all its users.  This General Public License applies to
-most of the Free Software Foundation's software and to any other program whose
-authors commit to using it.  (Some other Free Software Foundation software is
-covered by the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
-When we speak of free software, we are referring to freedom, not price.  Our
-General Public Licenses are designed to make sure that you have the freedom to
-distribute copies of free software (and charge for this service if you wish),
-that you receive source code or can get it if you want it, that you can change
-the software or use pieces of it in new free programs; and that you know you
-can do these things.
-
-To protect your rights, we need to make restrictions that forbid anyone to deny
-you these rights or to ask you to surrender the rights.  These restrictions
-translate to certain responsibilities for you if you distribute copies of the
-software, or if you modify it.
-
-For example, if you distribute copies of such a program, whether gratis or for
-a fee, you must give the recipients all the rights that you have.  You must
-make sure that they, too, receive or can get the source code.  And you must
-show them these terms so they know their rights.
-
-We protect your rights with two steps: (1) copyright the software, and (2)
-offer you this license which gives you legal permission to copy, distribute
-and/or modify the software.
-
-Also, for each author's protection and ours, we want to make certain that
-everyone understands that there is no warranty for this free software.  If the
-software is modified by someone else and passed on, we want its recipients to
-know that what they have is not the original, so that any problems introduced
-by others will not reflect on the original authors' reputations.
-
-Finally, any free program is threatened constantly by software patents.  We
-wish to avoid the danger that redistributors of a free program will
-individually obtain patent licenses, in effect making the program proprietary.
-To prevent this, we have made it clear that any patent must be licensed for
-everyone's free use or not licensed at all.
-
-The precise terms and conditions for copying, distribution and modification
-follow.
-
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-0. This License applies to any program or other work which contains a notice
-placed by the copyright holder saying it may be distributed under the terms of
-this General Public License.  The "Program", below, refers to any such program
-or work, and a "work based on the Program" means either the Program or any
-derivative work under copyright law: that is to say, a work containing the
-Program or a portion of it, either verbatim or with modifications and/or
-translated into another language.  (Hereinafter, translation is included
-without limitation in the term "modification".) Each licensee is addressed as
-"you".
-
-Activities other than copying, distribution and modification are not covered by
-this License; they are outside its scope.  The act of running the Program is
-not restricted, and the output from the Program is covered only if its contents
-constitute a work based on the Program (independent of having been made by
-running the Program).  Whether that is true depends on what the Program does.
-
-1. You may copy and distribute verbatim copies of the Program's source code as
-you receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and give any other recipients of the
-Program a copy of this License along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and you may
-at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Program or any portion of it, thus
-forming a work based on the Program, and copy and distribute such modifications
-or work under the terms of Section 1 above, provided that you also meet all of
-these conditions:
-
-    a) You must cause the modified files to carry prominent notices stating
-    that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in whole or
-    in part contains or is derived from the Program or any part thereof, to be
-    licensed as a whole at no charge to all third parties under the terms of
-    this License.
-
-    c) If the modified program normally reads commands interactively when run,
-    you must cause it, when started running for such interactive use in the
-    most ordinary way, to print or display an announcement including an
-    appropriate copyright notice and a notice that there is no warranty (or
-    else, saying that you provide a warranty) and that users may redistribute
-    the program under these conditions, and telling the user how to view a copy
-    of this License.  (Exception: if the Program itself is interactive but does
-    not normally print such an announcement, your work based on the Program is
-    not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If identifiable
-sections of that work are not derived from the Program, and can be reasonably
-considered independent and separate works in themselves, then this License, and
-its terms, do not apply to those sections when you distribute them as separate
-works.  But when you distribute the same sections as part of a whole which is a
-work based on the Program, the distribution of the whole must be on the terms
-of this License, whose permissions for other licensees extend to the entire
-whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your
-rights to work written entirely by you; rather, the intent is to exercise the
-right to control the distribution of derivative or collective works based on
-the Program.
-
-In addition, mere aggregation of another work not based on the Program with the
-Program (or with a work based on the Program) on a volume of a storage or
-distribution medium does not bring the other work under the scope of this
-License.
-
-3. You may copy and distribute the Program (or a work based on it, under
-Section 2) in object code or executable form under the terms of Sections 1 and
-2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable source
-    code, which must be distributed under the terms of Sections 1 and 2 above
-    on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three years, to
-    give any third party, for a charge no more than your cost of physically
-    performing source distribution, a complete machine-readable copy of the
-    corresponding source code, to be distributed under the terms of Sections 1
-    and 2 above on a medium customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer to
-    distribute corresponding source code.  (This alternative is allowed only
-    for noncommercial distribution and only if you received the program in
-    object code or executable form with such an offer, in accord with
-    Subsection b above.)
-
-The source code for a work means the preferred form of the work for making
-modifications to it.  For an executable work, complete source code means all
-the source code for all modules it contains, plus any associated interface
-definition files, plus the scripts used to control compilation and installation
-of the executable.  However, as a special exception, the source code
-distributed need not include anything that is normally distributed (in either
-source or binary form) with the major components (compiler, kernel, and so on)
-of the operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the source
-code from the same place counts as distribution of the source code, even though
-third parties are not compelled to copy the source along with the object code.
-
-4. You may not copy, modify, sublicense, or distribute the Program except as
-expressly provided under this License.  Any attempt otherwise to copy, modify,
-sublicense or distribute the Program is void, and will automatically terminate
-your rights under this License.  However, parties who have received copies, or
-rights, from you under this License will not have their licenses terminated so
-long as such parties remain in full compliance.
-
-5. You are not required to accept this License, since you have not signed it.
-However, nothing else grants you permission to modify or distribute the Program
-or its derivative works.  These actions are prohibited by law if you do not
-accept this License.  Therefore, by modifying or distributing the Program (or
-any work based on the Program), you indicate your acceptance of this License to
-do so, and all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-6. Each time you redistribute the Program (or any work based on the Program),
-the recipient automatically receives a license from the original licensor to
-copy, distribute or modify the Program subject to these terms and conditions.
-You may not impose any further restrictions on the recipients' exercise of the
-rights granted herein.  You are not responsible for enforcing compliance by
-third parties to this License.
-
-7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues), conditions
-are imposed on you (whether by court order, agreement or otherwise) that
-contradict the conditions of this License, they do not excuse you from the
-conditions of this License.  If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Program at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Program by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system, which is implemented by public license practices.  Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose that
-choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-8. If the distribution and/or use of the Program is restricted in certain
-countries either by patents or by copyrighted interfaces, the original
-copyright holder who places the Program under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded.  In
-such case, this License incorporates the limitation as if written in the body
-of this License.
-
-9. The Free Software Foundation may publish revised and/or new versions of the
-General Public License from time to time.  Such new versions will be similar in
-spirit to the present version, but may differ in detail to address new problems
-or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any later
-version", you have the option of following the terms and conditions either of
-that version or of any later version published by the Free Software Foundation.
-If the Program does not specify a version number of this License, you may
-choose any version ever published by the Free Software Foundation.
-
-10. If you wish to incorporate parts of the Program into other free programs
-whose distribution conditions are different, write to the author to ask for
-permission.  For software which is copyrighted by the Free Software Foundation,
-write to the Free Software Foundation; we sometimes make exceptions for this.
-Our decision will be guided by the two goals of preserving the free status of
-all derivatives of our free software and of promoting the sharing and reuse of
-software generally.
-
-NO WARRANTY
-
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
-THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
-PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE,
-YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
-ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
-PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
-INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
-BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
-OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-END OF TERMS AND CONDITIONS
-
-How to Apply These Terms to Your New Programs
-
-If you develop a new program, and you want it to be of the greatest possible
-use to the public, the best way to achieve this is to make it free software
-which everyone can redistribute and change under these terms.
-
-To do so, attach the following notices to the program.  It is safest to attach
-them to the start of each source file to most effectively convey the exclusion
-of warranty; and each file should have at least the "copyright" line and a
-pointer to where the full notice is found.
-
-    One line to give the program's name and a brief idea of what it does.
-
-    Copyright (C) <year> <name of author>
-
-    This program is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the Free
-    Software Foundation; either version 2 of the License, or (at your option)
-    any later version.
-
-    This program is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-    more details.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc., 59
-    Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this when it
-starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
-    with ABSOLUTELY NO WARRANTY; for details type 'show w'.  This is free
-    software, and you are welcome to redistribute it under certain conditions;
-    type 'show c' for details.
-
-The hypothetical commands 'show w' and 'show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may be
-called something other than 'show w' and 'show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.  Here
-is a sample; alter the names:
-
-    Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-    'Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-    signature of Ty Coon, 1 April 1989
-
-    Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General Public
-License instead of this License.
-
-
-"CLASSPATH" EXCEPTION TO THE GPL
-
-Certain source files distributed by Oracle America and/or its affiliates are
-subject to the following clarification and special exception to the GPL, but
-only where Oracle has expressly included in the particular source file's header
-the words "Oracle designates this particular file as subject to the "Classpath"
-exception as provided by Oracle in the LICENSE file that accompanied this code."
-
-    Linking this library statically or dynamically with other modules is making
-    a combined work based on this library.  Thus, the terms and conditions of
-    the GNU General Public License cover the whole combination.
-
-    As a special exception, the copyright holders of this library give you
-    permission to link this library with independent modules to produce an
-    executable, regardless of the license terms of these independent modules,
-    and to copy and distribute the resulting executable under terms of your
-    choice, provided that you also meet, for each linked independent module,
-    the terms and conditions of the license of that module.  An independent
-    module is a module which is not derived from or based on this library.  If
-    you modify this library, you may extend this exception to your version of
-    the library, but you are not obligated to do so.  If you do not wish to do
-    so, delete this exception statement from your version.
-
 ===========================================================================
 
 MIT License:
@@ -11849,31 +10912,6 @@
 ===========================================================================
 
 
-Animal Sniffer:
-
-The MIT License
-
-Copyright (c) 2008 Kohsuke Kawaguchi and codehaus.org.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-
 Glide:
 
 Covers library/
@@ -11974,33 +11012,845 @@
 that this copyright notice remain intact.
 
 
-JSR 305:
+carrierservices:
 
-Copyright (c) 2007-2009, JSR305 expert group
-All rights reserved.
+These components
+  com.google.android.rcs.core,
+  com.google.android.rcs.core.utils.CaseInsensitiveMap,
+  com.google.android.rcs.core.utils.DateTime,
+  com.google.android.rcs.core.utils.InetAddresses,
+  com.google.android.rcs.core.network.ConnectivityMonitor,
+  com.google.android.rcs.client.PrivateDataStorage,
+  com.google.android.rcs.client.utils.FastXmlSerializer,
+  com.google.android.rcs.client.utils.XmlUtils,
+  com.google.android.rcs.client.utils.QueuedWork
+are licensed under Apache v2.
 
-http://www.opensource.org/licenses/bsd-license.php
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
 
-Redistribution and use in source and binary forms, with or without 
-modification, are permitted provided that the following conditions are met:
+    http://www.apache.org/licenses/LICENSE-2.0
 
-    * Redistributions of source code must retain the above copyright notice, 
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, 
-      this list of conditions and the following disclaimer in the documentation 
-      and/or other materials provided with the distribution.
-    * Neither the name of the JSR305 expert group nor the names of its 
-      contributors may be used to endorse or promote products derived from 
-      this software without specific prior written permission.
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
-POSSIBILITY OF SUCH DAMAGE.
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+===============================================================================
+
+These components
+  com.google.android.rcs.core.utils.FastBase64,
+  com.google.android.rcs.core.utils.LibraryLoaderHelper
+are licensed under BSD.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+   * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+   * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+
+   * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+jibercsclient:
+
+These components
+  com.google.android.rcs.core,
+  com.google.android.rcs.core.utils.CaseInsensitiveMap,
+  com.google.android.rcs.core.utils.DateTime,
+  com.google.android.rcs.core.utils.InetAddresses,
+  com.google.android.rcs.core.network.ConnectivityMonitor,
+  com.google.android.rcs.client.PrivateDataStorage,
+  com.google.android.rcs.client.utils.FastXmlSerializer,
+  com.google.android.rcs.client.utils.XmlUtils,
+  com.google.android.rcs.client.utils.QueuedWork
+are licensed under Apache v2.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+===============================================================================
+
+These components
+  com.google.android.rcs.core.utils.FastBase64,
+  com.google.android.rcs.core.utils.LibraryLoaderHelper
+are licensed under BSD.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+   * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+   * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+
+   * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+mime4j:
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+   
+   
+   
+
+   THIS PRODUCT ALSO INCLUDES THIRD PARTY SOFTWARE REDISTRIBUTED UNDER THE
+   FOLLOWING LICENSES:
+
+ Apache Commons Logging, 
+    The Apache Software License, Version 1.1 (commons-logging-1.1.1.jar)
+   
+   The Apache Software License, Version 1.1
+  
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+  
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+  
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in
+      the documentation and/or other materials provided with the
+      distribution.
+  
+   3. The end-user documentation included with the redistribution,
+      if any, must include the following acknowledgment:
+         "This product includes software developed by the
+          Apache Software Foundation (http://www.apache.org/)."
+      Alternately, this acknowledgment may appear in the software itself,
+      if and wherever such third-party acknowledgments normally appear.
+  
+   4. The names "Apache" and "Apache Software Foundation" must
+      not be used to endorse or promote products derived from this
+      software without prior written permission. For written
+      permission, please contact apache@apache.org.
+  
+   5. Products derived from this software may not be called "Apache",
+      nor may "Apache" appear in their name, without prior written
+      permission of the Apache Software Foundation.
+  
+   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+   DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+   ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+   SUCH DAMAGE.
+  
+
+ Test messages from the Perl-MIME-Tools project,
+ 
+      The "Artistic License"
+  
+      Preamble
+  
+  The intent of this document is to state the conditions under which a
+  Package may be copied, such that the Copyright Holder maintains some
+  semblance of artistic control over the development of the package,
+  while giving the users of the package the right to use and distribute
+  the Package in a more-or-less customary fashion, plus the right to make
+  reasonable modifications.
+  
+  Definitions:
+  
+   "Package" refers to the collection of files distributed by the
+   Copyright Holder, and derivatives of that collection of files
+   created through textual modification.
+  
+   "Standard Version" refers to such a Package if it has not been
+   modified, or has been modified in accordance with the wishes
+   of the Copyright Holder as specified below.
+  
+   "Copyright Holder" is whoever is named in the copyright or
+   copyrights for the package.
+  
+   "You" is you, if you're thinking about copying or distributing
+   this Package.
+  
+   "Reasonable copying fee" is whatever you can justify on the
+   basis of media cost, duplication charges, time of people involved,
+   and so on.  (You will not be required to justify it to the
+   Copyright Holder, but only to the computing community at large
+   as a market that must bear the fee.)
+  
+   "Freely Available" means that no fee is charged for the item
+   itself, though there may be fees involved in handling the item.
+   It also means that recipients of the item may redistribute it
+   under the same conditions they received it.
+  
+  1. You may make and give away verbatim copies of the source form of the
+  Standard Version of this Package without restriction, provided that you
+  duplicate all of the original copyright notices and associated disclaimers.
+  
+  2. You may apply bug fixes, portability fixes and other modifications
+  derived from the Public Domain or from the Copyright Holder.  A Package
+  modified in such a way shall still be considered the Standard Version.
+  
+  3. You may otherwise modify your copy of this Package in any way, provided
+  that you insert a prominent notice in each changed file stating how and
+  when you changed that file, and provided that you do at least ONE of the
+  following:
+  
+      a) place your modifications in the Public Domain or otherwise make them
+      Freely Available, such as by posting said modifications to Usenet or
+      an equivalent medium, or placing the modifications on a major archive
+      site such as uunet.uu.net, or by allowing the Copyright Holder to include
+      your modifications in the Standard Version of the Package.
+  
+      b) use the modified Package only within your corporation or organization.
+  
+      c) rename any non-standard executables so the names do not conflict
+      with standard executables, which must also be provided, and provide
+      a separate manual page for each non-standard executable that clearly
+      documents how it differs from the Standard Version.
+  
+      d) make other distribution arrangements with the Copyright Holder.
+  
+  4. You may distribute the programs of this Package in object code or
+  executable form, provided that you do at least ONE of the following:
+  
+      a) distribute a Standard Version of the executables and library files,
+      together with instructions (in the manual page or equivalent) on where
+      to get the Standard Version.
+  
+      b) accompany the distribution with the machine-readable source of
+      the Package with your modifications.
+  
+      c) give non-standard executables non-standard names, and clearly
+      document the differences in manual pages (or equivalent), together
+      with instructions on where to get the Standard Version.
+  
+      d) make other distribution arrangements with the Copyright Holder.
+  
+  5. You may charge a reasonable copying fee for any distribution of this
+  Package.  You may charge any fee you choose for support of this
+  Package.  You may not charge a fee for this Package itself.  However,
+  you may distribute this Package in aggregate with other (possibly
+  commercial) programs as part of a larger (possibly commercial) software
+  distribution provided that you do not advertise this Package as a
+  product of your own.  You may embed this Package's interpreter within
+  an executable of yours (by linking); this shall be construed as a mere
+  form of aggregation, provided that the complete Standard Version of the
+  interpreter is so embedded.
+  
+  6. The scripts and library files supplied as input to or produced as
+  output from the programs of this Package do not automatically fall
+  under the copyright of this Package, but belong to whoever generated
+  them, and may be sold commercially, and may be aggregated with this
+  Package.  If such scripts or library files are aggregated with this
+  Package via the so-called "undump" or "unexec" methods of producing a
+  binary executable image, then distribution of such an image shall
+  neither be construed as a distribution of this Package nor shall it
+  fall under the restrictions of Paragraphs 3 and 4, provided that you do
+  not represent such an executable image as a Standard Version of this
+  Package.
+  
+  7. C subroutines (or comparably compiled subroutines in other
+  languages) supplied by you and linked into this Package in order to
+  emulate subroutines and variables of the language defined by this
+  Package shall not be considered part of this Package, but are the
+  equivalent of input as in Paragraph 6, provided these subroutines do
+  not change the language in any way that would cause it to fail the
+  regression tests for the language.
+  
+  8. Aggregation of this Package with a commercial distribution is always
+  permitted provided that the use of this Package is embedded; that is,
+  when no overt attempt is made to make this Package's interfaces visible
+  to the end user of the commercial distribution.  Such use shall not be
+  construed as a distribution of this Package.
+  
+  9. The name of the Copyright Holder may not be used to endorse or promote
+  products derived from this software without specific prior written permission.
+  
+  10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+  WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+  
+      The End
+
+ 
+ 
\ No newline at end of file
diff --git a/java/com/android/dialer/app/list/PhoneFavoriteTileView.java b/java/com/android/dialer/app/list/PhoneFavoriteTileView.java
index 30b8464..f9f8e0e 100644
--- a/java/com/android/dialer/app/list/PhoneFavoriteTileView.java
+++ b/java/com/android/dialer/app/list/PhoneFavoriteTileView.java
@@ -18,6 +18,8 @@
 
 import android.content.ClipData;
 import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Point;
 import android.net.Uri;
 import android.provider.ContactsContract.PinnedPositions;
 import android.text.TextUtils;
@@ -77,15 +79,12 @@
     shadowOverlay = findViewById(R.id.shadow_overlay);
 
     setOnLongClickListener(
-        new OnLongClickListener() {
-          @Override
-          public boolean onLongClick(View v) {
-            final PhoneFavoriteTileView view = (PhoneFavoriteTileView) v;
-            // NOTE The drag shadow is handled in the ListView.
-            view.startDrag(
-                EMPTY_CLIP_DATA, new View.DragShadowBuilder(), DRAG_PHONE_FAVORITE_TILE, 0);
-            return true;
-          }
+        (v) -> {
+          final PhoneFavoriteTileView view = (PhoneFavoriteTileView) v;
+          // NOTE The drag shadow is handled in the ListView.
+          view.startDragAndDrop(
+              EMPTY_CLIP_DATA, new EmptyDragShadowBuilder(), DRAG_PHONE_FAVORITE_TILE, 0);
+          return true;
         });
   }
 
@@ -207,4 +206,23 @@
     loader.registerListener(0, (loader1, contact) -> loader.reset());
     loader.startLoading();
   }
+
+  /**
+   * A {@link View.DragShadowBuilder} that doesn't draw anything. An object of this class should be
+   * passed to {@link View#startDragAndDrop} to prevent the framework from drawing a drag shadow.
+   */
+  public static class EmptyDragShadowBuilder extends View.DragShadowBuilder {
+
+    @Override
+    public void onProvideShadowMetrics(Point size, Point touch) {
+      // A workaround for P+ not accepting non-positive drag shadow sizes.
+      size.set(1, 1);
+      touch.set(0, 0);
+    }
+
+    @Override
+    public void onDrawShadow(Canvas canvas) {
+      // Don't draw anything
+    }
+  }
 }
diff --git a/java/com/android/dialer/app/settings/DialerSettingsActivity.java b/java/com/android/dialer/app/settings/DialerSettingsActivity.java
index 9cd01b6..d9bcd6b 100644
--- a/java/com/android/dialer/app/settings/DialerSettingsActivity.java
+++ b/java/com/android/dialer/app/settings/DialerSettingsActivity.java
@@ -116,9 +116,7 @@
         (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
 
     // "Call Settings" (full settings) is shown if the current user is primary user and there
-    // is only one SIM. Before N, "Calling accounts" setting is shown if the current user is
-    // primary user and there are multiple SIMs. In N+, "Calling accounts" is shown whenever
-    // "Call Settings" is not shown.
+    // is only one SIM. Otherwise, "Calling accounts" is shown.
     boolean isPrimaryUser = isPrimaryUser();
     if (isPrimaryUser && TelephonyManagerCompat.getPhoneCount(telephonyManager) <= 1) {
       Header callSettingsHeader = new Header();
@@ -128,7 +126,7 @@
       callSettingsHeader.titleRes = R.string.call_settings_label;
       callSettingsHeader.intent = callSettingsIntent;
       target.add(callSettingsHeader);
-    } else if (isPrimaryUser) {
+    } else {
       Header phoneAccountSettingsHeader = new Header();
       Intent phoneAccountSettingsIntent = new Intent(TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS);
       phoneAccountSettingsIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
diff --git a/java/com/android/dialer/calllog/database/Coalescer.java b/java/com/android/dialer/calllog/database/Coalescer.java
index 903b7e2..2ad9f9a 100644
--- a/java/com/android/dialer/calllog/database/Coalescer.java
+++ b/java/com/android/dialer/calllog/database/Coalescer.java
@@ -15,11 +15,9 @@
  */
 package com.android.dialer.calllog.database;
 
-import android.content.ContentValues;
 import android.database.Cursor;
 import android.provider.CallLog.Calls;
 import android.support.annotation.NonNull;
-import android.support.annotation.VisibleForTesting;
 import android.support.annotation.WorkerThread;
 import android.telecom.PhoneAccountHandle;
 import android.text.TextUtils;
@@ -27,9 +25,6 @@
 import com.android.dialer.DialerPhoneNumber;
 import com.android.dialer.NumberAttributes;
 import com.android.dialer.calllog.database.contract.AnnotatedCallLogContract.AnnotatedCallLog;
-import com.android.dialer.calllog.database.contract.AnnotatedCallLogContract.CoalescedAnnotatedCallLog;
-import com.android.dialer.calllog.datasources.CallLogDataSource;
-import com.android.dialer.calllog.datasources.DataSources;
 import com.android.dialer.calllog.model.CoalescedRow;
 import com.android.dialer.common.Assert;
 import com.android.dialer.common.concurrent.Annotations.BackgroundExecutor;
@@ -38,35 +33,24 @@
 import com.android.dialer.metrics.Metrics;
 import com.android.dialer.phonenumberproto.DialerPhoneNumberUtil;
 import com.android.dialer.telecom.TelecomUtil;
-import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.protobuf.InvalidProtocolBufferException;
-import java.util.ArrayList;
-import java.util.List;
 import java.util.Objects;
 import javax.inject.Inject;
 
-/**
- * Coalesces rows in {@link AnnotatedCallLog} by combining adjacent rows.
- *
- * <p>Applies the logic that determines which adjacent rows should be coalesced, and then delegates
- * to each data source to determine how individual columns should be aggregated.
- */
+/** Combines adjacent rows in {@link AnnotatedCallLog}. */
 public class Coalescer {
 
-  private final DataSources dataSources;
   private final FutureTimer futureTimer;
   private final ListeningExecutorService backgroundExecutorService;
 
   @Inject
   Coalescer(
       @BackgroundExecutor ListeningExecutorService backgroundExecutorService,
-      DataSources dataSources,
       FutureTimer futureTimer) {
     this.backgroundExecutorService = backgroundExecutorService;
-    this.dataSources = dataSources;
     this.futureTimer = futureTimer;
   }
 
@@ -108,256 +92,249 @@
       return ImmutableList.of();
     }
 
-    // Note: This method relies on rowsShouldBeCombined to determine which rows should be combined,
-    // but delegates to data sources to actually aggregate column values.
-
-    DialerPhoneNumberUtil dialerPhoneNumberUtil = new DialerPhoneNumberUtil();
-
     ImmutableList.Builder<CoalescedRow> coalescedRowListBuilder = new ImmutableList.Builder<>();
 
-    int coalescedRowId = 0;
+    RowCombiner rowCombiner = new RowCombiner(allAnnotatedCallLogRowsSortedByTimestampDesc);
+    rowCombiner.startNewGroup();
 
-    // TODO(a bug): Avoid using ContentValues as it doesn't make sense here.
-    List<ContentValues> currentRowGroup = new ArrayList<>();
+    long coalescedRowId = 0;
+    do {
+      boolean isRowMerged = rowCombiner.mergeRow(allAnnotatedCallLogRowsSortedByTimestampDesc);
 
-    ContentValues firstRow = cursorRowToContentValues(allAnnotatedCallLogRowsSortedByTimestampDesc);
-    currentRowGroup.add(firstRow);
-
-    while (!currentRowGroup.isEmpty()) {
-      // Group consecutive rows
-      ContentValues firstRowInGroup = currentRowGroup.get(0);
-      ContentValues currentRow = null;
-      while (allAnnotatedCallLogRowsSortedByTimestampDesc.moveToNext()) {
-        currentRow = cursorRowToContentValues(allAnnotatedCallLogRowsSortedByTimestampDesc);
-
-        if (!rowsShouldBeCombined(dialerPhoneNumberUtil, firstRowInGroup, currentRow)) {
-          break;
-        }
-
-        currentRowGroup.add(currentRow);
+      if (isRowMerged) {
+        allAnnotatedCallLogRowsSortedByTimestampDesc.moveToNext();
       }
 
-      // Coalesce the group into a single row
-      ContentValues coalescedRow = coalesceRowsForAllDataSources(currentRowGroup);
-      coalescedRow.put(CoalescedAnnotatedCallLog._ID, coalescedRowId++);
-      coalescedRow.put(
-          CoalescedAnnotatedCallLog.COALESCED_IDS, getCoalescedIds(currentRowGroup).toByteArray());
-      coalescedRowListBuilder.add(toCoalescedRowProto(coalescedRow));
-
-      // Clear the current group after the rows are coalesced.
-      currentRowGroup.clear();
-
-      // Add the first of the remaining rows to the current group.
-      if (!allAnnotatedCallLogRowsSortedByTimestampDesc.isAfterLast()) {
-        currentRowGroup.add(currentRow);
+      if (!isRowMerged || allAnnotatedCallLogRowsSortedByTimestampDesc.isAfterLast()) {
+        coalescedRowListBuilder.add(
+            rowCombiner.combine().toBuilder().setId(coalescedRowId++).build());
+        rowCombiner.startNewGroup();
       }
-    }
+    } while (!allAnnotatedCallLogRowsSortedByTimestampDesc.isAfterLast());
 
     return coalescedRowListBuilder.build();
   }
 
-  private static ContentValues cursorRowToContentValues(Cursor cursor) {
-    ContentValues values = new ContentValues();
-    String[] columns = cursor.getColumnNames();
-    int length = columns.length;
-    for (int i = 0; i < length; i++) {
-      if (cursor.getType(i) == Cursor.FIELD_TYPE_BLOB) {
-        values.put(columns[i], cursor.getBlob(i));
-      } else {
-        values.put(columns[i], cursor.getString(i));
-      }
-    }
-    return values;
-  }
+  /** Combines rows from {@link AnnotatedCallLog} into a {@link CoalescedRow}. */
+  private static final class RowCombiner {
+    private final CoalescedRow.Builder coalescedRowBuilder = CoalescedRow.newBuilder();
+    private final CoalescedIds.Builder coalescedIdsBuilder = CoalescedIds.newBuilder();
 
-  /**
-   * @param row1 a row from {@link AnnotatedCallLog}
-   * @param row2 a row from {@link AnnotatedCallLog}
-   */
-  private static boolean rowsShouldBeCombined(
-      DialerPhoneNumberUtil dialerPhoneNumberUtil, ContentValues row1, ContentValues row2) {
-    // Don't combine rows which don't use the same phone account.
-    PhoneAccountHandle phoneAccount1 =
-        TelecomUtil.composePhoneAccountHandle(
-            row1.getAsString(AnnotatedCallLog.PHONE_ACCOUNT_COMPONENT_NAME),
-            row1.getAsString(AnnotatedCallLog.PHONE_ACCOUNT_ID));
-    PhoneAccountHandle phoneAccount2 =
-        TelecomUtil.composePhoneAccountHandle(
-            row2.getAsString(AnnotatedCallLog.PHONE_ACCOUNT_COMPONENT_NAME),
-            row2.getAsString(AnnotatedCallLog.PHONE_ACCOUNT_ID));
-    if (!Objects.equals(phoneAccount1, phoneAccount2)) {
-      return false;
+    // Indexes for columns in AnnotatedCallLog
+    private final int idColumn;
+    private final int timestampColumn;
+    private final int numberColumn;
+    private final int formattedNumberColumn;
+    private final int numberPresentationColumn;
+    private final int isReadColumn;
+    private final int isNewColumn;
+    private final int geocodedLocationColumn;
+    private final int phoneAccountComponentNameColumn;
+    private final int phoneAccountIdColumn;
+    private final int featuresColumn;
+    private final int numberAttributesColumn;
+    private final int isVoicemailCallColumn;
+    private final int voicemailCallTagColumn;
+    private final int callTypeColumn;
+
+    // DialerPhoneNumberUtil will be created lazily as its instantiation is expensive.
+    private DialerPhoneNumberUtil dialerPhoneNumberUtil = null;
+
+    RowCombiner(Cursor annotatedCallLogRow) {
+      idColumn = annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog._ID);
+      timestampColumn = annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog.TIMESTAMP);
+      numberColumn = annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog.NUMBER);
+      formattedNumberColumn =
+          annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog.FORMATTED_NUMBER);
+      numberPresentationColumn =
+          annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog.NUMBER_PRESENTATION);
+      isReadColumn = annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog.IS_READ);
+      isNewColumn = annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog.NEW);
+      geocodedLocationColumn =
+          annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog.GEOCODED_LOCATION);
+      phoneAccountComponentNameColumn =
+          annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog.PHONE_ACCOUNT_COMPONENT_NAME);
+      phoneAccountIdColumn =
+          annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog.PHONE_ACCOUNT_ID);
+      featuresColumn = annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog.FEATURES);
+      numberAttributesColumn =
+          annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog.NUMBER_ATTRIBUTES);
+      isVoicemailCallColumn =
+          annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog.IS_VOICEMAIL_CALL);
+      voicemailCallTagColumn =
+          annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog.VOICEMAIL_CALL_TAG);
+      callTypeColumn = annotatedCallLogRow.getColumnIndexOrThrow(AnnotatedCallLog.CALL_TYPE);
     }
 
-    if (!row1.getAsInteger(AnnotatedCallLog.NUMBER_PRESENTATION)
-        .equals(row2.getAsInteger(AnnotatedCallLog.NUMBER_PRESENTATION))) {
-      return false;
+    /**
+     * Prepares {@link RowCombiner} for building a new group of rows by clearing information on all
+     * previously merged rows.
+     */
+    void startNewGroup() {
+      coalescedRowBuilder.clear();
+      coalescedIdsBuilder.clear();
     }
 
-    if (!meetsCallFeatureCriteria(row1, row2)) {
-      return false;
-    }
+    /**
+     * Merge the given {@link AnnotatedCallLog} row into the current group.
+     *
+     * @return true if the given row is merged.
+     */
+    boolean mergeRow(Cursor annotatedCallLogRow) {
+      Assert.checkArgument(annotatedCallLogRow.getInt(callTypeColumn) != Calls.VOICEMAIL_TYPE);
 
-    DialerPhoneNumber number1;
-    DialerPhoneNumber number2;
-    try {
-      byte[] number1Bytes = row1.getAsByteArray(AnnotatedCallLog.NUMBER);
-      byte[] number2Bytes = row2.getAsByteArray(AnnotatedCallLog.NUMBER);
-
-      if (number1Bytes == null || number2Bytes == null) {
-        // Empty numbers should not be combined.
+      if (!canMergeRow(annotatedCallLogRow)) {
         return false;
       }
 
-      number1 = DialerPhoneNumber.parseFrom(number1Bytes);
-      number2 = DialerPhoneNumber.parseFrom(number2Bytes);
-    } catch (InvalidProtocolBufferException e) {
-      throw Assert.createAssertionFailException("error parsing DialerPhoneNumber proto", e);
-    }
-    return dialerPhoneNumberUtil.isMatch(number1, number2);
-  }
+      // Set fields that don't use the most recent value.
+      //
+      // Currently there is only one such field: "features".
+      // If any call in a group includes a feature (like Wifi/HD), consider the group to have
+      // the feature.
+      coalescedRowBuilder.setFeatures(
+          coalescedRowBuilder.getFeatures() | annotatedCallLogRow.getInt(featuresColumn));
 
-  /**
-   * Returns true if column {@link AnnotatedCallLog#FEATURES} of the two given rows indicate that
-   * they can be coalesced.
-   */
-  private static boolean meetsCallFeatureCriteria(ContentValues row1, ContentValues row2) {
-    int row1Features = row1.getAsInteger(AnnotatedCallLog.FEATURES);
-    int row2Features = row2.getAsInteger(AnnotatedCallLog.FEATURES);
+      // Set fields that use the most recent value.
+      // Rows passed to Coalescer are already sorted in descending order of timestamp. If the
+      // coalesced ID list is not empty, it means RowCombiner has merged the most recent row in a
+      // group and there is no need to continue as we only set fields that use the most recent value
+      // from this point forward.
+      if (!coalescedIdsBuilder.getCoalescedIdList().isEmpty()) {
+        coalescedIdsBuilder.addCoalescedId(annotatedCallLogRow.getInt(idColumn));
+        return true;
+      }
 
-    // A row with FEATURES_ASSISTED_DIALING should not be combined with one without it.
-    if ((row1Features & TelephonyManagerCompat.FEATURES_ASSISTED_DIALING)
-        != (row2Features & TelephonyManagerCompat.FEATURES_ASSISTED_DIALING)) {
-      return false;
+      coalescedRowBuilder
+          .setTimestamp(annotatedCallLogRow.getLong(timestampColumn))
+          .setNumberPresentation(annotatedCallLogRow.getInt(numberPresentationColumn))
+          .setIsRead(annotatedCallLogRow.getInt(isReadColumn) == 1)
+          .setIsNew(annotatedCallLogRow.getInt(isNewColumn) == 1)
+          .setIsVoicemailCall(annotatedCallLogRow.getInt(isVoicemailCallColumn) == 1)
+          .setCallType(annotatedCallLogRow.getInt(callTypeColumn));
+
+      // Two different DialerPhoneNumbers could be combined if they are different but considered
+      // to be a match by libphonenumber; in this case we arbitrarily select the most recent one.
+      try {
+        coalescedRowBuilder.setNumber(
+            DialerPhoneNumber.parseFrom(annotatedCallLogRow.getBlob(numberColumn)));
+      } catch (InvalidProtocolBufferException e) {
+        throw Assert.createAssertionFailException("Unable to parse DialerPhoneNumber bytes", e);
+      }
+
+      String formattedNumber = annotatedCallLogRow.getString(formattedNumberColumn);
+      if (!TextUtils.isEmpty(formattedNumber)) {
+        coalescedRowBuilder.setFormattedNumber(formattedNumber);
+      }
+
+      String geocodedLocation = annotatedCallLogRow.getString(geocodedLocationColumn);
+      if (!TextUtils.isEmpty(geocodedLocation)) {
+        coalescedRowBuilder.setGeocodedLocation(geocodedLocation);
+      }
+
+      String phoneAccountComponentName =
+          annotatedCallLogRow.getString(phoneAccountComponentNameColumn);
+      if (!TextUtils.isEmpty(phoneAccountComponentName)) {
+        coalescedRowBuilder.setPhoneAccountComponentName(phoneAccountComponentName);
+      }
+
+      String phoneAccountId = annotatedCallLogRow.getString(phoneAccountIdColumn);
+      if (!TextUtils.isEmpty(phoneAccountId)) {
+        coalescedRowBuilder.setPhoneAccountId(phoneAccountId);
+      }
+
+      try {
+        coalescedRowBuilder.setNumberAttributes(
+            NumberAttributes.parseFrom(annotatedCallLogRow.getBlob(numberAttributesColumn)));
+      } catch (InvalidProtocolBufferException e) {
+        throw Assert.createAssertionFailException("Unable to parse NumberAttributes bytes", e);
+      }
+
+      String voicemailCallTag = annotatedCallLogRow.getString(voicemailCallTagColumn);
+      if (!TextUtils.isEmpty(voicemailCallTag)) {
+        coalescedRowBuilder.setVoicemailCallTag(voicemailCallTag);
+      }
+
+      coalescedIdsBuilder.addCoalescedId(annotatedCallLogRow.getInt(idColumn));
+      return true;
     }
 
-    // A video call should not be combined with one that is not a video call.
-    if ((row1Features & Calls.FEATURES_VIDEO) != (row2Features & Calls.FEATURES_VIDEO)) {
-      return false;
+    /** Builds a {@link CoalescedRow} based on all rows merged into the current group. */
+    CoalescedRow combine() {
+      return coalescedRowBuilder.setCoalescedIds(coalescedIdsBuilder.build()).build();
     }
 
-    // A RTT call should not be combined with one that is not a RTT call.
-    if ((row1Features & Calls.FEATURES_RTT) != (row2Features & Calls.FEATURES_RTT)) {
-      return false;
+    /**
+     * Returns true if the given {@link AnnotatedCallLog} row can be merged into the current group.
+     */
+    private boolean canMergeRow(Cursor annotatedCallLogRow) {
+      return coalescedIdsBuilder.getCoalescedIdList().isEmpty()
+          || (samePhoneAccount(annotatedCallLogRow)
+              && sameNumberPresentation(annotatedCallLogRow)
+              && meetsCallFeatureCriteria(annotatedCallLogRow)
+              && meetsDialerPhoneNumberCriteria(annotatedCallLogRow));
     }
 
-    return true;
-  }
+    private boolean samePhoneAccount(Cursor annotatedCallLogRow) {
+      PhoneAccountHandle groupPhoneAccountHandle =
+          TelecomUtil.composePhoneAccountHandle(
+              coalescedRowBuilder.getPhoneAccountComponentName(),
+              coalescedRowBuilder.getPhoneAccountId());
+      PhoneAccountHandle rowPhoneAccountHandle =
+          TelecomUtil.composePhoneAccountHandle(
+              annotatedCallLogRow.getString(phoneAccountComponentNameColumn),
+              annotatedCallLogRow.getString(phoneAccountIdColumn));
 
-  /**
-   * Delegates to data sources to aggregate individual columns to create a new coalesced row.
-   *
-   * @param individualRows {@link AnnotatedCallLog} rows sorted by timestamp descending
-   * @return a {@link CoalescedAnnotatedCallLog} row
-   */
-  private ContentValues coalesceRowsForAllDataSources(List<ContentValues> individualRows) {
-    ContentValues coalescedValues = new ContentValues();
-    for (CallLogDataSource dataSource : dataSources.getDataSourcesIncludingSystemCallLog()) {
-      coalescedValues.putAll(dataSource.coalesce(individualRows));
-    }
-    return coalescedValues;
-  }
-
-  /**
-   * Build a {@link CoalescedIds} proto that contains IDs of the rows in {@link AnnotatedCallLog}
-   * that are coalesced into one row in {@link CoalescedAnnotatedCallLog}.
-   *
-   * @param individualRows {@link AnnotatedCallLog} rows sorted by timestamp descending
-   * @return A {@link CoalescedIds} proto containing IDs of {@code individualRows}.
-   */
-  private CoalescedIds getCoalescedIds(List<ContentValues> individualRows) {
-    CoalescedIds.Builder coalescedIds = CoalescedIds.newBuilder();
-
-    for (ContentValues row : individualRows) {
-      coalescedIds.addCoalescedId(Preconditions.checkNotNull(row.getAsLong(AnnotatedCallLog._ID)));
+      return Objects.equals(groupPhoneAccountHandle, rowPhoneAccountHandle);
     }
 
-    return coalescedIds.build();
-  }
-
-  /**
-   * Creates a new {@link CoalescedRow} proto based on the provided {@link ContentValues}.
-   *
-   * <p>The provided {@link ContentValues} should be one for {@link CoalescedAnnotatedCallLog}.
-   */
-  @VisibleForTesting
-  static CoalescedRow toCoalescedRowProto(ContentValues coalescedContentValues) {
-    DialerPhoneNumber number;
-    try {
-      number =
-          DialerPhoneNumber.parseFrom(
-              coalescedContentValues.getAsByteArray(CoalescedAnnotatedCallLog.NUMBER));
-    } catch (InvalidProtocolBufferException e) {
-      throw new IllegalStateException("Couldn't parse DialerPhoneNumber bytes");
+    private boolean sameNumberPresentation(Cursor annotatedCallLogRow) {
+      return coalescedRowBuilder.getNumberPresentation()
+          == annotatedCallLogRow.getInt(numberPresentationColumn);
     }
 
-    CoalescedIds coalescedIds;
-    try {
-      coalescedIds =
-          CoalescedIds.parseFrom(
-              coalescedContentValues.getAsByteArray(CoalescedAnnotatedCallLog.COALESCED_IDS));
-    } catch (InvalidProtocolBufferException e) {
-      throw new IllegalStateException("Couldn't parse CoalescedIds bytes");
+    private boolean meetsCallFeatureCriteria(Cursor annotatedCallLogRow) {
+      int groupFeatures = coalescedRowBuilder.getFeatures();
+      int rowFeatures = annotatedCallLogRow.getInt(featuresColumn);
+
+      // A row with FEATURES_ASSISTED_DIALING should not be combined with one without it.
+      if ((groupFeatures & TelephonyManagerCompat.FEATURES_ASSISTED_DIALING)
+          != (rowFeatures & TelephonyManagerCompat.FEATURES_ASSISTED_DIALING)) {
+        return false;
+      }
+
+      // A video call should not be combined with one that is not a video call.
+      if ((groupFeatures & Calls.FEATURES_VIDEO) != (rowFeatures & Calls.FEATURES_VIDEO)) {
+        return false;
+      }
+
+      // A RTT call should not be combined with one that is not a RTT call.
+      if ((groupFeatures & Calls.FEATURES_RTT) != (rowFeatures & Calls.FEATURES_RTT)) {
+        return false;
+      }
+
+      return true;
     }
 
-    NumberAttributes numberAttributes;
-    try {
-      numberAttributes =
-          NumberAttributes.parseFrom(
-              coalescedContentValues.getAsByteArray(CoalescedAnnotatedCallLog.NUMBER_ATTRIBUTES));
-    } catch (InvalidProtocolBufferException e) {
-      throw new IllegalStateException("Couldn't parse NumberAttributes bytes");
+    private boolean meetsDialerPhoneNumberCriteria(Cursor annotatedCallLogRow) {
+      DialerPhoneNumber groupPhoneNumber = coalescedRowBuilder.getNumber();
+
+      DialerPhoneNumber rowPhoneNumber;
+      try {
+        byte[] rowPhoneNumberBytes = annotatedCallLogRow.getBlob(numberColumn);
+        if (rowPhoneNumberBytes == null) {
+          return false; // Empty numbers should not be combined.
+        }
+        rowPhoneNumber = DialerPhoneNumber.parseFrom(rowPhoneNumberBytes);
+      } catch (InvalidProtocolBufferException e) {
+        throw Assert.createAssertionFailException("Unable to parse DialerPhoneNumber bytes", e);
+      }
+
+      if (dialerPhoneNumberUtil == null) {
+        dialerPhoneNumberUtil = new DialerPhoneNumberUtil();
+      }
+
+      return dialerPhoneNumberUtil.isMatch(groupPhoneNumber, rowPhoneNumber);
     }
-
-    CoalescedRow.Builder coalescedRowBuilder =
-        CoalescedRow.newBuilder()
-            .setId(coalescedContentValues.getAsLong(CoalescedAnnotatedCallLog._ID))
-            .setTimestamp(coalescedContentValues.getAsLong(CoalescedAnnotatedCallLog.TIMESTAMP))
-            .setNumber(number)
-            .setNumberPresentation(
-                coalescedContentValues.getAsInteger(CoalescedAnnotatedCallLog.NUMBER_PRESENTATION))
-            .setIsRead(coalescedContentValues.getAsInteger(CoalescedAnnotatedCallLog.IS_READ) == 1)
-            .setIsNew(coalescedContentValues.getAsInteger(CoalescedAnnotatedCallLog.NEW) == 1)
-            .setFeatures(coalescedContentValues.getAsInteger(CoalescedAnnotatedCallLog.FEATURES))
-            .setCallType(coalescedContentValues.getAsInteger(CoalescedAnnotatedCallLog.CALL_TYPE))
-            .setNumberAttributes(numberAttributes)
-            .setIsVoicemailCall(
-                coalescedContentValues.getAsInteger(CoalescedAnnotatedCallLog.IS_VOICEMAIL_CALL)
-                    == 1)
-            .setCoalescedIds(coalescedIds);
-
-    String formattedNumber =
-        coalescedContentValues.getAsString(CoalescedAnnotatedCallLog.FORMATTED_NUMBER);
-    if (!TextUtils.isEmpty(formattedNumber)) {
-      coalescedRowBuilder.setFormattedNumber(formattedNumber);
-    }
-
-    String geocodedLocation =
-        coalescedContentValues.getAsString(CoalescedAnnotatedCallLog.GEOCODED_LOCATION);
-    if (!TextUtils.isEmpty(geocodedLocation)) {
-      coalescedRowBuilder.setGeocodedLocation(geocodedLocation);
-    }
-
-    String phoneAccountComponentName =
-        coalescedContentValues.getAsString(CoalescedAnnotatedCallLog.PHONE_ACCOUNT_COMPONENT_NAME);
-    if (!TextUtils.isEmpty(phoneAccountComponentName)) {
-      coalescedRowBuilder.setPhoneAccountComponentName(
-          coalescedContentValues.getAsString(
-              CoalescedAnnotatedCallLog.PHONE_ACCOUNT_COMPONENT_NAME));
-    }
-
-    String phoneAccountId =
-        coalescedContentValues.getAsString(CoalescedAnnotatedCallLog.PHONE_ACCOUNT_ID);
-    if (!TextUtils.isEmpty(phoneAccountId)) {
-      coalescedRowBuilder.setPhoneAccountId(phoneAccountId);
-    }
-
-    String voicemailCallTag =
-        coalescedContentValues.getAsString(CoalescedAnnotatedCallLog.VOICEMAIL_CALL_TAG);
-    if (!TextUtils.isEmpty(voicemailCallTag)) {
-      coalescedRowBuilder.setVoicemailCallTag(voicemailCallTag);
-    }
-
-    return coalescedRowBuilder.build();
   }
 }
diff --git a/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java b/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java
index 5aa62c2..1fdf38a 100644
--- a/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java
+++ b/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java
@@ -28,124 +28,8 @@
 
   public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY);
 
-  /** Columns shared by {@link AnnotatedCallLog} and {@link CoalescedAnnotatedCallLog}. */
-  interface CommonColumns extends BaseColumns {
-
-    /**
-     * Timestamp of the entry, in milliseconds.
-     *
-     * <p>Type: INTEGER (long)
-     */
-    String TIMESTAMP = "timestamp";
-
-    /**
-     * The phone number called or number the call came from, encoded as a {@link
-     * com.android.dialer.DialerPhoneNumber} proto. The number may be empty if it was an incoming
-     * call and the number was unknown.
-     *
-     * <p>Type: BLOB
-     */
-    String NUMBER = "number";
-
-    /**
-     * The number formatted as it should be displayed to the user. Note that it may not always be
-     * displayed, for example if the number has a corresponding person or business name.
-     *
-     * <p>Type: TEXT
-     */
-    String FORMATTED_NUMBER = "formatted_number";
-
-    /**
-     * See {@link android.provider.CallLog.Calls#NUMBER_PRESENTATION}.
-     *
-     * <p>Type: INTEGER (int)
-     */
-    String NUMBER_PRESENTATION = "presentation";
-
-    /**
-     * See {@link android.provider.CallLog.Calls#IS_READ}.
-     *
-     * <p>TYPE: INTEGER (boolean)
-     */
-    String IS_READ = "is_read";
-
-    /**
-     * See {@link android.provider.CallLog.Calls#NEW}.
-     *
-     * <p>Type: INTEGER (boolean)
-     */
-    String NEW = "new";
-
-    /**
-     * See {@link android.provider.CallLog.Calls#GEOCODED_LOCATION}.
-     *
-     * <p>TYPE: TEXT
-     */
-    String GEOCODED_LOCATION = "geocoded_location";
-
-    /**
-     * See {@link android.provider.CallLog.Calls#PHONE_ACCOUNT_COMPONENT_NAME}.
-     *
-     * <p>TYPE: TEXT
-     */
-    String PHONE_ACCOUNT_COMPONENT_NAME = "phone_account_component_name";
-
-    /**
-     * See {@link android.provider.CallLog.Calls#PHONE_ACCOUNT_ID}.
-     *
-     * <p>TYPE: TEXT
-     */
-    String PHONE_ACCOUNT_ID = "phone_account_id";
-
-    /**
-     * See {@link android.provider.CallLog.Calls#FEATURES}.
-     *
-     * <p>TYPE: INTEGER (int)
-     */
-    String FEATURES = "features";
-
-    /**
-     * Additional attributes about the number.
-     *
-     * <p>TYPE: BLOB
-     *
-     * @see com.android.dialer.NumberAttributes
-     */
-    String NUMBER_ATTRIBUTES = "number_attributes";
-
-    /**
-     * Whether the call is to the voicemail inbox.
-     *
-     * <p>TYPE: INTEGER (boolean)
-     *
-     * @see android.telecom.TelecomManager#isVoiceMailNumber(android.telecom.PhoneAccountHandle,
-     *     String)
-     */
-    String IS_VOICEMAIL_CALL = "is_voicemail_call";
-
-    /**
-     * The "name" of the voicemail inbox. This is provided by the SIM to show as the caller ID
-     *
-     * <p>TYPE: TEXT
-     *
-     * @see android.telephony.TelephonyManager#getVoiceMailAlphaTag()
-     */
-    String VOICEMAIL_CALL_TAG = "voicemail_call_tag";
-
-    /**
-     * Copied from {@link android.provider.CallLog.Calls#TYPE}.
-     *
-     * <p>Type: INTEGER (int)
-     */
-    String CALL_TYPE = "call_type";
-  }
-
-  /**
-   * AnnotatedCallLog table.
-   *
-   * <p>This contains all of the non-coalesced call log entries.
-   */
-  public static final class AnnotatedCallLog implements CommonColumns {
+  /** AnnotatedCallLog table. */
+  public static final class AnnotatedCallLog implements BaseColumns {
 
     public static final String TABLE = "AnnotatedCallLog";
     public static final String DISTINCT_PHONE_NUMBERS = "DistinctPhoneNumbers";
@@ -162,6 +46,114 @@
     public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/annotated_call_log";
 
     /**
+     * Timestamp of the entry, in milliseconds.
+     *
+     * <p>Type: INTEGER (long)
+     */
+    public static final String TIMESTAMP = "timestamp";
+
+    /**
+     * The phone number called or number the call came from, encoded as a {@link
+     * com.android.dialer.DialerPhoneNumber} proto. The number may be empty if it was an incoming
+     * call and the number was unknown.
+     *
+     * <p>Type: BLOB
+     */
+    public static final String NUMBER = "number";
+
+    /**
+     * The number formatted as it should be displayed to the user. Note that it may not always be
+     * displayed, for example if the number has a corresponding person or business name.
+     *
+     * <p>Type: TEXT
+     */
+    public static final String FORMATTED_NUMBER = "formatted_number";
+
+    /**
+     * See {@link android.provider.CallLog.Calls#NUMBER_PRESENTATION}.
+     *
+     * <p>Type: INTEGER (int)
+     */
+    public static final String NUMBER_PRESENTATION = "presentation";
+
+    /**
+     * See {@link android.provider.CallLog.Calls#IS_READ}.
+     *
+     * <p>TYPE: INTEGER (boolean)
+     */
+    public static final String IS_READ = "is_read";
+
+    /**
+     * See {@link android.provider.CallLog.Calls#NEW}.
+     *
+     * <p>Type: INTEGER (boolean)
+     */
+    public static final String NEW = "new";
+
+    /**
+     * See {@link android.provider.CallLog.Calls#GEOCODED_LOCATION}.
+     *
+     * <p>TYPE: TEXT
+     */
+    public static final String GEOCODED_LOCATION = "geocoded_location";
+
+    /**
+     * See {@link android.provider.CallLog.Calls#PHONE_ACCOUNT_COMPONENT_NAME}.
+     *
+     * <p>TYPE: TEXT
+     */
+    public static final String PHONE_ACCOUNT_COMPONENT_NAME = "phone_account_component_name";
+
+    /**
+     * See {@link android.provider.CallLog.Calls#PHONE_ACCOUNT_ID}.
+     *
+     * <p>TYPE: TEXT
+     */
+    public static final String PHONE_ACCOUNT_ID = "phone_account_id";
+
+    /**
+     * See {@link android.provider.CallLog.Calls#FEATURES}.
+     *
+     * <p>TYPE: INTEGER (int)
+     */
+    public static final String FEATURES = "features";
+
+    /**
+     * Additional attributes about the number.
+     *
+     * <p>TYPE: BLOB
+     *
+     * @see com.android.dialer.NumberAttributes
+     */
+    public static final String NUMBER_ATTRIBUTES = "number_attributes";
+
+    /**
+     * Whether the call is to the voicemail inbox.
+     *
+     * <p>TYPE: INTEGER (boolean)
+     *
+     * @see android.telecom.TelecomManager#isVoiceMailNumber(android.telecom.PhoneAccountHandle,
+     *     String)
+     */
+    public static final String IS_VOICEMAIL_CALL = "is_voicemail_call";
+
+    /**
+     * The "name" of the voicemail inbox. This is provided by the SIM to show as the caller ID
+     *
+     * <p>TYPE: TEXT
+     *
+     * @see android.telephony.TelephonyManager#getVoiceMailAlphaTag()
+     */
+    public static final String VOICEMAIL_CALL_TAG = "voicemail_call_tag";
+
+    /**
+     * Copied from {@link android.provider.CallLog.Calls#TYPE}.
+     *
+     * <p>Type: INTEGER (int)
+     */
+    public static final String CALL_TYPE = "call_type";
+
+    /**
      * See {@link android.provider.CallLog.Calls#DATA_USAGE}.
      *
      * <p>Type: INTEGER (long)
@@ -209,21 +201,4 @@
      */
     public static final String CALL_MAPPING_ID = "call_mapping_id";
   }
-
-  /**
-   * Coalesced view of the AnnotatedCallLog table.
-   *
-   * <p>This is an in-memory view of the {@link AnnotatedCallLog} with some adjacent entries
-   * collapsed.
-   */
-  public static final class CoalescedAnnotatedCallLog implements CommonColumns {
-
-    /**
-     * IDs of rows in {@link AnnotatedCallLog} that are coalesced into one row in {@link
-     * CoalescedAnnotatedCallLog}, encoded as a {@link com.android.dialer.CoalescedIds} proto.
-     *
-     * <p>Type: BLOB
-     */
-    public static final String COALESCED_IDS = "coalesced_ids";
-  }
 }
diff --git a/java/com/android/dialer/calllog/datasources/CallLogDataSource.java b/java/com/android/dialer/calllog/datasources/CallLogDataSource.java
index 75f06d5..72676a2 100644
--- a/java/com/android/dialer/calllog/datasources/CallLogDataSource.java
+++ b/java/com/android/dialer/calllog/datasources/CallLogDataSource.java
@@ -16,12 +16,8 @@
 
 package com.android.dialer.calllog.datasources;
 
-import android.content.ContentValues;
 import android.support.annotation.MainThread;
-import android.support.annotation.WorkerThread;
-import com.android.dialer.calllog.database.contract.AnnotatedCallLogContract;
 import com.google.common.util.concurrent.ListenableFuture;
-import java.util.List;
 
 /**
  * A source of data for one or more columns in the annotated call log.
@@ -45,8 +41,6 @@
  *
  * <p>The same data source objects may be reused across multiple checkDirtyAndRebuild cycles, so
  * implementors should take care to clear any internal state at the start of a new cycle.
- *
- * <p>{@link #coalesce(List)} may be called from any worker thread at any time.
  */
 public interface CallLogDataSource {
 
@@ -85,22 +79,6 @@
    */
   ListenableFuture<Void> onSuccessfulFill();
 
-  /**
-   * Combines raw annotated call log rows into a single coalesced row.
-   *
-   * <p>May be called by any worker thread at any time so implementations should take care to be
-   * threadsafe. (Ideally no state should be required to implement this.)
-   *
-   * @param individualRowsSortedByTimestampDesc group of fully populated rows from {@link
-   *     AnnotatedCallLogContract.AnnotatedCallLog} which need to be combined for display purposes.
-   *     This method should not modify this list.
-   * @return a partial {@link AnnotatedCallLogContract.CoalescedAnnotatedCallLog} row containing
-   *     only columns which this data source is responsible for, which is the result of aggregating
-   *     {@code individualRowsSortedByTimestampDesc}.
-   */
-  @WorkerThread
-  ContentValues coalesce(List<ContentValues> individualRowsSortedByTimestampDesc);
-
   @MainThread
   void registerContentObservers();
 
diff --git a/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java b/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java
index 72e9e0f..a805212 100644
--- a/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java
+++ b/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java
@@ -31,7 +31,6 @@
 import com.android.dialer.calllog.database.contract.AnnotatedCallLogContract.AnnotatedCallLog;
 import com.android.dialer.calllog.datasources.CallLogDataSource;
 import com.android.dialer.calllog.datasources.CallLogMutations;
-import com.android.dialer.calllog.datasources.util.RowCombiner;
 import com.android.dialer.calllogutils.NumberAttributesBuilder;
 import com.android.dialer.common.Assert;
 import com.android.dialer.common.LogUtil;
@@ -54,7 +53,6 @@
 import com.google.protobuf.InvalidProtocolBufferException;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
@@ -290,14 +288,6 @@
     return null;
   }
 
-  @WorkerThread
-  @Override
-  public ContentValues coalesce(List<ContentValues> individualRowsSortedByTimestampDesc) {
-    return new RowCombiner(individualRowsSortedByTimestampDesc)
-        .useMostRecentBlob(AnnotatedCallLog.NUMBER_ATTRIBUTES)
-        .combine();
-  }
-
   @MainThread
   @Override
   public void registerContentObservers() {
diff --git a/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java b/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java
index 1b66f50..7a12bc4 100644
--- a/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java
+++ b/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java
@@ -41,7 +41,6 @@
 import com.android.dialer.calllog.database.contract.AnnotatedCallLogContract.AnnotatedCallLog;
 import com.android.dialer.calllog.datasources.CallLogDataSource;
 import com.android.dialer.calllog.datasources.CallLogMutations;
-import com.android.dialer.calllog.datasources.util.RowCombiner;
 import com.android.dialer.calllog.observer.MarkDirtyObserver;
 import com.android.dialer.common.Assert;
 import com.android.dialer.common.LogUtil;
@@ -231,39 +230,6 @@
     return null;
   }
 
-  @Override
-  public ContentValues coalesce(List<ContentValues> individualRowsSortedByTimestampDesc) {
-    assertNoVoicemailsInRows(individualRowsSortedByTimestampDesc);
-
-    return new RowCombiner(individualRowsSortedByTimestampDesc)
-        .useMostRecentLong(AnnotatedCallLog.TIMESTAMP)
-        .useMostRecentLong(AnnotatedCallLog.NEW)
-        .useMostRecentLong(AnnotatedCallLog.IS_READ)
-        // Two different DialerPhoneNumbers could be combined if they are different but considered
-        // to be an "exact match" by libphonenumber; in this case we arbitrarily select the most
-        // recent one.
-        .useMostRecentBlob(AnnotatedCallLog.NUMBER)
-        .useMostRecentString(AnnotatedCallLog.FORMATTED_NUMBER)
-        .useSingleValueInt(AnnotatedCallLog.NUMBER_PRESENTATION)
-        .useMostRecentString(AnnotatedCallLog.GEOCODED_LOCATION)
-        .useSingleValueString(AnnotatedCallLog.PHONE_ACCOUNT_COMPONENT_NAME)
-        .useSingleValueString(AnnotatedCallLog.PHONE_ACCOUNT_ID)
-        .useMostRecentLong(AnnotatedCallLog.CALL_TYPE)
-        // If any call in a group includes a feature (like Wifi/HD), consider the group to have the
-        // feature.
-        .bitwiseOr(AnnotatedCallLog.FEATURES)
-        .combine();
-  }
-
-  private void assertNoVoicemailsInRows(List<ContentValues> individualRowsSortedByTimestampDesc) {
-    for (ContentValues contentValue : individualRowsSortedByTimestampDesc) {
-      if (contentValue.getAsLong(AnnotatedCallLog.CALL_TYPE) != null) {
-        Assert.checkArgument(
-            contentValue.getAsLong(AnnotatedCallLog.CALL_TYPE) != Calls.VOICEMAIL_TYPE);
-      }
-    }
-  }
-
   @TargetApi(Build.VERSION_CODES.N) // Uses try-with-resources
   private void handleInsertsAndUpdates(
       Context appContext, CallLogMutations mutations, Set<Long> existingAnnotatedCallLogIds) {
diff --git a/java/com/android/dialer/calllog/datasources/util/RowCombiner.java b/java/com/android/dialer/calllog/datasources/util/RowCombiner.java
deleted file mode 100644
index 2bb65cc..0000000
--- a/java/com/android/dialer/calllog/datasources/util/RowCombiner.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-package com.android.dialer.calllog.datasources.util;
-
-import android.content.ContentValues;
-import com.android.dialer.common.Assert;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Objects;
-
-/** Convenience class for aggregating row values. */
-public class RowCombiner {
-  private final List<ContentValues> individualRowsSortedByTimestampDesc;
-  private final ContentValues combinedRow = new ContentValues();
-
-  public RowCombiner(List<ContentValues> individualRowsSortedByTimestampDesc) {
-    Assert.checkArgument(!individualRowsSortedByTimestampDesc.isEmpty());
-    this.individualRowsSortedByTimestampDesc = individualRowsSortedByTimestampDesc;
-  }
-
-  /** Use the most recent value for the specified column. */
-  public RowCombiner useMostRecentInt(String columnName) {
-    combinedRow.put(
-        columnName, individualRowsSortedByTimestampDesc.get(0).getAsInteger(columnName));
-    return this;
-  }
-
-  /** Use the most recent value for the specified column. */
-  public RowCombiner useMostRecentLong(String columnName) {
-    combinedRow.put(columnName, individualRowsSortedByTimestampDesc.get(0).getAsLong(columnName));
-    return this;
-  }
-
-  /** Use the most recent value for the specified column. */
-  public RowCombiner useMostRecentString(String columnName) {
-    combinedRow.put(columnName, individualRowsSortedByTimestampDesc.get(0).getAsString(columnName));
-    return this;
-  }
-
-  public RowCombiner useMostRecentBlob(String columnName) {
-    combinedRow.put(
-        columnName, individualRowsSortedByTimestampDesc.get(0).getAsByteArray(columnName));
-    return this;
-  }
-
-  /** Asserts that all column values for the given column name are the same, and uses it. */
-  public RowCombiner useSingleValueString(String columnName) {
-    Iterator<ContentValues> iterator = individualRowsSortedByTimestampDesc.iterator();
-    String singleValue = iterator.next().getAsString(columnName);
-    while (iterator.hasNext()) {
-      String current = iterator.next().getAsString(columnName);
-      Assert.checkState(Objects.equals(singleValue, current), "Values different for " + columnName);
-    }
-    combinedRow.put(columnName, singleValue);
-    return this;
-  }
-
-  /** Asserts that all column values for the given column name are the same, and uses it. */
-  public RowCombiner useSingleValueLong(String columnName) {
-    Iterator<ContentValues> iterator = individualRowsSortedByTimestampDesc.iterator();
-    Long singleValue = iterator.next().getAsLong(columnName);
-    while (iterator.hasNext()) {
-      Long current = iterator.next().getAsLong(columnName);
-      Assert.checkState(Objects.equals(singleValue, current), "Values different for " + columnName);
-    }
-    combinedRow.put(columnName, singleValue);
-    return this;
-  }
-
-  /** Asserts that all column values for the given column name are the same, and uses it. */
-  public RowCombiner useSingleValueInt(String columnName) {
-    Iterator<ContentValues> iterator = individualRowsSortedByTimestampDesc.iterator();
-    Integer singleValue = iterator.next().getAsInteger(columnName);
-    while (iterator.hasNext()) {
-      Integer current = iterator.next().getAsInteger(columnName);
-      Assert.checkState(Objects.equals(singleValue, current), "Values different for " + columnName);
-    }
-    combinedRow.put(columnName, singleValue);
-    return this;
-  }
-
-  /** Performs a bitwise OR on the specified column and yields the result. */
-  public RowCombiner bitwiseOr(String columnName) {
-    int combinedValue = 0;
-    for (ContentValues val : individualRowsSortedByTimestampDesc) {
-      combinedValue |= val.getAsInteger(columnName);
-    }
-    combinedRow.put(columnName, combinedValue);
-    return this;
-  }
-
-  public ContentValues combine() {
-    return combinedRow;
-  }
-}
diff --git a/java/com/android/dialer/calllog/datasources/voicemail/VoicemailDataSource.java b/java/com/android/dialer/calllog/datasources/voicemail/VoicemailDataSource.java
index 7a23022..cbda9ac 100644
--- a/java/com/android/dialer/calllog/datasources/voicemail/VoicemailDataSource.java
+++ b/java/com/android/dialer/calllog/datasources/voicemail/VoicemailDataSource.java
@@ -25,7 +25,6 @@
 import com.android.dialer.calllog.database.contract.AnnotatedCallLogContract.AnnotatedCallLog;
 import com.android.dialer.calllog.datasources.CallLogDataSource;
 import com.android.dialer.calllog.datasources.CallLogMutations;
-import com.android.dialer.calllog.datasources.util.RowCombiner;
 import com.android.dialer.common.concurrent.Annotations.BackgroundExecutor;
 import com.android.dialer.compat.telephony.TelephonyManagerCompat;
 import com.android.dialer.inject.ApplicationContext;
@@ -35,7 +34,6 @@
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.protobuf.InvalidProtocolBufferException;
-import java.util.List;
 import java.util.Map.Entry;
 import javax.inject.Inject;
 
@@ -104,14 +102,6 @@
   }
 
   @Override
-  public ContentValues coalesce(List<ContentValues> individualRowsSortedByTimestampDesc) {
-    return new RowCombiner(individualRowsSortedByTimestampDesc)
-        .useMostRecentInt(AnnotatedCallLog.IS_VOICEMAIL_CALL)
-        .useMostRecentString(AnnotatedCallLog.VOICEMAIL_CALL_TAG)
-        .combine();
-  }
-
-  @Override
   public void registerContentObservers() {}
 
   @Override
diff --git a/java/com/android/dialer/compat/android/support/design/bottomsheet/BottomSheetStateCompat.java b/java/com/android/dialer/compat/android/support/design/bottomsheet/BottomSheetStateCompat.java
new file mode 100644
index 0000000..d7079d4
--- /dev/null
+++ b/java/com/android/dialer/compat/android/support/design/bottomsheet/BottomSheetStateCompat.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.dialer.compat.android.support.design.bottomsheet;
+
+import android.support.design.widget.BottomSheetBehavior;
+
+/** Provides access to bottom sheet states. */
+public final class BottomSheetStateCompat {
+
+  /** The bottom sheet is dragging. */
+  public static final int STATE_DRAGGING = BottomSheetBehavior.STATE_DRAGGING;
+
+  /** The bottom sheet is settling. */
+  public static final int STATE_SETTLING = BottomSheetBehavior.STATE_SETTLING;
+
+  /** The bottom sheet is expanded. */
+  public static final int STATE_EXPANDED = BottomSheetBehavior.STATE_EXPANDED;
+
+  /** The bottom sheet is collapsed. */
+  public static final int STATE_COLLAPSED = BottomSheetBehavior.STATE_COLLAPSED;
+
+  /** The bottom sheet is hidden. */
+  public static final int STATE_HIDDEN = BottomSheetBehavior.STATE_HIDDEN;
+
+  /** The bottom sheet is half-expanded (not public yet). */
+  public static final int STATE_HALF_EXPANDED = 6;
+
+  private BottomSheetStateCompat() {}
+}
diff --git a/java/com/android/dialer/historyitemactions/HistoryItemActionBottomSheet.java b/java/com/android/dialer/historyitemactions/HistoryItemActionBottomSheet.java
index f5cdc4d..9bc6570 100644
--- a/java/com/android/dialer/historyitemactions/HistoryItemActionBottomSheet.java
+++ b/java/com/android/dialer/historyitemactions/HistoryItemActionBottomSheet.java
@@ -28,13 +28,17 @@
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.ViewGroup;
+import android.view.ViewTreeObserver.OnPreDrawListener;
 import android.view.Window;
+import android.view.accessibility.AccessibilityManager;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 import com.android.dialer.common.Assert;
+import com.android.dialer.compat.android.support.design.bottomsheet.BottomSheetStateCompat;
 import com.android.dialer.theme.base.ThemeComponent;
 import com.android.dialer.widget.ContactPhotoView;
+import com.google.common.collect.ImmutableSet;
 import java.util.List;
 
 /**
@@ -49,6 +53,42 @@
   private final List<HistoryItemActionModule> modules;
   private final HistoryItemBottomSheetHeaderInfo historyItemBottomSheetHeaderInfo;
 
+  /**
+   * An {@link OnPreDrawListener} that sets the contact layout's elevation if
+   *
+   * <ul>
+   *   <li>the bottom sheet can expand to full screen, and
+   *   <li>the bottom sheet is fully expanded.
+   * </ul>
+   *
+   * <p>The reason an {@link OnPreDrawListener} instead of a {@link BottomSheetCallback} is used to
+   * handle this is that the initial state of the bottom sheet will be STATE_EXPANDED when the touch
+   * exploration (e.g., TalkBack) is enabled and {@link BottomSheetCallback} won't be triggered in
+   * this case. See {@link #setupBottomSheetBehavior()} for details.
+   */
+  private final OnPreDrawListener onPreDrawListenerForContactLayout =
+      () -> {
+        View contactLayout = findViewById(R.id.contact_layout_root);
+        View background = findViewById(android.support.design.R.id.touch_outside);
+        View bottomSheet = findViewById(android.support.design.R.id.design_bottom_sheet);
+
+        BottomSheetBehavior<View> behavior = BottomSheetBehavior.from(bottomSheet);
+
+        // If the height of the background is equal to that of the bottom sheet, the bottom sheet
+        // *can* be expanded to full screen.
+        contactLayout.setElevation(
+            background.getHeight() == bottomSheet.getHeight()
+                    && behavior.getState() == BottomSheetStateCompat.STATE_EXPANDED
+                ? getContext()
+                    .getResources()
+                    .getDimensionPixelSize(R.dimen.contact_actions_header_elevation)
+                : 0);
+
+        return true; // Return true to proceed with the current drawing pass.
+      };
+
+  private LinearLayout contactLayout;
+
   private HistoryItemActionBottomSheet(
       Context context,
       HistoryItemBottomSheetHeaderInfo historyItemBottomSheetHeaderInfo,
@@ -71,6 +111,10 @@
 
   @Override
   protected void onCreate(Bundle bundle) {
+    contactLayout = Assert.isNotNull(findViewById(R.id.contact_layout_root));
+
+    initBottomSheetState();
+    setupBottomSheetBehavior();
     setupWindow();
     setupContactLayout();
 
@@ -84,7 +128,68 @@
     }
   }
 
-  // Overrwrites the window size since Dialog's don't match parent.
+  @Override
+  public void onAttachedToWindow() {
+    super.onAttachedToWindow();
+    contactLayout.getViewTreeObserver().addOnPreDrawListener(onPreDrawListenerForContactLayout);
+  }
+
+  @Override
+  public void onDetachedFromWindow() {
+    super.onDetachedFromWindow();
+    contactLayout.getViewTreeObserver().removeOnPreDrawListener(onPreDrawListenerForContactLayout);
+  }
+
+  private void initBottomSheetState() {
+    // If the touch exploration in the system (e.g., TalkBack) is enabled, the bottom sheet should
+    // be fully expanded because sometimes services like TalkBack won't read all items when the
+    // bottom sheet is not fully expanded.
+    if (isTouchExplorationEnabled()) {
+      BottomSheetBehavior<View> behavior =
+          BottomSheetBehavior.from(findViewById(android.support.design.R.id.design_bottom_sheet));
+      behavior.setState(BottomSheetStateCompat.STATE_EXPANDED);
+    }
+  }
+
+  /**
+   * Configures the bottom sheet behavior when its state changes.
+   *
+   * <p>If the touch exploration in the system (e.g., TalkBack) is enabled, the bottom sheet will be
+   * canceled if it is in a final state other than {@link BottomSheetBehavior#STATE_EXPANDED}. This
+   * is because sometimes services like TalkBack won't read all items when the bottom sheet is not
+   * fully expanded.
+   *
+   * <p>If the touch exploration is disabled, cancel the bottom sheet when it is in {@link
+   * BottomSheetBehavior#STATE_HIDDEN}.
+   */
+  private void setupBottomSheetBehavior() {
+    BottomSheetBehavior<View> behavior =
+        BottomSheetBehavior.from(findViewById(android.support.design.R.id.design_bottom_sheet));
+    behavior.setBottomSheetCallback(
+        new BottomSheetCallback() {
+          @Override
+          public void onStateChanged(@NonNull View bottomSheet, int newState) {
+            ImmutableSet<Integer> statesToCancelBottomSheet =
+                isTouchExplorationEnabled()
+                    ? ImmutableSet.of(
+                        BottomSheetStateCompat.STATE_COLLAPSED,
+                        BottomSheetStateCompat.STATE_HIDDEN,
+                        BottomSheetStateCompat.STATE_HALF_EXPANDED)
+                    : ImmutableSet.of(BottomSheetStateCompat.STATE_HIDDEN);
+
+            if (statesToCancelBottomSheet.contains(newState)) {
+              cancel();
+            }
+
+            // TODO(calderwoodra): set the status bar color when expanded, else translucent
+          }
+
+          @Override
+          public void onSlide(@NonNull View bottomSheet, float slideOffset) {}
+        });
+  }
+
+  // Overwrites the window size since it doesn't match the parent.
   private void setupWindow() {
     Window window = getWindow();
     if (window == null) {
@@ -97,13 +202,11 @@
   }
 
   private void setupContactLayout() {
-    View contactView = Assert.isNotNull(findViewById(R.id.contact_layout_root));
-
-    ContactPhotoView contactPhotoView = contactView.findViewById(R.id.contact_photo_view);
+    ContactPhotoView contactPhotoView = contactLayout.findViewById(R.id.contact_photo_view);
     contactPhotoView.setPhoto(historyItemBottomSheetHeaderInfo.getPhotoInfo());
 
-    TextView primaryTextView = contactView.findViewById(R.id.primary_text);
-    TextView secondaryTextView = contactView.findViewById(R.id.secondary_text);
+    TextView primaryTextView = contactLayout.findViewById(R.id.primary_text);
+    TextView secondaryTextView = contactLayout.findViewById(R.id.secondary_text);
 
     primaryTextView.setText(historyItemBottomSheetHeaderInfo.getPrimaryText());
     if (!TextUtils.isEmpty(historyItemBottomSheetHeaderInfo.getSecondaryText())) {
@@ -112,35 +215,6 @@
       secondaryTextView.setVisibility(View.GONE);
       secondaryTextView.setText(null);
     }
-
-    View background = findViewById(android.support.design.R.id.touch_outside);
-    BottomSheetBehavior behavior =
-        BottomSheetBehavior.from(findViewById(android.support.design.R.id.design_bottom_sheet));
-    behavior.setBottomSheetCallback(
-        new BottomSheetCallback() {
-          @Override
-          public void onStateChanged(@NonNull View bottomSheet, int newState) {
-            if (newState == BottomSheetBehavior.STATE_HIDDEN) {
-              cancel();
-              return;
-            }
-
-            // If the bottomsheet can expand to full screen, set the header's elevation when it's
-            // fully expanded.
-            if (background.getHeight() == bottomSheet.getHeight()) {
-              contactView.setElevation(
-                  newState == BottomSheetBehavior.STATE_EXPANDED
-                      ? getContext()
-                          .getResources()
-                          .getDimensionPixelSize(R.dimen.contact_actions_header_elevation)
-                      : 0);
-              // TODO(calderwoodra): set the status bar color when expanded, else translucent
-            }
-          }
-
-          @Override
-          public void onSlide(@NonNull View bottomSheet, float slideOffset) {}
-        });
   }
 
   private View getDividerView(ViewGroup container) {
@@ -170,4 +244,11 @@
       dismiss();
     }
   }
+
+  private boolean isTouchExplorationEnabled() {
+    AccessibilityManager accessibilityManager =
+        getContext().getSystemService(AccessibilityManager.class);
+
+    return accessibilityManager.isTouchExplorationEnabled();
+  }
 }
diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java
index 904a5a8..dd6c25b 100644
--- a/java/com/android/incallui/call/DialerCall.java
+++ b/java/com/android/incallui/call/DialerCall.java
@@ -977,13 +977,23 @@
   }
 
   /** Checks if the call supports the given set of capabilities supplied as a bit mask. */
+  @TargetApi(28)
   public boolean can(int capabilities) {
     int supportedCapabilities = telecomCall.getDetails().getCallCapabilities();
 
     if ((capabilities & Call.Details.CAPABILITY_MERGE_CONFERENCE) != 0) {
+      boolean hasConferenceableCall = false;
+      // RTT call is not conferenceable, it's a bug (a bug) in Telecom and we work around it
+      // here before it's fixed in Telecom.
+      for (Call call : telecomCall.getConferenceableCalls()) {
+        if (!(BuildCompat.isAtLeastP() && call.isRttActive())) {
+          hasConferenceableCall = true;
+          break;
+        }
+      }
       // We allow you to merge if the capabilities allow it or if it is a call with
       // conferenceable calls.
-      if (telecomCall.getConferenceableCalls().isEmpty()
+      if (!hasConferenceableCall
           && ((Call.Details.CAPABILITY_MERGE_CONFERENCE & supportedCapabilities) == 0)) {
         // Cannot merge calls if there are no calls to merge with.
         return false;
@@ -1704,6 +1714,17 @@
 
   /** Indicates the call is eligible for SpeakEasy */
   public boolean isSpeakEasyEligible() {
+
+    PhoneAccount phoneAccount = getPhoneAccount();
+
+    if (phoneAccount == null) {
+      return false;
+    }
+
+    if (!phoneAccount.hasCapabilities(PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION)) {
+      return false;
+    }
+
     return !isPotentialEmergencyCallback()
         && !isEmergencyCall()
         && !isActiveRttCall()