diff --git a/build-tools/enumification-helpers/methodmap.ext.csv b/build-tools/enumification-helpers/methodmap.ext.csv index e2dcec1fdc9..2488e8ee818 100644 --- a/build-tools/enumification-helpers/methodmap.ext.csv +++ b/build-tools/enumification-helpers/methodmap.ext.csv @@ -1675,7 +1675,8 @@ 26, android.telecom, Call.Callback, onRttInitiationFailure, reason, Android.Telecom.RttSessionModifyResult 26, android.telephony, TelephonyManager.UssdResponseCallback, onReceiveUssdResponseFailed, failureCode, Android.Telephony.UssdResultCode -26, android.icu.util, TimeZone, getTimeZone, type, Android.Icu.Util.TimeZoneType +// cannot change this at this state. +// 24, android.icu.util, TimeZone, getTimeZone, type, Android.Icu.Util.TimeZoneType 26, android.icu.util, UniversalTimeScale, bigDecimalFrom, timeScale, Android.Icu.Util.UniversalTimeScaleType 26, android.icu.util, UniversalTimeScale, from, timeScale, Android.Icu.Util.UniversalTimeScaleType 26, android.icu.util, UniversalTimeScale, getTimeScaleValue, scale, Android.Icu.Util.UniversalTimeScaleType @@ -1720,7 +1721,6 @@ 26, android.content, Intent, removeFlags, flags, Android.Content.ActivityFlags 26, android.content.pm, ApplicationInfo, getCategoryTitle, category, Android.Content.PM.ApplicationCategories 26, android.content.pm, LauncherApps, getApplicationInfo, flags, Android.Content.PM.PackageInfoFlags -26, android.icu.util, TimeZone, getTimeZone, type, Android.Icu.Util.TimeZoneType 26, android.media, AudioAttributes, getVolumeControlStream, return, Android.Media.Stream 26, android.media, AudioAttributes, getVolumeControlStream, return, Android.Media.Stream diff --git a/build-tools/scripts/BuildEverything.mk b/build-tools/scripts/BuildEverything.mk index d3933ea1cee..65a6fb3c20d 100644 --- a/build-tools/scripts/BuildEverything.mk +++ b/build-tools/scripts/BuildEverything.mk @@ -23,7 +23,7 @@ ALL_PLATFORM_IDS = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 # supported api levels ALL_FRAMEWORKS = _ _ _ _ _ _ _ _ _ v2.3 _ _ _ _ v4.0.3 v4.1 v4.2 v4.3 v4.4 v4.4.87 v5.0 v5.1 v6.0 v7.0 v7.1 v8.0 API_LEVELS = 10 15 16 17 18 19 20 21 22 23 24 25 26 -STABLE_API_LEVELS = 10 15 16 17 18 19 20 21 22 23 24 25 +STABLE_API_LEVELS = 10 15 16 17 18 19 20 21 22 23 24 25 26 ## The preceding values *must* use SPACE, **not** TAB, to separate values. diff --git a/src/Mono.Android/Java.Lang/StringBuffer.cs b/src/Mono.Android/Java.Lang/StringBuffer.cs new file mode 100644 index 00000000000..777a7a38381 --- /dev/null +++ b/src/Mono.Android/Java.Lang/StringBuffer.cs @@ -0,0 +1,19 @@ +#if ANDROID_26 + +// It is introduced since API 26 not because of new member in StringBuffer +// but in AbstractStringBuilder which is nonpublic and affects the generated API. + +using System; + +namespace Java.Lang +{ + public partial class StringBuffer + { + public IAppendable Append (string s, int start, int end) + { + return Append (new Java.Lang.String (s), start, end); + } + } +} + +#endif diff --git a/src/Mono.Android/Java.Lang/StringBuilder.cs b/src/Mono.Android/Java.Lang/StringBuilder.cs new file mode 100644 index 00000000000..dbc3af843b9 --- /dev/null +++ b/src/Mono.Android/Java.Lang/StringBuilder.cs @@ -0,0 +1,19 @@ +#if ANDROID_26 + +// It is introduced since API 26 not because of new member in StringBuffer +// but in AbstractStringBuilder which is nonpublic and affects the generated API. + +using System; + +namespace Java.Lang +{ + public partial class StringBuilder + { + public IAppendable Append (string s, int start, int end) + { + return Append (new Java.Lang.String (s), start, end); + } + } +} + +#endif diff --git a/src/Mono.Android/Java.Nio/FileChannel.cs b/src/Mono.Android/Java.Nio/FileChannel.cs new file mode 100644 index 00000000000..224ad9d151d --- /dev/null +++ b/src/Mono.Android/Java.Nio/FileChannel.cs @@ -0,0 +1,34 @@ +#if ANDROID_25 + +using System; + +namespace Java.Nio.Channels +{ + public partial class FileChannel + { +/* +This had to be added for API compatibility with earlier API Levels. + +It is a newly introduced breakage for OpenJDK migration. +FileChannel now implements SeekableByteChannel, which never existed, and +they require those methods to return ISeekableByteChannel in C#, not +FileChannel whereas FileChannel is ISeekableByteChannel. + +So they were first changed in the metadata fixup first, but then it resulted +in the API breakage. Therefore, I'm reverting the changes in metadata +and adding explicit interface methods here instead. +*/ + ISeekableByteChannel ISeekableByteChannel.Position (long newPosition) + { + return Position (newPosition); + } + + ISeekableByteChannel ISeekableByteChannel.Truncate (long size) + { + return Truncate (size); + } + } +} + +#endif + diff --git a/src/Mono.Android/Mono.Android.csproj b/src/Mono.Android/Mono.Android.csproj index 7041a08c91a..63dfa4150f7 100644 --- a/src/Mono.Android/Mono.Android.csproj +++ b/src/Mono.Android/Mono.Android.csproj @@ -267,11 +267,14 @@ + + + diff --git a/src/Mono.Android/metadata b/src/Mono.Android/metadata index 404d67e2865..1bab91e0d68 100644 --- a/src/Mono.Android/metadata +++ b/src/Mono.Android/metadata @@ -77,10 +77,6 @@ Please use SetSystemScope() instead. This setter is not really public in Android API and will vanish in the future versions. - - Java.Nio.Channels.ISeekableByteChannel - Java.Nio.Channels.ISeekableByteChannel - @@ -1362,8 +1358,9 @@ former non-generic version. So they should be regarded as identical. Also, for this method we have *manually* bound generic method. - We could make fixes in api-merge, but manual fix is 100x simpler. --> - - android.view.View + We could make fixes in api-merge, but manual fix is 100x simpler. + Sadly api-merge is processed before metadata fixup, so it cannot be simple overload removal. --> + + android.view.View diff --git a/src/Mono.Android/methodmap.csv b/src/Mono.Android/methodmap.csv index c594241a704..2ae5043c479 100644 --- a/src/Mono.Android/methodmap.csv +++ b/src/Mono.Android/methodmap.csv @@ -2271,7 +2271,8 @@ 26, android.telecom, Call.Callback, onRttInitiationFailure, reason, Android.Telecom.RttSessionModifyResult 26, android.telephony, TelephonyManager.UssdResponseCallback, onReceiveUssdResponseFailed, failureCode, Android.Telephony.UssdResultCode -26, android.icu.util, TimeZone, getTimeZone, type, Android.Icu.Util.TimeZoneType +// cannot change this at this state. +// 24, android.icu.util, TimeZone, getTimeZone, type, Android.Icu.Util.TimeZoneType 26, android.icu.util, UniversalTimeScale, bigDecimalFrom, timeScale, Android.Icu.Util.UniversalTimeScaleType 26, android.icu.util, UniversalTimeScale, from, timeScale, Android.Icu.Util.UniversalTimeScaleType 26, android.icu.util, UniversalTimeScale, getTimeScaleValue, scale, Android.Icu.Util.UniversalTimeScaleType @@ -2316,7 +2317,6 @@ 26, android.content, Intent, removeFlags, flags, Android.Content.ActivityFlags 26, android.content.pm, ApplicationInfo, getCategoryTitle, category, Android.Content.PM.ApplicationCategories 26, android.content.pm, LauncherApps, getApplicationInfo, flags, Android.Content.PM.PackageInfoFlags -26, android.icu.util, TimeZone, getTimeZone, type, Android.Icu.Util.TimeZoneType 26, android.media, AudioAttributes, getVolumeControlStream, return, Android.Media.Stream 26, android.media, AudioAttributes, getVolumeControlStream, return, Android.Media.Stream