-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mono.Android] Bind API-S Beta 3 and enumify #6089
Conversation
@jpobst wrote:
In point of fact, it has changed. From their announcement: https://android-developers.googleblog.com/2021/07/android-12-beta-3.html First, the title:
Note "final APIs". 🤔 Then:
Which matches the sole change in this PR: - new AndroidPlatformComponent ("platform-S_r05", apiLevel: "S", pkgRevision: "5"),
+ new AndroidPlatformComponent ("platform-31_r01", apiLevel: "S", pkgRevision: "1"),
The timeline page has also been updated, though perhaps it hadn't been updated at the time the PR was created?
API-31 is now stable. On to enumification! |
Context: dotnet#6089 We currently have lots of test failures due to the warning: warning XA1008: The TargetFrameworkVersion (Android API level 30) is lower than the targetSdkVersion (31). Please increase the `$(TargetFrameworkVersion)` or decrease the `android:targetSdkVersion` in the `AndroidManifest.xml` so that the API levels match. Looking at `Properties\AndroidManifest.xml`, Xamarin.ProjectTools generated: <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" /> This appears to be due to the `GetMaxInstalledPlatform()` method: https://github.com/xamarin/xamarin-android/blob/1b71da0cd3a44861b006ac41c77a24eedf066281/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/AndroidSdkResolver.cs#L121-L138 I think what happened is: * dotnet#6089 is opened, platform-31 gets installed on many of the CI machines. * Future PRs install `platform-31` side-by-side `platform-S`. And so we ended up with test failures... To fix this for now, manually delete the `sdk/platform-31` folder on test jobs.
Context: dotnet#6089 We currently have lots of test failures due to the warning: warning XA1008: The TargetFrameworkVersion (Android API level 30) is lower than the targetSdkVersion (31). Please increase the `$(TargetFrameworkVersion)` or decrease the `android:targetSdkVersion` in the `AndroidManifest.xml` so that the API levels match. Looking at `Properties\AndroidManifest.xml`, Xamarin.ProjectTools generated: <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" /> This appears to be due to the `GetMaxInstalledPlatform()` method: https://github.com/xamarin/xamarin-android/blob/1b71da0cd3a44861b006ac41c77a24eedf066281/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/AndroidSdkResolver.cs#L121-L138 I think what happened is: * dotnet#6089 is opened, platform-31 gets installed on many of the CI machines. * Future PRs install `platform-31` side-by-side `platform-S`. And so we ended up with test failures... To fix this for now, manually delete the `sdk/platform-31` folder on test jobs.
Context: #6089 We currently have lots of test failures due to the warning: warning XA1008: The TargetFrameworkVersion (Android API level 30) is lower than the targetSdkVersion (31). Please increase the `$(TargetFrameworkVersion)` or decrease the `android:targetSdkVersion` in the `AndroidManifest.xml` so that the API levels match. Looking at `Properties\AndroidManifest.xml`, Xamarin.ProjectTools generated: <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" /> This appears to be due to the `GetMaxInstalledPlatform()` method: https://github.com/xamarin/xamarin-android/blob/1b71da0cd3a44861b006ac41c77a24eedf066281/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/AndroidSdkResolver.cs#L121-L138 I think what happened is: * #6089 is opened, platform-31 gets installed on many of the CI machines. * Future PRs install `platform-S` side-by-side `platform-31`. And so we ended up with test failures... To fix this for now, manually delete the `sdk/platform-31` folder on test jobs.
Context: #6089 We currently have lots of test failures due to the warning: warning XA1008: The TargetFrameworkVersion (Android API level 30) is lower than the targetSdkVersion (31). Please increase the `$(TargetFrameworkVersion)` or decrease the `android:targetSdkVersion` in the `AndroidManifest.xml` so that the API levels match. Looking at `Properties\AndroidManifest.xml`, Xamarin.ProjectTools generated: <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" /> This appears to be due to the `GetMaxInstalledPlatform()` method: https://github.com/xamarin/xamarin-android/blob/1b71da0cd3a44861b006ac41c77a24eedf066281/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/AndroidSdkResolver.cs#L121-L138 I think what happened is: * #6089 is opened, platform-31 gets installed on many of the CI machines. * Future PRs install `platform-S` side-by-side `platform-31`. And so we ended up with test failures... To fix this for now, manually delete the `sdk/platform-31` folder on test jobs.
wrt
The docs mention a As such, there's nothing to enumify. wrt
The docs refer to
wherein This logic also applies to the other wrt
The docs mention an The |
Commit message? [Mono.Android] Bind Android 12 Beta 3 and API-31 enumification (#6089)
Context: https://developer.android.com/about/versions/12/overview
Context: https://android-developers.googleblog.com/search/label/Android12
Android 12 [Beta 3 has been released][0].
* [API diff vs. Beta 2][1]
* [API diff vs. API-30][2]
Given that these API's are believed to be final (-ish?), we have
performed enumification on this version.
We will mark this API level as stable in a future commit, as that
generally requires changing quite a few files.
There are some methods that are documented as taking constants which
we think would ideally be enumified, but the constants are not public.
?,31,android/net/ipsec/ike,TunnelModeChildSessionParams$Builder,addInternalAddressRequest,addressFamily,
?,31,android/net/ipsec/ike,TunnelModeChildSessionParams$Builder,addInternalDhcpServerRequest,addressFamily,
?,31,android/net/ipsec/ike,TunnelModeChildSessionParams$Builder,addInternalDnsServerRequest,addressFamily,
`TunnelModeChildSessionParams.Builder.addInternal*Request()` methods
like [`TunnelModeChildSessionParams.Builder.addInternalAddressRequest(int)`][3]
are documented as taking `AF_INET` or `AF_INET6` values.
Perusing the [`TunnelModeChildSessionParams.java`][4] source, we see
that `AF_INET` is an
[`import static android.system.OsConstants.AF_INET`][5], which is
*not* a constant value. As such, it *cannot* be enumified, and thus
none of these methods can be enumified.
?,31,android/telephony,[Interface]TelephonyCallback$CallDisconnectCauseListener,onCallDisconnectCauseChanged,preciseDisconnectCause,
The `preciseDisconnectCause` parameter of
[`TelephonyCallback.CallDisconnectCauseListener.onCallDisconnectCauseChanged()][6]
is documented as being a value from
`android.telephony.PreciseDisconnectCause`. However,
[`PreciseDisconnectCause` is `@hide`][7]; it can't be bound.
?,31,android/telephony,[Interface]TelephonyCallback$DataActivationStateListener,onDataActivationStateChanged,state,
Similar to the `PreciseDisconnectCause` scenario, the `state` parameter in
[`TelephonyCallback.DataActivationStateListener.onDataActivationStateChanged()`][8]
is documented as being a
[`android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_*`][9]
value, which is `@hide`, and thus cannot be bound.
[0]: https://android-developers.googleblog.com/2021/07/android-12-beta-3.html
[1]: https://developer.android.com/sdk/api_diff/31-incr/changes
[2]: https://developer.android.com/sdk/api_diff/31/changes
[3]: https://developer.android.com/reference/android/net/ipsec/ike/TunnelModeChildSessionParams.Builder#addInternalAddressRequest(int)
[4]: https://android.googlesource.com/platform/frameworks/opt/net/ike/+/9dbc4348a97db2076e6841669525d733bbacc287/src/java/android/net/ipsec/ike/TunnelModeChildSessionParams.java#19
[5]: https://developer.android.com/reference/android/system/OsConstants#AF_INET
[6]: https://developer.android.com/reference/android/telephony/TelephonyCallback.CallDisconnectCauseListener#onCallDisconnectCauseChanged(int,%20int)
[7]: https://android.googlesource.com/platform/frameworks/base/+/300c70d67617d01b3b0383742d275ab945a9ed80/telephony/java/android/telephony/PreciseDisconnectCause.java#23
[8]: https://developer.android.com/reference/android/telephony/TelephonyCallback.DataActivationStateListener?hl=en#onDataActivationStateChanged(int)
[9]: https://android.googlesource.com/platform/frameworks/base/+/0c13fd19ecbb60c328a95e3c1620e03c7c8826cd/telephony/java/android/telephony/TelephonyManager.java#4921 |
Context: dotnet#6089 We currently have lots of test failures due to the warning: warning XA1008: The TargetFrameworkVersion (Android API level 30) is lower than the targetSdkVersion (31). Please increase the `$(TargetFrameworkVersion)` or decrease the `android:targetSdkVersion` in the `AndroidManifest.xml` so that the API levels match. Looking at `Properties\AndroidManifest.xml`, Xamarin.ProjectTools generated: <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" /> This appears to be due to the `GetMaxInstalledPlatform()` method: https://github.com/xamarin/xamarin-android/blob/1b71da0cd3a44861b006ac41c77a24eedf066281/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/AndroidSdkResolver.cs#L121-L138 I think what happened is: * dotnet#6089 is opened, platform-31 gets installed on many of the CI machines. * Future PRs install `platform-S` side-by-side `platform-31`. And so we ended up with test failures... To fix this for now, manually delete the `sdk/platform-31` folder on test jobs.
…t#6089) Context: https://developer.android.com/about/versions/12/overview Context: https://android-developers.googleblog.com/search/label/Android12 Android 12 [Beta 3 has been released][0]. * [API diff vs. Beta 2][1] * [API diff vs. API-30][2] Given that these API's are believed to be final (-ish?), we have performed enumification on this version. We will mark this API level as stable in a future commit, as that generally requires changing quite a few files. There are some methods that are documented as taking constants which we think would ideally be enumified, but the constants are not public. ?,31,android/net/ipsec/ike,TunnelModeChildSessionParams$Builder,addInternalAddressRequest,addressFamily, ?,31,android/net/ipsec/ike,TunnelModeChildSessionParams$Builder,addInternalDhcpServerRequest,addressFamily, ?,31,android/net/ipsec/ike,TunnelModeChildSessionParams$Builder,addInternalDnsServerRequest,addressFamily, `TunnelModeChildSessionParams.Builder.addInternal*Request()` methods like [`TunnelModeChildSessionParams.Builder.addInternalAddressRequest(int)`][3] are documented as taking `AF_INET` or `AF_INET6` values. Perusing the [`TunnelModeChildSessionParams.java`][4] source, we see that `AF_INET` is an [`import static android.system.OsConstants.AF_INET`][5], which is *not* a constant value. As such, it *cannot* be enumified, and thus none of these methods can be enumified. ?,31,android/telephony,[Interface]TelephonyCallback$CallDisconnectCauseListener,onCallDisconnectCauseChanged,preciseDisconnectCause, The `preciseDisconnectCause` parameter of [`TelephonyCallback.CallDisconnectCauseListener.onCallDisconnectCauseChanged()][6] is documented as being a value from `android.telephony.PreciseDisconnectCause`. However, [`PreciseDisconnectCause` is `@hide`][7]; it can't be bound. ?,31,android/telephony,[Interface]TelephonyCallback$DataActivationStateListener,onDataActivationStateChanged,state, Similar to the `PreciseDisconnectCause` scenario, the `state` parameter in [`TelephonyCallback.DataActivationStateListener.onDataActivationStateChanged()`][8] is documented as being a [`android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_*`][9] value, which is `@hide`, and thus cannot be bound. [0]: https://android-developers.googleblog.com/2021/07/android-12-beta-3.html [1]: https://developer.android.com/sdk/api_diff/31-incr/changes [2]: https://developer.android.com/sdk/api_diff/31/changes [3]: https://developer.android.com/reference/android/net/ipsec/ike/TunnelModeChildSessionParams.Builder#addInternalAddressRequest(int) [4]: https://android.googlesource.com/platform/frameworks/opt/net/ike/+/9dbc4348a97db2076e6841669525d733bbacc287/src/java/android/net/ipsec/ike/TunnelModeChildSessionParams.java#19 [5]: https://developer.android.com/reference/android/system/OsConstants#AF_INET [6]: https://developer.android.com/reference/android/telephony/TelephonyCallback.CallDisconnectCauseListener#onCallDisconnectCauseChanged(int,%20int) [7]: https://android.googlesource.com/platform/frameworks/base/+/300c70d67617d01b3b0383742d275ab945a9ed80/telephony/java/android/telephony/PreciseDisconnectCause.java#23 [8]: https://developer.android.com/reference/android/telephony/TelephonyCallback.DataActivationStateListener?hl=en#onDataActivationStateChanged(int) [9]: https://android.googlesource.com/platform/frameworks/base/+/0c13fd19ecbb60c328a95e3c1620e03c7c8826cd/telephony/java/android/telephony/TelephonyManager.java#4921
Context: #6089 We currently have lots of test failures due to the warning: warning XA1008: The TargetFrameworkVersion (Android API level 30) is lower than the targetSdkVersion (31). Please increase the `$(TargetFrameworkVersion)` or decrease the `android:targetSdkVersion` in the `AndroidManifest.xml` so that the API levels match. Looking at `Properties\AndroidManifest.xml`, Xamarin.ProjectTools generated: <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" /> This appears to be due to the `GetMaxInstalledPlatform()` method: https://github.com/xamarin/xamarin-android/blob/1b71da0cd3a44861b006ac41c77a24eedf066281/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/AndroidSdkResolver.cs#L121-L138 I think what happened is: * #6089 is opened, platform-31 gets installed on many of the CI machines. * Future PRs install `platform-S` side-by-side `platform-31`. And so we ended up with test failures... To fix this for now, manually delete the `sdk/platform-31` folder on test jobs.
Context: https://developer.android.com/about/versions/12/overview Context: https://android-developers.googleblog.com/search/label/Android12 Android 12 [Beta 3 has been released][0]. * [API diff vs. Beta 2][1] * [API diff vs. API-30][2] Given that these API's are believed to be final (-ish?), we have performed enumification on this version. We will mark this API level as stable in a future commit, as that generally requires changing quite a few files. There are some methods that are documented as taking constants which we think would ideally be enumified, but the constants are not public. ?,31,android/net/ipsec/ike,TunnelModeChildSessionParams$Builder,addInternalAddressRequest,addressFamily, ?,31,android/net/ipsec/ike,TunnelModeChildSessionParams$Builder,addInternalDhcpServerRequest,addressFamily, ?,31,android/net/ipsec/ike,TunnelModeChildSessionParams$Builder,addInternalDnsServerRequest,addressFamily, `TunnelModeChildSessionParams.Builder.addInternal*Request()` methods like [`TunnelModeChildSessionParams.Builder.addInternalAddressRequest(int)`][3] are documented as taking `AF_INET` or `AF_INET6` values. Perusing the [`TunnelModeChildSessionParams.java`][4] source, we see that `AF_INET` is an [`import static android.system.OsConstants.AF_INET`][5], which is *not* a constant value. As such, it *cannot* be enumified, and thus none of these methods can be enumified. ?,31,android/telephony,[Interface]TelephonyCallback$CallDisconnectCauseListener,onCallDisconnectCauseChanged,preciseDisconnectCause, The `preciseDisconnectCause` parameter of [`TelephonyCallback.CallDisconnectCauseListener.onCallDisconnectCauseChanged()][6] is documented as being a value from `android.telephony.PreciseDisconnectCause`. However, [`PreciseDisconnectCause` is `@hide`][7]; it can't be bound. ?,31,android/telephony,[Interface]TelephonyCallback$DataActivationStateListener,onDataActivationStateChanged,state, Similar to the `PreciseDisconnectCause` scenario, the `state` parameter in [`TelephonyCallback.DataActivationStateListener.onDataActivationStateChanged()`][8] is documented as being a [`android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_*`][9] value, which is `@hide`, and thus cannot be bound. [0]: https://android-developers.googleblog.com/2021/07/android-12-beta-3.html [1]: https://developer.android.com/sdk/api_diff/31-incr/changes [2]: https://developer.android.com/sdk/api_diff/31/changes [3]: https://developer.android.com/reference/android/net/ipsec/ike/TunnelModeChildSessionParams.Builder#addInternalAddressRequest(int) [4]: https://android.googlesource.com/platform/frameworks/opt/net/ike/+/9dbc4348a97db2076e6841669525d733bbacc287/src/java/android/net/ipsec/ike/TunnelModeChildSessionParams.java#19 [5]: https://developer.android.com/reference/android/system/OsConstants#AF_INET [6]: https://developer.android.com/reference/android/telephony/TelephonyCallback.CallDisconnectCauseListener#onCallDisconnectCauseChanged(int,%20int) [7]: https://android.googlesource.com/platform/frameworks/base/+/300c70d67617d01b3b0383742d275ab945a9ed80/telephony/java/android/telephony/PreciseDisconnectCause.java#23 [8]: https://developer.android.com/reference/android/telephony/TelephonyCallback.DataActivationStateListener?hl=en#onDataActivationStateChanged(int) [9]: https://android.googlesource.com/platform/frameworks/base/+/0c13fd19ecbb60c328a95e3c1620e03c7c8826cd/telephony/java/android/telephony/TelephonyManager.java#4921
Context: dotnet#6089 We currently have lots of test failures due to the warning: warning XA1008: The TargetFrameworkVersion (Android API level 30) is lower than the targetSdkVersion (31). Please increase the `$(TargetFrameworkVersion)` or decrease the `android:targetSdkVersion` in the `AndroidManifest.xml` so that the API levels match. Looking at `Properties\AndroidManifest.xml`, Xamarin.ProjectTools generated: <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" /> This appears to be due to the `GetMaxInstalledPlatform()` method: https://github.com/xamarin/xamarin-android/blob/1b71da0cd3a44861b006ac41c77a24eedf066281/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/AndroidSdkResolver.cs#L121-L138 I think what happened is: * dotnet#6089 is opened, platform-31 gets installed on many of the CI machines. * Future PRs install `platform-S` side-by-side `platform-31`. And so we ended up with test failures... To fix this for now, manually delete the `sdk/platform-31` folder on test jobs.
Context: https://developer.android.com/about/versions/12/overview
Context: https://android-developers.googleblog.com/search/label/Android12
Android 12 Beta 3 has been released.
Given that these API's are "final-ish", we have performed enumification on this version.
There are some methods that are documented as taking constants that should be enumified, but the constants do not exist in the API yet:
Example, see
preciseDisconnectCause
parameter documentation for onCallDisconnectCauseChanged. Compare to thedisconnectCause
parameter documentation which has links to documented constants.For now, these methods are not enumified. We will have to see if the August update adds these constants. (And determine if it too late to enumify them.)
We will mark this API level as stable in a future commit, as that generally requires changing quite a few files.