From aa54ed3d57d7c54095b869c1c0c3a7d7e4761d85 Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Tue, 14 Feb 2023 14:08:29 +0100 Subject: [PATCH] [lgtm] Fix LGTM-reported issues (#1074) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remember CodeQL (acfc1efe)? CodeQL basically runs [GitHub LGTM][0] on source code, looking for possible security issues. Now that CodeQL is running, we can begin addressing reported issues. Add a `.lgtm.yml` file to exclude `cs/campaign/constantine`; this is a campaign asking for contact regarding certain constructs, and is just noise in the LGTM reporting page. Problems found include: * HttpClient created with CheckCertificateRevocationList disabled * Wrong type of arguments to formatting function * Weak cryptography * Possible information leakage from uninitialized padding bytes * ML Training and Serialization Files Referenced ~~ HttpClient created with CheckCertificateRevocationList disabled ~~ Apparently the `HttpClient` default constructor is "bad"; we should instead use the [`HttpClient(HttpMessageHandler)` constructor][1], provide our own `HttpClientHandler`, and ensure that [`HttpClientHandler.CheckCertificateRevocationList`][2] is True. ~~ Wrong type of arguments to formatting function ~~ Apparently LGTM doesn't realize that in C++ `long int` is synonymous with `long`, and thus warns that they're not the same. 🤦 Remove a cast to `long int`. ~~ Weak cryptography ~~ This is in `AuthDigestSession.cs`. Unfortunately, RFC2617 requires MD5, so we kinda need to use MD5. Add a `// lgtm [cs/weak-crypto]` comment to disable the warning. ~~ Possible information leakage from uninitialized padding bytes ~~ This is in `cpp-util.hh`, and it seems that LGTM doesn't appreciate our use of template metaprogramming to construct a `char_array` wherein `Len` is computed at compile time with no wasted padding. ~~ ML Training and Serialization Files Referenced ~~ LGTM apparently assumes that mentions of `.pb` are mentions of ML data training files. In our case, these were part of error messages from `aapt2` that we were attempting to translate. Add a `//lgtm [csharp/responsible-ai/ml-training-and-serialization-files-referenced]` comment to disable this warning. Co-authored-by: Alex Hsu [0]: https://github.com/marketplace/lgtm [1]: https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.-ctor?view=netstandard-2.0#system-net-http-httpclient-ctor(system-net-http-httpmessagehandler) [2]: https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclienthandler.checkcertificaterevocationlist?view=net-7.0 --- .lgtm.yml | 2 + .../DownloadUri.cs | 12 +- .../xaprepare/Application/Utilities.cs | 15 +- .../Steps/Step_Get_Windows_Binutils.cs | 2 +- .../BinarySerializableConstraint.cs | 104 -- .../Constraints/ConstraintExpression.cs | 14 - .../Constraints/ConstraintFactory.cs | 14 - src-ThirdParty/NUnitLite/Is.cs | 14 - .../Xamarin.Android.Net/AuthDigestSession.cs | 22 +- .../Tasks/Aapt2.cs | 4 +- .../BuildReleaseArm64XFormsLegacy.apkdesc | 934 +++++++++--------- src/monodroid/jni/basic-utilities.cc | 4 + src/monodroid/jni/cpp-util.hh | 2 +- src/monodroid/jni/monodroid-glue.cc | 30 +- 14 files changed, 537 insertions(+), 636 deletions(-) create mode 100644 .lgtm.yml delete mode 100644 src-ThirdParty/NUnitLite/Constraints/BinarySerializableConstraint.cs diff --git a/.lgtm.yml b/.lgtm.yml new file mode 100644 index 00000000000..24f5c49c270 --- /dev/null +++ b/.lgtm.yml @@ -0,0 +1,2 @@ +queries: + - exclude: cs/campaign/constantine diff --git a/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/DownloadUri.cs b/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/DownloadUri.cs index 8dad2077019..aaa3698f0e9 100644 --- a/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/DownloadUri.cs +++ b/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/DownloadUri.cs @@ -43,7 +43,17 @@ public override bool Execute () var source = cancellationTokenSource = new CancellationTokenSource (); var tasks = new Task [SourceUris.Length]; - using (var client = new HttpClient ()) { + + // LGTM recommendation + // + // Using HttpClient without providing a platform specific handler (WinHttpHandler or CurlHandler) where the CheckCertificateRevocationList property is set + // to true, will allow revoked certificates to be accepted by the HttpClient as valid. + // + var handler = new HttpClientHandler { + CheckCertificateRevocationList = true, + }; + + using (var client = new HttpClient (handler)) { client.Timeout = TimeSpan.FromHours (3); for (int i = 0; i < SourceUris.Length; ++i) { tasks [i] = DownloadFile (client, source, SourceUris [i], DestinationFiles [i]); diff --git a/build-tools/xaprepare/xaprepare/Application/Utilities.cs b/build-tools/xaprepare/xaprepare/Application/Utilities.cs index 835f68be5c3..53462f44d2c 100644 --- a/build-tools/xaprepare/xaprepare/Application/Utilities.cs +++ b/build-tools/xaprepare/xaprepare/Application/Utilities.cs @@ -471,12 +471,21 @@ static decimal SignificantDigits (decimal number, int maxDigitCount) return (success, size); } + public static HttpClient CreateHttpClient () + { + var handler = new HttpClientHandler { + CheckCertificateRevocationList = true, + }; + + return new HttpClient (handler); + } + public static async Task<(bool success, ulong size, HttpStatusCode status)> GetDownloadSizeWithStatus (Uri url) { TimeSpan delay = ExceptionRetryInitialDelay; for (int i = 0; i < ExceptionRetries; i++) { try { - using (var httpClient = new HttpClient ()) { + using (HttpClient httpClient = CreateHttpClient ()) { httpClient.Timeout = WebRequestTimeout; var req = new HttpRequestMessage (HttpMethod.Head, url); req.Headers.ConnectionClose = true; @@ -524,7 +533,7 @@ public static async Task Download (Uri url, string targetFile, DownloadSta static async Task DoDownload (Uri url, string targetFile, DownloadStatus status) { - using (var httpClient = new HttpClient ()) { + using (HttpClient httpClient = CreateHttpClient ()) { httpClient.Timeout = WebRequestTimeout; Log.DebugLine ("Calling GetAsync"); HttpResponseMessage resp = await httpClient.GetAsync (url, HttpCompletionOption.ResponseHeadersRead); @@ -820,7 +829,7 @@ public static string GetStringFromStdout (ProcessRunner runner, bool throwOnErro LogError ($"failed with exit code {runner.ExitCode}"); return String.Empty; } - + string ret = sw.ToString (); if (trimTrailingWhitespace) return ret.TrimEnd (); diff --git a/build-tools/xaprepare/xaprepare/Steps/Step_Get_Windows_Binutils.cs b/build-tools/xaprepare/xaprepare/Steps/Step_Get_Windows_Binutils.cs index 9d4825d0f1c..a5457b27d46 100644 --- a/build-tools/xaprepare/xaprepare/Steps/Step_Get_Windows_Binutils.cs +++ b/build-tools/xaprepare/xaprepare/Steps/Step_Get_Windows_Binutils.cs @@ -157,7 +157,7 @@ string GetStampFile (string file, string destinationDirectory, string ndkVersion async Task FetchFiles (Dictionary neededFiles, string destinationDirectory, Uri url) { Utilities.CreateDirectory (destinationDirectory); - using (var httpClient = new HttpClient ()) { + using (HttpClient httpClient = Utilities.CreateHttpClient ()) { bool success; long size; diff --git a/src-ThirdParty/NUnitLite/Constraints/BinarySerializableConstraint.cs b/src-ThirdParty/NUnitLite/Constraints/BinarySerializableConstraint.cs deleted file mode 100644 index c6d5a52bd34..00000000000 --- a/src-ThirdParty/NUnitLite/Constraints/BinarySerializableConstraint.cs +++ /dev/null @@ -1,104 +0,0 @@ -// *********************************************************************** -// Copyright (c) 2008 Charlie Poole -// -// 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. -// *********************************************************************** - -#if !NETCF && !SILVERLIGHT -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Binary; - -namespace NUnit.Framework.Constraints -{ - /// - /// BinarySerializableConstraint tests whether - /// an object is serializable in binary format. - /// - public class BinarySerializableConstraint : Constraint - { - readonly BinaryFormatter serializer = new BinaryFormatter(); - - /// - /// Test whether the constraint is satisfied by a given value - /// - /// The value to be tested - /// True for success, false for failure - [System.Diagnostics.CodeAnalysis.SuppressMessage ("Security", "CA2302: Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize", Justification = "Data to be deserialized is trusted, as we create it in this same method.")] -#if NET - [Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] -#endif - public override bool Matches(object actual) - { - this.actual = actual; - - if (actual == null) - throw new ArgumentException(); - - MemoryStream stream = new MemoryStream(); - - try - { - serializer.Serialize(stream, actual); - - stream.Seek(0, SeekOrigin.Begin); - - object value = serializer.Deserialize(stream); - - return value != null; - } - catch (SerializationException) - { - return false; - } - } - - /// - /// Write the constraint description to a MessageWriter - /// - /// The writer on which the description is displayed - public override void WriteDescriptionTo(MessageWriter writer) - { - writer.Write("binary serializable"); - } - - /// - /// Write the actual value for a failing constraint test to a - /// MessageWriter. The default implementation simply writes - /// the raw value of actual, leaving it to the writer to - /// perform any formatting. - /// - /// The writer on which the actual value is displayed - public override void WriteActualValueTo(MessageWriter writer) - { - writer.Write("<{0}>", actual.GetType().Name); - } - - /// - /// Returns the string representation - /// - protected override string GetStringRepresentation() - { - return ""; - } - } -} -#endif diff --git a/src-ThirdParty/NUnitLite/Constraints/ConstraintExpression.cs b/src-ThirdParty/NUnitLite/Constraints/ConstraintExpression.cs index 46fc7d85796..d5e6347475c 100644 --- a/src-ThirdParty/NUnitLite/Constraints/ConstraintExpression.cs +++ b/src-ThirdParty/NUnitLite/Constraints/ConstraintExpression.cs @@ -350,20 +350,6 @@ public UniqueItemsConstraint Unique #endregion - #region BinarySerializable - -#if !NETCF && !SILVERLIGHT - /// - /// Returns a constraint that tests whether an object graph is serializable in binary format. - /// - public BinarySerializableConstraint BinarySerializable - { - get { return (BinarySerializableConstraint)this.Append(new BinarySerializableConstraint()); } - } -#endif - - #endregion - #region XmlSerializable #if !SILVERLIGHT diff --git a/src-ThirdParty/NUnitLite/Constraints/ConstraintFactory.cs b/src-ThirdParty/NUnitLite/Constraints/ConstraintFactory.cs index f0737fb6946..7e46af3c3de 100644 --- a/src-ThirdParty/NUnitLite/Constraints/ConstraintFactory.cs +++ b/src-ThirdParty/NUnitLite/Constraints/ConstraintFactory.cs @@ -297,20 +297,6 @@ public UniqueItemsConstraint Unique #endregion - #region BinarySerializable - -#if !NETCF && !SILVERLIGHT - /// - /// Returns a constraint that tests whether an object graph is serializable in binary format. - /// - public BinarySerializableConstraint BinarySerializable - { - get { return new BinarySerializableConstraint(); } - } -#endif - - #endregion - #region XmlSerializable #if !SILVERLIGHT diff --git a/src-ThirdParty/NUnitLite/Is.cs b/src-ThirdParty/NUnitLite/Is.cs index 55b61603310..1af0b4966f2 100644 --- a/src-ThirdParty/NUnitLite/Is.cs +++ b/src-ThirdParty/NUnitLite/Is.cs @@ -157,20 +157,6 @@ public static UniqueItemsConstraint Unique #endregion - #region BinarySerializable - -#if !NETCF && !SILVERLIGHT - /// - /// Returns a constraint that tests whether an object graph is serializable in binary format. - /// - public static BinarySerializableConstraint BinarySerializable - { - get { return new BinarySerializableConstraint(); } - } -#endif - - #endregion - #region XmlSerializable #if !SILVERLIGHT diff --git a/src/Mono.Android/Xamarin.Android.Net/AuthDigestSession.cs b/src/Mono.Android/Xamarin.Android.Net/AuthDigestSession.cs index 561c17b755c..967a94b2bcb 100644 --- a/src/Mono.Android/Xamarin.Android.Net/AuthDigestSession.cs +++ b/src/Mono.Android/Xamarin.Android.Net/AuthDigestSession.cs @@ -2,7 +2,7 @@ // Adapted from: // // System.Net.DigestClient.cs -// +// // Authors: // Greg Reinacker (gregr@rassoc.com) // Sebastien Pouliot (spouliot@motus.com) @@ -55,7 +55,7 @@ public string? QOP { } public string CNonce { - get { + get { if (_cnonce == null) { // 15 is a multiple of 3 which is better for base64 because it // wont end with '=' and risk messing up the server parsing @@ -73,7 +73,7 @@ public DateTime LastUse { } [System.Diagnostics.CodeAnalysis.SuppressMessage ("Security", "CA5351:Do Not Use Broken Cryptographic Algorithms", Justification = "Only supported algorithm by RFC2617.")] - public bool Parse (string challenge) + public bool Parse (string challenge) { parser = new AuthDigestHeaderParser (challenge); if (!parser.Parse ()) @@ -81,12 +81,12 @@ public bool Parse (string challenge) // build the hash object (only MD5 is defined in RFC2617) if ((parser.Algorithm == null) || (parser.Algorithm.StartsWith ("MD5", StringComparison.OrdinalIgnoreCase))) - hash = MD5.Create (); + hash = MD5.Create (); // lgtm [cs/weak-crypto] This is part of RFC2617 and we cannot change the algorithm here. return true; } - string? HashToHexString (string toBeHashed) + string? HashToHexString (string toBeHashed) { if (hash == null) return null; @@ -100,7 +100,7 @@ public bool Parse (string challenge) return sb.ToString (); } - string? HA1 (string username, string password) + string? HA1 (string username, string password) { string ha1 = $"{username}:{Realm}:{password}"; if (String.Compare (Algorithm, "md5-sess", StringComparison.OrdinalIgnoreCase) == 0) @@ -108,18 +108,18 @@ public bool Parse (string challenge) return HashToHexString (ha1); } - string? HA2 (HttpURLConnection webRequest) + string? HA2 (HttpURLConnection webRequest) { var uri = new Uri (webRequest.URL?.ToString ()!); string ha2 = $"{webRequest.RequestMethod}:{uri.PathAndQuery}"; if (QOP == "auth-int") { // TODO // ha2 += String.Format (":{0}", hentity); - } + } return HashToHexString (ha2); } - string? Response (string username, string password, HttpURLConnection webRequest) + string? Response (string username, string password, HttpURLConnection webRequest) { string response = $"{HA1 (username, password)}:{Nonce}:"; if (QOP != null) @@ -128,13 +128,13 @@ public bool Parse (string challenge) return HashToHexString (response); } - public Authorization? Authenticate (HttpURLConnection request, ICredentials credentials) + public Authorization? Authenticate (HttpURLConnection request, ICredentials credentials) { if (parser == null) throw new InvalidOperationException (); if (request == null) return null; - + lastUse = DateTime.Now; var uri = new Uri (request.URL?.ToString ()!); NetworkCredential cred = credentials.GetCredential (uri, "digest"); diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs b/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs index 084fd24d9ec..961005e362a 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs @@ -314,7 +314,7 @@ static string GetErrorCode (string message) Tuple.Create ("APT2097", "failed to open directory"), Tuple.Create ("APT2098", "failed to open file"), Tuple.Create ("APT2099", "failed to open resources.arsc"), - Tuple.Create ("APT2100", "failed to open resources.pb"), + Tuple.Create ("APT2100", "failed to open resources.pb"), // lgtm [csharp/responsible-ai/ml-training-and-serialization-files-referenced] These are not the droids you are looking for. Not ML data training files. Tuple.Create ("APT2101", "failed to open"), Tuple.Create ("APT2102", "failed to parse binary XML"), Tuple.Create ("APT2103", "failed to parse binary"), @@ -367,7 +367,7 @@ static string GetErrorCode (string message) Tuple.Create ("APT2150", "invalid preferred density"), Tuple.Create ("APT2151", "invalid resource ID"), Tuple.Create ("APT2152", "invalid resource name"), - Tuple.Create ("APT2153", "invalid resources.pb"), + Tuple.Create ("APT2153", "invalid resources.pb"), // lgtm [csharp/responsible-ai/ml-training-and-serialization-files-referenced] These are not the droids you are looking for. Not ML data training files. Tuple.Create ("APT2154", "invalid split name"), Tuple.Create ("APT2155", "invalid split parameter"), Tuple.Create ("APT2156", "invalid static library"), diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsLegacy.apkdesc b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsLegacy.apkdesc index e1f72ba5de2..3ecdb2d3c42 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsLegacy.apkdesc +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsLegacy.apkdesc @@ -5,125 +5,125 @@ "Size": 3140 }, "assemblies/FormsViewGroup.dll": { - "Size": 7215 + "Size": 7207 }, "assemblies/Java.Interop.dll": { - "Size": 69955 + "Size": 69944 }, "assemblies/Mono.Android.dll": { - "Size": 572710 + "Size": 571969 }, "assemblies/Mono.Security.dll": { - "Size": 68432 + "Size": 68430 }, "assemblies/mscorlib.dll": { - "Size": 915407 + "Size": 915393 }, "assemblies/System.Core.dll": { - "Size": 164046 + "Size": 164045 }, "assemblies/System.dll": { - "Size": 388865 + "Size": 388862 }, "assemblies/System.Drawing.Common.dll": { - "Size": 12365 + "Size": 12356 }, "assemblies/System.Net.Http.dll": { "Size": 110693 }, "assemblies/System.Numerics.dll": { - "Size": 15683 + "Size": 15680 }, "assemblies/System.Runtime.Serialization.dll": { - "Size": 186660 + "Size": 186653 }, "assemblies/System.ServiceModel.Internals.dll": { - "Size": 26593 + "Size": 26585 }, "assemblies/System.Xml.dll": { - "Size": 395657 + "Size": 395652 }, "assemblies/UnnamedProject.dll": { - "Size": 116986 + "Size": 116978 }, "assemblies/Xamarin.AndroidX.Activity.dll": { - "Size": 7697 + "Size": 7689 }, "assemblies/Xamarin.AndroidX.AppCompat.AppCompatResources.dll": { - "Size": 6648 + "Size": 6640 }, "assemblies/Xamarin.AndroidX.AppCompat.dll": { - "Size": 125328 + "Size": 125325 }, "assemblies/Xamarin.AndroidX.CardView.dll": { - "Size": 7366 + "Size": 7357 }, "assemblies/Xamarin.AndroidX.CoordinatorLayout.dll": { - "Size": 18272 + "Size": 18264 }, "assemblies/Xamarin.AndroidX.Core.dll": { - "Size": 131930 + "Size": 131924 }, "assemblies/Xamarin.AndroidX.DrawerLayout.dll": { - "Size": 15426 + "Size": 15422 }, "assemblies/Xamarin.AndroidX.Fragment.dll": { - "Size": 43135 + "Size": 43130 }, "assemblies/Xamarin.AndroidX.Legacy.Support.Core.UI.dll": { - "Size": 6715 + "Size": 6707 }, "assemblies/Xamarin.AndroidX.Lifecycle.Common.dll": { - "Size": 7062 + "Size": 7054 }, "assemblies/Xamarin.AndroidX.Lifecycle.LiveData.Core.dll": { - "Size": 7194 + "Size": 7186 }, "assemblies/Xamarin.AndroidX.Lifecycle.ViewModel.dll": { - "Size": 4873 + "Size": 4862 }, "assemblies/Xamarin.AndroidX.Loader.dll": { - "Size": 13585 + "Size": 13578 }, "assemblies/Xamarin.AndroidX.RecyclerView.dll": { - "Size": 102326 + "Size": 102322 }, "assemblies/Xamarin.AndroidX.SavedState.dll": { - "Size": 6268 + "Size": 6265 }, "assemblies/Xamarin.AndroidX.SwipeRefreshLayout.dll": { - "Size": 11272 + "Size": 11261 }, "assemblies/Xamarin.AndroidX.ViewPager.dll": { - "Size": 19424 + "Size": 19416 }, "assemblies/Xamarin.Forms.Core.dll": { - "Size": 524736 + "Size": 524728 }, "assemblies/Xamarin.Forms.Platform.Android.dll": { - "Size": 384872 + "Size": 384861 }, "assemblies/Xamarin.Forms.Platform.dll": { "Size": 56878 }, "assemblies/Xamarin.Forms.Xaml.dll": { - "Size": 55801 + "Size": 55795 }, "assemblies/Xamarin.Google.Android.Material.dll": { - "Size": 43497 + "Size": 43489 }, "classes.dex": { - "Size": 3533252 + "Size": 3518696 }, "lib/arm64-v8a/libmono-btls-shared.so": { "Size": 1613872 }, + "lib/arm64-v8a/libmonodroid.so": { + "Size": 277472 + }, "lib/arm64-v8a/libmono-native.so": { "Size": 750976 }, - "lib/arm64-v8a/libmonodroid.so": { - "Size": 277744 - }, "lib/arm64-v8a/libmonosgen-2.0.so": { "Size": 4039176 }, @@ -145,10 +145,10 @@ "META-INF/androidx.activity_activity.version": { "Size": 6 }, - "META-INF/androidx.appcompat_appcompat-resources.version": { + "META-INF/androidx.appcompat_appcompat.version": { "Size": 6 }, - "META-INF/androidx.appcompat_appcompat.version": { + "META-INF/androidx.appcompat_appcompat-resources.version": { "Size": 6 }, "META-INF/androidx.arch.core_core-runtime.version": { @@ -196,10 +196,10 @@ "META-INF/androidx.legacy_legacy-support-v4.version": { "Size": 6 }, - "META-INF/androidx.lifecycle_lifecycle-livedata-core.version": { + "META-INF/androidx.lifecycle_lifecycle-livedata.version": { "Size": 6 }, - "META-INF/androidx.lifecycle_lifecycle-livedata.version": { + "META-INF/androidx.lifecycle_lifecycle-livedata-core.version": { "Size": 6 }, "META-INF/androidx.lifecycle_lifecycle-runtime.version": { @@ -235,10 +235,10 @@ "META-INF/androidx.transition_transition.version": { "Size": 6 }, - "META-INF/androidx.vectordrawable_vectordrawable-animated.version": { + "META-INF/androidx.vectordrawable_vectordrawable.version": { "Size": 6 }, - "META-INF/androidx.vectordrawable_vectordrawable.version": { + "META-INF/androidx.vectordrawable_vectordrawable-animated.version": { "Size": 6 }, "META-INF/androidx.versionedparcelable_versionedparcelable.version": { @@ -256,12 +256,6 @@ "META-INF/proguard/androidx-annotations.pro": { "Size": 339 }, - "res/anim-v21/design_bottom_sheet_slide_in.xml": { - "Size": 616 - }, - "res/anim-v21/design_bottom_sheet_slide_out.xml": { - "Size": 616 - }, "res/anim/abc_fade_in.xml": { "Size": 388 }, @@ -358,9 +352,6 @@ "res/anim/exittoright.xml": { "Size": 468 }, - "res/animator-v21/design_appbar_state_list_animator.xml": { - "Size": 1216 - }, "res/animator/design_fab_hide_motion_spec.xml": { "Size": 796 }, @@ -388,38 +379,14 @@ "res/animator/mtrl_fab_transformation_sheet_expand_spec.xml": { "Size": 1888 }, - "res/color-v21/abc_btn_colored_borderless_text_material.xml": { - "Size": 464 - }, - "res/color-v23/abc_btn_colored_borderless_text_material.xml": { - "Size": 500 - }, - "res/color-v23/abc_btn_colored_text_material.xml": { - "Size": 500 - }, - "res/color-v23/abc_color_highlight_material.xml": { - "Size": 544 - }, - "res/color-v23/abc_tint_btn_checkable.xml": { - "Size": 624 - }, - "res/color-v23/abc_tint_default.xml": { - "Size": 1120 - }, - "res/color-v23/abc_tint_edittext.xml": { - "Size": 668 - }, - "res/color-v23/abc_tint_seek_thumb.xml": { - "Size": 500 - }, - "res/color-v23/abc_tint_spinner.xml": { - "Size": 668 + "res/animator-v21/design_appbar_state_list_animator.xml": { + "Size": 1216 }, - "res/color-v23/abc_tint_switch_track.xml": { - "Size": 664 + "res/anim-v21/design_bottom_sheet_slide_in.xml": { + "Size": 616 }, - "res/color-v23/design_tint_password_toggle.xml": { - "Size": 376 + "res/anim-v21/design_bottom_sheet_slide_out.xml": { + "Size": 616 }, "res/color/abc_background_cache_hint_selector_material_dark.xml": { "Size": 468 @@ -523,10 +490,10 @@ "res/color/mtrl_tabs_colored_ripple_color.xml": { "Size": 948 }, - "res/color/mtrl_tabs_icon_color_selector_colored.xml": { + "res/color/mtrl_tabs_icon_color_selector.xml": { "Size": 464 }, - "res/color/mtrl_tabs_icon_color_selector.xml": { + "res/color/mtrl_tabs_icon_color_selector_colored.xml": { "Size": 464 }, "res/color/mtrl_tabs_legacy_text_color_selector.xml": { @@ -544,159 +511,375 @@ "res/color/switch_thumb_material_light.xml": { "Size": 464 }, - "res/drawable-anydpi-v21/design_ic_visibility_off.xml": { - "Size": 1144 - }, - "res/drawable-anydpi-v21/design_ic_visibility.xml": { - "Size": 540 + "res/color-v21/abc_btn_colored_borderless_text_material.xml": { + "Size": 464 }, - "res/drawable-hdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png": { - "Size": 272 + "res/color-v23/abc_btn_colored_borderless_text_material.xml": { + "Size": 500 }, - "res/drawable-hdpi-v4/abc_btn_check_to_on_mtrl_000.png": { - "Size": 227 + "res/color-v23/abc_btn_colored_text_material.xml": { + "Size": 500 }, - "res/drawable-hdpi-v4/abc_btn_check_to_on_mtrl_015.png": { - "Size": 404 + "res/color-v23/abc_color_highlight_material.xml": { + "Size": 544 }, - "res/drawable-hdpi-v4/abc_btn_radio_to_on_mtrl_000.png": { - "Size": 464 + "res/color-v23/abc_tint_btn_checkable.xml": { + "Size": 624 }, - "res/drawable-hdpi-v4/abc_btn_radio_to_on_mtrl_015.png": { - "Size": 563 + "res/color-v23/abc_tint_default.xml": { + "Size": 1120 }, - "res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png": { - "Size": 1096 + "res/color-v23/abc_tint_edittext.xml": { + "Size": 668 }, - "res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png": { - "Size": 1243 + "res/color-v23/abc_tint_seek_thumb.xml": { + "Size": 500 }, - "res/drawable-hdpi-v4/abc_cab_background_top_mtrl_alpha.9.png": { - "Size": 226 + "res/color-v23/abc_tint_spinner.xml": { + "Size": 668 }, - "res/drawable-hdpi-v4/abc_ic_commit_search_api_mtrl_alpha.png": { - "Size": 171 + "res/color-v23/abc_tint_switch_track.xml": { + "Size": 664 }, - "res/drawable-hdpi-v4/abc_ic_menu_copy_mtrl_am_alpha.png": { - "Size": 202 + "res/color-v23/design_tint_password_toggle.xml": { + "Size": 376 }, - "res/drawable-hdpi-v4/abc_ic_menu_cut_mtrl_alpha.png": { - "Size": 404 + "res/drawable/abc_btn_borderless_material.xml": { + "Size": 588 }, - "res/drawable-hdpi-v4/abc_ic_menu_paste_mtrl_am_alpha.png": { - "Size": 226 + "res/drawable/abc_btn_check_material.xml": { + "Size": 464 }, - "res/drawable-hdpi-v4/abc_ic_menu_selectall_mtrl_alpha.png": { - "Size": 215 + "res/drawable/abc_btn_check_material_anim.xml": { + "Size": 816 }, - "res/drawable-hdpi-v4/abc_ic_menu_share_mtrl_alpha.png": { - "Size": 389 + "res/drawable/abc_btn_colored_material.xml": { + "Size": 344 }, - "res/drawable-hdpi-v4/abc_ic_star_black_16dp.png": { - "Size": 263 + "res/drawable/abc_btn_default_mtrl_shape.xml": { + "Size": 932 }, - "res/drawable-hdpi-v4/abc_ic_star_black_36dp.png": { - "Size": 522 + "res/drawable/abc_btn_radio_material.xml": { + "Size": 464 }, - "res/drawable-hdpi-v4/abc_ic_star_black_48dp.png": { - "Size": 668 + "res/drawable/abc_btn_radio_material_anim.xml": { + "Size": 816 }, - "res/drawable-hdpi-v4/abc_ic_star_half_black_16dp.png": { - "Size": 197 + "res/drawable/abc_cab_background_internal_bg.xml": { + "Size": 372 }, - "res/drawable-hdpi-v4/abc_ic_star_half_black_36dp.png": { - "Size": 328 + "res/drawable/abc_cab_background_top_material.xml": { + "Size": 336 }, - "res/drawable-hdpi-v4/abc_ic_star_half_black_48dp.png": { - "Size": 431 + "res/drawable/abc_dialog_material_background.xml": { + "Size": 716 }, - "res/drawable-hdpi-v4/abc_list_divider_mtrl_alpha.9.png": { - "Size": 167 + "res/drawable/abc_edit_text_material.xml": { + "Size": 868 }, - "res/drawable-hdpi-v4/abc_list_focused_holo.9.png": { - "Size": 244 + "res/drawable/abc_ic_ab_back_material.xml": { + "Size": 692 }, - "res/drawable-hdpi-v4/abc_list_longpressed_holo.9.png": { - "Size": 212 + "res/drawable/abc_ic_arrow_drop_right_black_24dp.xml": { + "Size": 1000 }, - "res/drawable-hdpi-v4/abc_list_pressed_holo_dark.9.png": { - "Size": 208 + "res/drawable/abc_ic_clear_material.xml": { + "Size": 684 }, - "res/drawable-hdpi-v4/abc_list_pressed_holo_light.9.png": { - "Size": 208 + "res/drawable/abc_ic_go_search_api_material.xml": { + "Size": 640 }, - "res/drawable-hdpi-v4/abc_list_selector_disabled_holo_dark.9.png": { - "Size": 228 + "res/drawable/abc_ic_menu_overflow_material.xml": { + "Size": 792 }, - "res/drawable-hdpi-v4/abc_list_selector_disabled_holo_light.9.png": { - "Size": 229 + "res/drawable/abc_ic_search_api_material.xml": { + "Size": 812 }, - "res/drawable-hdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png": { - "Size": 738 + "res/drawable/abc_ic_voice_search_api_material.xml": { + "Size": 828 }, - "res/drawable-hdpi-v4/abc_popup_background_mtrl_mult.9.png": { - "Size": 1098 + "res/drawable/abc_item_background_holo_dark.xml": { + "Size": 1012 }, - "res/drawable-hdpi-v4/abc_scrubber_control_off_mtrl_alpha.png": { - "Size": 201 + "res/drawable/abc_item_background_holo_light.xml": { + "Size": 1012 }, - "res/drawable-hdpi-v4/abc_scrubber_control_to_pressed_mtrl_000.png": { - "Size": 196 + "res/drawable/abc_list_divider_material.xml": { + "Size": 480 }, - "res/drawable-hdpi-v4/abc_scrubber_control_to_pressed_mtrl_005.png": { - "Size": 272 + "res/drawable/abc_list_selector_background_transition_holo_dark.xml": { + "Size": 424 }, - "res/drawable-hdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png": { - "Size": 205 + "res/drawable/abc_list_selector_background_transition_holo_light.xml": { + "Size": 424 }, - "res/drawable-hdpi-v4/abc_scrubber_track_mtrl_alpha.9.png": { - "Size": 196 + "res/drawable/abc_list_selector_holo_dark.xml": { + "Size": 1064 }, - "res/drawable-hdpi-v4/abc_spinner_mtrl_am_alpha.9.png": { - "Size": 345 + "res/drawable/abc_list_selector_holo_light.xml": { + "Size": 1064 }, - "res/drawable-hdpi-v4/abc_switch_track_mtrl_alpha.9.png": { - "Size": 484 + "res/drawable/abc_ratingbar_indicator_material.xml": { + "Size": 664 }, - "res/drawable-hdpi-v4/abc_tab_indicator_mtrl_alpha.9.png": { - "Size": 190 + "res/drawable/abc_ratingbar_material.xml": { + "Size": 664 }, - "res/drawable-hdpi-v4/abc_text_select_handle_left_mtrl_dark.png": { - "Size": 278 + "res/drawable/abc_ratingbar_small_material.xml": { + "Size": 664 }, - "res/drawable-hdpi-v4/abc_text_select_handle_left_mtrl_light.png": { - "Size": 278 + "res/drawable/abc_seekbar_thumb_material.xml": { + "Size": 1100 }, - "res/drawable-hdpi-v4/abc_text_select_handle_middle_mtrl_dark.png": { - "Size": 398 + "res/drawable/abc_seekbar_tick_mark_material.xml": { + "Size": 516 }, - "res/drawable-hdpi-v4/abc_text_select_handle_middle_mtrl_light.png": { - "Size": 396 + "res/drawable/abc_seekbar_track_material.xml": { + "Size": 1408 }, - "res/drawable-hdpi-v4/abc_text_select_handle_right_mtrl_dark.png": { - "Size": 263 + "res/drawable/abc_spinner_textfield_background_material.xml": { + "Size": 1160 }, - "res/drawable-hdpi-v4/abc_text_select_handle_right_mtrl_light.png": { - "Size": 262 + "res/drawable/abc_switch_thumb_material.xml": { + "Size": 464 }, - "res/drawable-hdpi-v4/abc_textfield_activated_mtrl_alpha.9.png": { - "Size": 186 + "res/drawable/abc_tab_indicator_material.xml": { + "Size": 468 }, - "res/drawable-hdpi-v4/abc_textfield_default_mtrl_alpha.9.png": { - "Size": 192 + "res/drawable/abc_text_cursor_material.xml": { + "Size": 516 }, - "res/drawable-hdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png": { - "Size": 178 + "res/drawable/abc_textfield_search_material.xml": { + "Size": 756 }, - "res/drawable-hdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png": { + "res/drawable/abc_vector_test.xml": { + "Size": 612 + }, + "res/drawable/btn_checkbox_checked_mtrl.xml": { + "Size": 2688 + }, + "res/drawable/btn_checkbox_checked_to_unchecked_mtrl_animation.xml": { + "Size": 688 + }, + "res/drawable/btn_checkbox_unchecked_mtrl.xml": { + "Size": 2660 + }, + "res/drawable/btn_checkbox_unchecked_to_checked_mtrl_animation.xml": { + "Size": 688 + }, + "res/drawable/btn_radio_off_mtrl.xml": { + "Size": 1728 + }, + "res/drawable/btn_radio_off_to_on_mtrl_animation.xml": { + "Size": 680 + }, + "res/drawable/btn_radio_on_mtrl.xml": { + "Size": 1656 + }, + "res/drawable/btn_radio_on_to_off_mtrl_animation.xml": { + "Size": 680 + }, + "res/drawable/design_bottom_navigation_item_background.xml": { + "Size": 784 + }, + "res/drawable/design_fab_background.xml": { + "Size": 372 + }, + "res/drawable/design_password_eye.xml": { + "Size": 464 + }, + "res/drawable/design_snackbar_background.xml": { + "Size": 484 + }, + "res/drawable/ic_mtrl_chip_checked_black.xml": { + "Size": 600 + }, + "res/drawable/ic_mtrl_chip_checked_circle.xml": { + "Size": 940 + }, + "res/drawable/ic_mtrl_chip_close_circle.xml": { + "Size": 808 + }, + "res/drawable/mtrl_snackbar_background.xml": { + "Size": 484 + }, + "res/drawable/mtrl_tabs_default_indicator.xml": { + "Size": 628 + }, + "res/drawable/navigation_empty_icon.xml": { + "Size": 516 + }, + "res/drawable/notification_bg.xml": { + "Size": 532 + }, + "res/drawable/notification_bg_low.xml": { + "Size": 532 + }, + "res/drawable/notification_icon_background.xml": { + "Size": 372 + }, + "res/drawable/notification_tile_bg.xml": { + "Size": 304 + }, + "res/drawable/tooltip_frame_dark.xml": { + "Size": 484 + }, + "res/drawable/tooltip_frame_light.xml": { + "Size": 484 + }, + "res/drawable-anydpi-v21/design_ic_visibility.xml": { + "Size": 540 + }, + "res/drawable-anydpi-v21/design_ic_visibility_off.xml": { + "Size": 1144 + }, + "res/drawable-hdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png": { + "Size": 272 + }, + "res/drawable-hdpi-v4/abc_btn_check_to_on_mtrl_000.png": { + "Size": 227 + }, + "res/drawable-hdpi-v4/abc_btn_check_to_on_mtrl_015.png": { + "Size": 404 + }, + "res/drawable-hdpi-v4/abc_btn_radio_to_on_mtrl_000.png": { + "Size": 464 + }, + "res/drawable-hdpi-v4/abc_btn_radio_to_on_mtrl_015.png": { + "Size": 563 + }, + "res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png": { + "Size": 1096 + }, + "res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png": { + "Size": 1243 + }, + "res/drawable-hdpi-v4/abc_cab_background_top_mtrl_alpha.9.png": { + "Size": 226 + }, + "res/drawable-hdpi-v4/abc_ic_commit_search_api_mtrl_alpha.png": { + "Size": 171 + }, + "res/drawable-hdpi-v4/abc_ic_menu_copy_mtrl_am_alpha.png": { + "Size": 202 + }, + "res/drawable-hdpi-v4/abc_ic_menu_cut_mtrl_alpha.png": { + "Size": 404 + }, + "res/drawable-hdpi-v4/abc_ic_menu_paste_mtrl_am_alpha.png": { + "Size": 226 + }, + "res/drawable-hdpi-v4/abc_ic_menu_selectall_mtrl_alpha.png": { + "Size": 215 + }, + "res/drawable-hdpi-v4/abc_ic_menu_share_mtrl_alpha.png": { + "Size": 389 + }, + "res/drawable-hdpi-v4/abc_ic_star_black_16dp.png": { + "Size": 263 + }, + "res/drawable-hdpi-v4/abc_ic_star_black_36dp.png": { + "Size": 522 + }, + "res/drawable-hdpi-v4/abc_ic_star_black_48dp.png": { + "Size": 668 + }, + "res/drawable-hdpi-v4/abc_ic_star_half_black_16dp.png": { + "Size": 197 + }, + "res/drawable-hdpi-v4/abc_ic_star_half_black_36dp.png": { + "Size": 328 + }, + "res/drawable-hdpi-v4/abc_ic_star_half_black_48dp.png": { + "Size": 431 + }, + "res/drawable-hdpi-v4/abc_list_divider_mtrl_alpha.9.png": { + "Size": 167 + }, + "res/drawable-hdpi-v4/abc_list_focused_holo.9.png": { + "Size": 244 + }, + "res/drawable-hdpi-v4/abc_list_longpressed_holo.9.png": { + "Size": 212 + }, + "res/drawable-hdpi-v4/abc_list_pressed_holo_dark.9.png": { + "Size": 208 + }, + "res/drawable-hdpi-v4/abc_list_pressed_holo_light.9.png": { + "Size": 208 + }, + "res/drawable-hdpi-v4/abc_list_selector_disabled_holo_dark.9.png": { + "Size": 228 + }, + "res/drawable-hdpi-v4/abc_list_selector_disabled_holo_light.9.png": { + "Size": 229 + }, + "res/drawable-hdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png": { + "Size": 738 + }, + "res/drawable-hdpi-v4/abc_popup_background_mtrl_mult.9.png": { + "Size": 1098 + }, + "res/drawable-hdpi-v4/abc_scrubber_control_off_mtrl_alpha.png": { + "Size": 201 + }, + "res/drawable-hdpi-v4/abc_scrubber_control_to_pressed_mtrl_000.png": { + "Size": 196 + }, + "res/drawable-hdpi-v4/abc_scrubber_control_to_pressed_mtrl_005.png": { + "Size": 272 + }, + "res/drawable-hdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png": { + "Size": 205 + }, + "res/drawable-hdpi-v4/abc_scrubber_track_mtrl_alpha.9.png": { + "Size": 196 + }, + "res/drawable-hdpi-v4/abc_spinner_mtrl_am_alpha.9.png": { + "Size": 345 + }, + "res/drawable-hdpi-v4/abc_switch_track_mtrl_alpha.9.png": { + "Size": 484 + }, + "res/drawable-hdpi-v4/abc_tab_indicator_mtrl_alpha.9.png": { + "Size": 190 + }, + "res/drawable-hdpi-v4/abc_text_select_handle_left_mtrl_dark.png": { + "Size": 278 + }, + "res/drawable-hdpi-v4/abc_text_select_handle_left_mtrl_light.png": { + "Size": 278 + }, + "res/drawable-hdpi-v4/abc_text_select_handle_middle_mtrl_dark.png": { + "Size": 398 + }, + "res/drawable-hdpi-v4/abc_text_select_handle_middle_mtrl_light.png": { + "Size": 396 + }, + "res/drawable-hdpi-v4/abc_text_select_handle_right_mtrl_dark.png": { + "Size": 263 + }, + "res/drawable-hdpi-v4/abc_text_select_handle_right_mtrl_light.png": { + "Size": 262 + }, + "res/drawable-hdpi-v4/abc_textfield_activated_mtrl_alpha.9.png": { + "Size": 186 + }, + "res/drawable-hdpi-v4/abc_textfield_default_mtrl_alpha.9.png": { + "Size": 192 + }, + "res/drawable-hdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png": { "Size": 178 }, - "res/drawable-hdpi-v4/design_ic_visibility_off.png": { - "Size": 507 + "res/drawable-hdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png": { + "Size": 178 }, "res/drawable-hdpi-v4/design_ic_visibility.png": { "Size": 470 }, + "res/drawable-hdpi-v4/design_ic_visibility_off.png": { + "Size": 507 + }, "res/drawable-hdpi-v4/icon.png": { "Size": 2178 }, @@ -706,12 +889,12 @@ "res/drawable-hdpi-v4/notification_bg_low_pressed.9.png": { "Size": 225 }, - "res/drawable-hdpi-v4/notification_bg_normal_pressed.9.png": { - "Size": 225 - }, "res/drawable-hdpi-v4/notification_bg_normal.9.png": { "Size": 212 }, + "res/drawable-hdpi-v4/notification_bg_normal_pressed.9.png": { + "Size": 225 + }, "res/drawable-hdpi-v4/notify_panel_notification_icon_bg.png": { "Size": 107 }, @@ -901,12 +1084,12 @@ "res/drawable-mdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png": { "Size": 178 }, - "res/drawable-mdpi-v4/design_ic_visibility_off.png": { - "Size": 351 - }, "res/drawable-mdpi-v4/design_ic_visibility.png": { "Size": 309 }, + "res/drawable-mdpi-v4/design_ic_visibility_off.png": { + "Size": 351 + }, "res/drawable-mdpi-v4/icon.png": { "Size": 1490 }, @@ -916,12 +1099,12 @@ "res/drawable-mdpi-v4/notification_bg_low_pressed.9.png": { "Size": 223 }, - "res/drawable-mdpi-v4/notification_bg_normal_pressed.9.png": { - "Size": 223 - }, "res/drawable-mdpi-v4/notification_bg_normal.9.png": { "Size": 215 }, + "res/drawable-mdpi-v4/notification_bg_normal_pressed.9.png": { + "Size": 223 + }, "res/drawable-mdpi-v4/notify_panel_notification_icon_bg.png": { "Size": 98 }, @@ -1129,12 +1312,12 @@ "res/drawable-xhdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png": { "Size": 182 }, - "res/drawable-xhdpi-v4/design_ic_visibility_off.png": { - "Size": 629 - }, "res/drawable-xhdpi-v4/design_ic_visibility.png": { "Size": 593 }, + "res/drawable-xhdpi-v4/design_ic_visibility_off.png": { + "Size": 629 + }, "res/drawable-xhdpi-v4/icon.png": { "Size": 3098 }, @@ -1144,12 +1327,12 @@ "res/drawable-xhdpi-v4/notification_bg_low_pressed.9.png": { "Size": 252 }, - "res/drawable-xhdpi-v4/notification_bg_normal_pressed.9.png": { - "Size": 247 - }, "res/drawable-xhdpi-v4/notification_bg_normal.9.png": { "Size": 221 }, + "res/drawable-xhdpi-v4/notification_bg_normal_pressed.9.png": { + "Size": 247 + }, "res/drawable-xhdpi-v4/notify_panel_notification_icon_bg.png": { "Size": 138 }, @@ -1294,12 +1477,12 @@ "res/drawable-xxhdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png": { "Size": 186 }, - "res/drawable-xxhdpi-v4/design_ic_visibility_off.png": { - "Size": 884 - }, "res/drawable-xxhdpi-v4/design_ic_visibility.png": { "Size": 868 }, + "res/drawable-xxhdpi-v4/design_ic_visibility_off.png": { + "Size": 884 + }, "res/drawable-xxhdpi-v4/icon.png": { "Size": 4674 }, @@ -1381,207 +1564,15 @@ "res/drawable-xxxhdpi-v4/abc_text_select_handle_right_mtrl_light.png": { "Size": 513 }, - "res/drawable-xxxhdpi-v4/design_ic_visibility_off.png": { - "Size": 1201 - }, "res/drawable-xxxhdpi-v4/design_ic_visibility.png": { "Size": 1155 }, + "res/drawable-xxxhdpi-v4/design_ic_visibility_off.png": { + "Size": 1201 + }, "res/drawable-xxxhdpi-v4/icon.png": { "Size": 6832 }, - "res/drawable/abc_btn_borderless_material.xml": { - "Size": 588 - }, - "res/drawable/abc_btn_check_material_anim.xml": { - "Size": 816 - }, - "res/drawable/abc_btn_check_material.xml": { - "Size": 464 - }, - "res/drawable/abc_btn_colored_material.xml": { - "Size": 344 - }, - "res/drawable/abc_btn_default_mtrl_shape.xml": { - "Size": 932 - }, - "res/drawable/abc_btn_radio_material_anim.xml": { - "Size": 816 - }, - "res/drawable/abc_btn_radio_material.xml": { - "Size": 464 - }, - "res/drawable/abc_cab_background_internal_bg.xml": { - "Size": 372 - }, - "res/drawable/abc_cab_background_top_material.xml": { - "Size": 336 - }, - "res/drawable/abc_dialog_material_background.xml": { - "Size": 716 - }, - "res/drawable/abc_edit_text_material.xml": { - "Size": 868 - }, - "res/drawable/abc_ic_ab_back_material.xml": { - "Size": 692 - }, - "res/drawable/abc_ic_arrow_drop_right_black_24dp.xml": { - "Size": 1000 - }, - "res/drawable/abc_ic_clear_material.xml": { - "Size": 684 - }, - "res/drawable/abc_ic_go_search_api_material.xml": { - "Size": 640 - }, - "res/drawable/abc_ic_menu_overflow_material.xml": { - "Size": 792 - }, - "res/drawable/abc_ic_search_api_material.xml": { - "Size": 812 - }, - "res/drawable/abc_ic_voice_search_api_material.xml": { - "Size": 828 - }, - "res/drawable/abc_item_background_holo_dark.xml": { - "Size": 1012 - }, - "res/drawable/abc_item_background_holo_light.xml": { - "Size": 1012 - }, - "res/drawable/abc_list_divider_material.xml": { - "Size": 480 - }, - "res/drawable/abc_list_selector_background_transition_holo_dark.xml": { - "Size": 424 - }, - "res/drawable/abc_list_selector_background_transition_holo_light.xml": { - "Size": 424 - }, - "res/drawable/abc_list_selector_holo_dark.xml": { - "Size": 1064 - }, - "res/drawable/abc_list_selector_holo_light.xml": { - "Size": 1064 - }, - "res/drawable/abc_ratingbar_indicator_material.xml": { - "Size": 664 - }, - "res/drawable/abc_ratingbar_material.xml": { - "Size": 664 - }, - "res/drawable/abc_ratingbar_small_material.xml": { - "Size": 664 - }, - "res/drawable/abc_seekbar_thumb_material.xml": { - "Size": 1100 - }, - "res/drawable/abc_seekbar_tick_mark_material.xml": { - "Size": 516 - }, - "res/drawable/abc_seekbar_track_material.xml": { - "Size": 1408 - }, - "res/drawable/abc_spinner_textfield_background_material.xml": { - "Size": 1160 - }, - "res/drawable/abc_switch_thumb_material.xml": { - "Size": 464 - }, - "res/drawable/abc_tab_indicator_material.xml": { - "Size": 468 - }, - "res/drawable/abc_text_cursor_material.xml": { - "Size": 516 - }, - "res/drawable/abc_textfield_search_material.xml": { - "Size": 756 - }, - "res/drawable/abc_vector_test.xml": { - "Size": 612 - }, - "res/drawable/btn_checkbox_checked_mtrl.xml": { - "Size": 2688 - }, - "res/drawable/btn_checkbox_checked_to_unchecked_mtrl_animation.xml": { - "Size": 688 - }, - "res/drawable/btn_checkbox_unchecked_mtrl.xml": { - "Size": 2660 - }, - "res/drawable/btn_checkbox_unchecked_to_checked_mtrl_animation.xml": { - "Size": 688 - }, - "res/drawable/btn_radio_off_mtrl.xml": { - "Size": 1728 - }, - "res/drawable/btn_radio_off_to_on_mtrl_animation.xml": { - "Size": 680 - }, - "res/drawable/btn_radio_on_mtrl.xml": { - "Size": 1656 - }, - "res/drawable/btn_radio_on_to_off_mtrl_animation.xml": { - "Size": 680 - }, - "res/drawable/design_bottom_navigation_item_background.xml": { - "Size": 784 - }, - "res/drawable/design_fab_background.xml": { - "Size": 372 - }, - "res/drawable/design_password_eye.xml": { - "Size": 464 - }, - "res/drawable/design_snackbar_background.xml": { - "Size": 484 - }, - "res/drawable/ic_mtrl_chip_checked_black.xml": { - "Size": 600 - }, - "res/drawable/ic_mtrl_chip_checked_circle.xml": { - "Size": 940 - }, - "res/drawable/ic_mtrl_chip_close_circle.xml": { - "Size": 808 - }, - "res/drawable/mtrl_snackbar_background.xml": { - "Size": 484 - }, - "res/drawable/mtrl_tabs_default_indicator.xml": { - "Size": 628 - }, - "res/drawable/navigation_empty_icon.xml": { - "Size": 516 - }, - "res/drawable/notification_bg_low.xml": { - "Size": 532 - }, - "res/drawable/notification_bg.xml": { - "Size": 532 - }, - "res/drawable/notification_icon_background.xml": { - "Size": 372 - }, - "res/drawable/notification_tile_bg.xml": { - "Size": 304 - }, - "res/drawable/tooltip_frame_dark.xml": { - "Size": 484 - }, - "res/drawable/tooltip_frame_light.xml": { - "Size": 484 - }, - "res/interpolator-v21/mtrl_fast_out_linear_in.xml": { - "Size": 400 - }, - "res/interpolator-v21/mtrl_fast_out_slow_in.xml": { - "Size": 400 - }, - "res/interpolator-v21/mtrl_linear_out_slow_in.xml": { - "Size": 400 - }, "res/interpolator/btn_checkbox_checked_mtrl_animation_interpolator_0.xml": { "Size": 316 }, @@ -1609,53 +1600,20 @@ "res/interpolator/mtrl_fast_out_slow_in.xml": { "Size": 144 }, - "res/interpolator/mtrl_linear_out_slow_in.xml": { - "Size": 136 - }, "res/interpolator/mtrl_linear.xml": { "Size": 132 }, - "res/layout-sw600dp-v13/design_layout_snackbar.xml": { - "Size": 528 - }, - "res/layout-sw600dp-v13/mtrl_layout_snackbar.xml": { - "Size": 528 - }, - "res/layout-v16/notification_template_custom_big.xml": { - "Size": 3208 - }, - "res/layout-v21/abc_screen_toolbar.xml": { - "Size": 1504 - }, - "res/layout-v21/fallbacktoolbardonotuse.xml": { - "Size": 496 - }, - "res/layout-v21/notification_action_tombstone.xml": { - "Size": 1228 - }, - "res/layout-v21/notification_action.xml": { - "Size": 1052 - }, - "res/layout-v21/notification_template_custom_big.xml": { - "Size": 2456 - }, - "res/layout-v21/notification_template_icon_group.xml": { - "Size": 988 - }, - "res/layout-v21/toolbar.xml": { - "Size": 496 - }, - "res/layout-v22/abc_alert_dialog_button_bar_material.xml": { - "Size": 1584 + "res/interpolator/mtrl_linear_out_slow_in.xml": { + "Size": 136 }, - "res/layout-v26/abc_screen_toolbar.xml": { - "Size": 1560 + "res/interpolator-v21/mtrl_fast_out_linear_in.xml": { + "Size": 400 }, - "res/layout-watch-v20/abc_alert_dialog_button_bar_material.xml": { - "Size": 1208 + "res/interpolator-v21/mtrl_fast_out_slow_in.xml": { + "Size": 400 }, - "res/layout-watch-v20/abc_alert_dialog_title_material.xml": { - "Size": 1352 + "res/interpolator-v21/mtrl_linear_out_slow_in.xml": { + "Size": 400 }, "res/layout/abc_action_bar_title_item.xml": { "Size": 872 @@ -1675,12 +1633,12 @@ "res/layout/abc_action_mode_close_item_material.xml": { "Size": 840 }, - "res/layout/abc_activity_chooser_view_list_item.xml": { - "Size": 1304 - }, "res/layout/abc_activity_chooser_view.xml": { "Size": 1684 }, + "res/layout/abc_activity_chooser_view_list_item.xml": { + "Size": 1304 + }, "res/layout/abc_alert_dialog_button_bar_material.xml": { "Size": 1536 }, @@ -1720,12 +1678,12 @@ "res/layout/abc_screen_content_include.xml": { "Size": 548 }, - "res/layout/abc_screen_simple_overlay_action_mode.xml": { - "Size": 792 - }, "res/layout/abc_screen_simple.xml": { "Size": 832 }, + "res/layout/abc_screen_simple_overlay_action_mode.xml": { + "Size": 792 + }, "res/layout/abc_screen_toolbar.xml": { "Size": 1452 }, @@ -1759,12 +1717,12 @@ "res/layout/design_bottom_sheet_dialog.xml": { "Size": 1184 }, - "res/layout/design_layout_snackbar_include.xml": { - "Size": 1444 - }, "res/layout/design_layout_snackbar.xml": { "Size": 528 }, + "res/layout/design_layout_snackbar_include.xml": { + "Size": 1444 + }, "res/layout/design_layout_tab_icon.xml": { "Size": 408 }, @@ -1774,6 +1732,9 @@ "res/layout/design_menu_item_action_area.xml": { "Size": 320 }, + "res/layout/design_navigation_item.xml": { + "Size": 536 + }, "res/layout/design_navigation_item_header.xml": { "Size": 440 }, @@ -1783,15 +1744,12 @@ "res/layout/design_navigation_item_subheader.xml": { "Size": 564 }, - "res/layout/design_navigation_item.xml": { - "Size": 536 + "res/layout/design_navigation_menu.xml": { + "Size": 528 }, "res/layout/design_navigation_menu_item.xml": { "Size": 856 }, - "res/layout/design_navigation_menu.xml": { - "Size": 528 - }, "res/layout/design_text_input_password_icon.xml": { "Size": 564 }, @@ -1807,35 +1765,35 @@ "res/layout/main.xml": { "Size": 544 }, - "res/layout/mtrl_layout_snackbar_include.xml": { - "Size": 1404 - }, "res/layout/mtrl_layout_snackbar.xml": { "Size": 528 }, - "res/layout/notification_action_tombstone.xml": { - "Size": 1332 + "res/layout/mtrl_layout_snackbar_include.xml": { + "Size": 1404 }, "res/layout/notification_action.xml": { "Size": 1156 }, + "res/layout/notification_action_tombstone.xml": { + "Size": 1332 + }, "res/layout/notification_media_action.xml": { "Size": 564 }, "res/layout/notification_media_cancel_action.xml": { "Size": 744 }, + "res/layout/notification_template_big_media.xml": { + "Size": 1696 + }, "res/layout/notification_template_big_media_custom.xml": { "Size": 3044 }, - "res/layout/notification_template_big_media_narrow_custom.xml": { - "Size": 3216 - }, "res/layout/notification_template_big_media_narrow.xml": { "Size": 1824 }, - "res/layout/notification_template_big_media.xml": { - "Size": 1696 + "res/layout/notification_template_big_media_narrow_custom.xml": { + "Size": 3216 }, "res/layout/notification_template_icon_group.xml": { "Size": 392 @@ -1843,12 +1801,12 @@ "res/layout/notification_template_lines_media.xml": { "Size": 2872 }, - "res/layout/notification_template_media_custom.xml": { - "Size": 2756 - }, "res/layout/notification_template_media.xml": { "Size": 1292 }, + "res/layout/notification_template_media_custom.xml": { + "Size": 2756 + }, "res/layout/notification_template_part_chronometer.xml": { "Size": 440 }, @@ -1879,9 +1837,51 @@ "res/layout/toolbar.xml": { "Size": 452 }, + "res/layout-sw600dp-v13/design_layout_snackbar.xml": { + "Size": 528 + }, + "res/layout-sw600dp-v13/mtrl_layout_snackbar.xml": { + "Size": 528 + }, + "res/layout-v16/notification_template_custom_big.xml": { + "Size": 3208 + }, + "res/layout-v21/abc_screen_toolbar.xml": { + "Size": 1504 + }, + "res/layout-v21/fallbacktoolbardonotuse.xml": { + "Size": 496 + }, + "res/layout-v21/notification_action.xml": { + "Size": 1052 + }, + "res/layout-v21/notification_action_tombstone.xml": { + "Size": 1228 + }, + "res/layout-v21/notification_template_custom_big.xml": { + "Size": 2456 + }, + "res/layout-v21/notification_template_icon_group.xml": { + "Size": 988 + }, + "res/layout-v21/toolbar.xml": { + "Size": 496 + }, + "res/layout-v22/abc_alert_dialog_button_bar_material.xml": { + "Size": 1584 + }, + "res/layout-v26/abc_screen_toolbar.xml": { + "Size": 1560 + }, + "res/layout-watch-v20/abc_alert_dialog_button_bar_material.xml": { + "Size": 1208 + }, + "res/layout-watch-v20/abc_alert_dialog_title_material.xml": { + "Size": 1352 + }, "resources.arsc": { "Size": 341040 } }, - "PackageSize": 9521310 + "PackageSize": 9513118 } \ No newline at end of file diff --git a/src/monodroid/jni/basic-utilities.cc b/src/monodroid/jni/basic-utilities.cc index 8d17bf12e17..adf67f7a9c1 100644 --- a/src/monodroid/jni/basic-utilities.cc +++ b/src/monodroid/jni/basic-utilities.cc @@ -128,6 +128,10 @@ BasicUtilities::file_exists (const char *file) bool BasicUtilities::directory_exists (const char *directory) { + if (directory == nullptr) { + return false; + } + monodroid_stat_t s; if (monodroid_stat (directory, &s) == 0 && (s.st_mode & S_IFMT) == S_IFDIR) return true; diff --git a/src/monodroid/jni/cpp-util.hh b/src/monodroid/jni/cpp-util.hh index 641e506d256..eac76f0625e 100644 --- a/src/monodroid/jni/cpp-util.hh +++ b/src/monodroid/jni/cpp-util.hh @@ -112,7 +112,7 @@ namespace xamarin::android // `sizeof... (Length)` part which subtracts the number of template parameters - the amount of NUL bytes so that // we don't waste space. constexpr size_t total_length = (... + Length) - sizeof... (Length); - char_array ret; + char_array ret; // lgtm [cpp/paddingbyteinformationdisclosure] the buffer is filled in the loop below ret[total_length] = 0; size_t i = 0; diff --git a/src/monodroid/jni/monodroid-glue.cc b/src/monodroid/jni/monodroid-glue.cc index 18e13c1a016..d50c2c73d3a 100644 --- a/src/monodroid/jni/monodroid-glue.cc +++ b/src/monodroid/jni/monodroid-glue.cc @@ -157,6 +157,10 @@ get_xamarin_android_msbuild_path (void) // Compute the final path base_path = utils.utf16_to_utf8 (buffer); + if (base_path == nullptr) { + log_fatal (LOG_DEFAULT, "Failed to convert UTF-16 to UTF-8 in %s", __PRETTY_FUNCTION__); + Helpers::abort_application (); + } CoTaskMemFree (buffer); msbuild_folder_path = utils.path_combine (base_path, suffix); free (base_path); @@ -266,7 +270,7 @@ MonodroidRuntime::log_jit_event (MonoMethod *method, const char *event_name) char* name = mono_method_full_name (method, 1); timing_diff diff (jit_time); - fprintf (jit_log, "JIT method %6s: %s elapsed: %lis:%u::%u\n", event_name, name, static_cast(diff.sec), diff.ms, diff.ns); + fprintf (jit_log, "JIT method %6s: %s elapsed: %lis:%u::%u\n", event_name, name, static_cast(diff.sec), diff.ms, diff.ns); free (name); } @@ -409,7 +413,7 @@ MonodroidRuntime::gather_bundled_assemblies (jstring_array_wrapper &runtimeApks, if (application_config.instant_run_enabled) { for (size_t i = 0; i < AndroidSystem::MAX_OVERRIDES; ++i) { const char *p = androidSystem.get_override_dir (i); - if (!utils.directory_exists (p)) + if (p == nullptr || !utils.directory_exists (p)) continue; log_info (LOG_ASSEMBLY, "Loading TypeMaps from %s", p); embeddedAssemblies.try_load_typemaps_from_directory (p); @@ -1488,6 +1492,10 @@ MonodroidRuntime::monodroid_dlopen (const char *name, int flags, char **err, [[m const char *last_sep = strrchr (the_path, MONODROID_PATH_SEPARATOR_CHAR); if (last_sep != nullptr) { char *dir = utils.strdup_new (the_path, last_sep - the_path); + if (dir == nullptr) { + return false; + } + tmp_name = utils.string_concat (dir, MONODROID_PATH_SEPARATOR, API_DSO_NAME); delete[] dir; if (!utils.file_exists (tmp_name)) { @@ -1514,7 +1522,7 @@ MonodroidRuntime::monodroid_dlopen (const char *name, int flags, char **err, [[m if (!found) { // Next lets try the location of the XA runtime DLL, libxa-internal-api.dll should be next to it. const char *path = get_my_location (false); - found = probe_dll_at (path); + found = probe_dll_at (path); // lgtm [cpp/unguardednullreturndereference] probe_dll_at checks whether the passed pointer is nullptr if (path != nullptr) { free (reinterpret_cast(const_cast(path))); } @@ -1879,6 +1887,11 @@ MonodroidRuntime::load_assembly (MonoAssemblyLoadContextGCHandle alc_handle, jst } const char *assm_name = assembly.get_cstr (); + if (XA_UNLIKELY (assm_name == nullptr)) { + log_warn (LOG_ASSEMBLY, "Unable to load assembly into ALC, name is null"); + return; + } + MonoAssemblyName *aname = mono_assembly_name_new (assm_name); MonoImageOpenStatus open_status; @@ -1908,6 +1921,11 @@ MonodroidRuntime::load_assembly (MonoDomain *domain, jstring_wrapper &assembly) } const char *assm_name = assembly.get_cstr (); + if (XA_UNLIKELY (assm_name == nullptr)) { + log_warn (LOG_ASSEMBLY, "Unable to load assembly into AppDomain, name is null"); + return; + } + MonoAssemblyName *aname = mono_assembly_name_new (assm_name); #ifndef ANDROID @@ -1979,6 +1997,10 @@ MonodroidRuntime::create_and_initialize_domain (JNIEnv* env, jclass runtimeClass bool force_preload_assemblies, bool have_split_apks) { MonoDomain* domain = create_domain (env, runtimeApks, is_root_domain, have_split_apks); +#if defined (ANDROID) + // Asserting this on desktop apparently breaks a Designer test + abort_unless (domain != nullptr, "Failed to create AppDomain"); +#endif // When running on desktop, the root domain is only a dummy so don't initialize it if constexpr (is_running_on_desktop) { @@ -1996,7 +2018,7 @@ MonodroidRuntime::create_and_initialize_domain (JNIEnv* env, jclass runtimeClass #endif // def NET #ifndef ANDROID - if (assembliesBytes != nullptr) + if (assembliesBytes != nullptr && domain != nullptr) designerAssemblies.add_or_update_from_java (domain, env, assemblies, assembliesBytes, assembliesPaths); #endif bool preload = (androidSystem.is_assembly_preload_enabled () || (is_running_on_desktop && force_preload_assemblies));