Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Commit

Permalink
Update assemblies for API-29, mono/mono@761220d9 (#22)
Browse files Browse the repository at this point in the history
Update assemblies for API-29, mono/mono@761220d9

Context: dotnet/android#3305

Commit xamarin/xamarin-android/master@0c9f83b7 included a bump to
mono/mono@761220d9, which [broke API compatibility][0],
removing `System.Diagnostics.Tracing.EventCounter.Dispose()`:

	<h3>Type Changed: System.Diagnostics.Tracing.EventCounter</h3>
	<p>Removed method:</p>
	<pre>
	  <span class='removed removed-method breaking' data-is-breaking>public virtual void Dispose ();</span>
	</pre>

This was introduced by [dotnet/standard@af001b83][1] and the
introduction of a new `System.Diagnostics.Tracing.DiagnosticCounter`
base class.  This is thus an API-compatible change.

Meanwhile, [xamarin-android PR 3305][2] adds support for
[Android 10.0 (API-29)][3], adding several new types & members.
API-29 requires a new `inter-api-extra-v9.0-v10.0.txt` file for
inter-API comparisons due to "compatible" changes which
`mono-api-html` reports as errors.  These include

  * Changing the base class of
    `Android.App.ActivityManager.RecentTaskInfo` and
    `Android.App.ActivityManager.RecentTaskInfo.RunningTaskInfo` to
    `Android.App.TaskInfo`, from `Java.Lang.Object`.

  * The base class of `Java.Util.Concurrent.Atomic.DoubleAccumulator`,
    `DoubleAdder`, `LongAccumulator`, and `LongAdder` was changed from
    `Java.Util.Concurrent.Atomic.Striped64` to `Java.Lang.Number`.
    
    This *is* a breaking change, but `Striped64` inherited from
    `Number`, so all method invocations were already "based on"
    `Number` method invocations.  This change should only alter
    compatibility when performing a reference conversion to
    `Striped64`:
    
        Java.Util.Concurrent.Atomic.Striped64 = new Java.Util.Concurrent.Atomic.DoubleAccumulator();
        // Previously valid, now a CS0029

    We believe that this change shouldn't actually impact anyone.

  * `Android.Text.SpannableStringInternal` methods were changed from
    non-`virtual` to `virtual`, because on the Java side the
    `android.text.SpannableStringInternal` class was removed, which
    resulted in a [runtime crash][4].  The chosen fix was to make
    these methods `virtual`, so that they could be appropriately
    overridden and dispatched to the correct Java-side type.

[0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/668/API_20Compatibility_20Checks/
[1]: dotnet/standard@af001b8#diff-5d9a22f9ff5db529e1ea22efb9858d01
[2]: dotnet/android#3305
[3]: https://web.archive.org/web/20190726091025/https://developer.android.com/preview/features
[4]: dotnet/android#3305 (comment)
  • Loading branch information
gugavaro authored and jonpryor committed Jul 29, 2019
1 parent 7fe95c1 commit da270b8
Show file tree
Hide file tree
Showing 3 changed files with 69,080 additions and 2,657 deletions.
12 changes: 12 additions & 0 deletions inter-api-extra-v9.0-v10.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-r "Android.App.ActivityManager.RecentTaskInfo: Modified base type: 'Java.Lang.Object' to 'Android.App.TaskInfo'"
-r "Android.App.ActivityManager.RecentTaskInfo.RunningTaskInfo: Modified base type: 'Java.Lang.Object' to 'Android.App.TaskInfo'"

-r "Android.Text.SpannableStringInternal: Modified methods: public virtual char CharAt \(int\);"
-r "Android.Text.SpannableStringInternal: Modified methods: public virtual void GetChars \(int, int, char\[\], int\);"
-r "Android.Text.SpannableStringInternal: Modified methods: public virtual int Length \(\);"
-r "Android.Text.SpannableStringInternal: Modified methods: public override string ToString \(\);"

-r "Java.Util.Concurrent.Atomic.DoubleAccumulator: Modified base type: 'Java.Util.Concurrent.Atomic.Striped64' to 'Java.Lang.Number'"
-r "Java.Util.Concurrent.Atomic.DoubleAdder: Modified base type: 'Java.Util.Concurrent.Atomic.Striped64' to 'Java.Lang.Number'"
-r "Java.Util.Concurrent.Atomic.LongAccumulator: Modified base type: 'Java.Util.Concurrent.Atomic.Striped64' to 'Java.Lang.Number'"
-r "Java.Util.Concurrent.Atomic.LongAdder: Modified base type: 'Java.Util.Concurrent.Atomic.Striped64' to 'Java.Lang.Number'"
Loading

0 comments on commit da270b8

Please sign in to comment.