Skip to content

Conversation

@jpobst
Copy link
Contributor

@jpobst jpobst commented Jun 8, 2023

Context: https://developer.android.com/about/versions/14
Context: https://android-developers.googleblog.com/2023/06/android-14-beta-3-and-platform-stability.html

Android 14 Developer Beta 3 has been released. The Android 14
Developer Preview Program Overview Timeline and updates section
suggests the following timeline:

  • Feb/Mar: Developer Previews
  • April/May: Unstable Betas
  • June/July: Stable Betas
  • ???: Final

Acceptable Breakages

  • Many methods in Android.Content.PM.PackageManager and the Dalvik.SystemInterop.DexFile type were un-deprecated
  • Interface method Java.Lang.Reflect.IAnnotatedElement.IsAnnotationPresent was given a default implementation, which we enabled here
  • RequiresPermission was removed from AlarmManager.setExact (...) in annotations.zip
  • RequiresPermission for WallpaperManager.* was changed:
<!-- API-33 -->
<val name="value" val="&quot;android.permission.READ_EXTERNAL_STORAGE&quot;" />
<!-- API-34 -->
<val name="anyOf" val="{&quot;android.permission.MANAGE_EXTERNAL_STORAGE&quot;, &quot;android.permission.READ_WALLPAPER_INTERNAL&quot;}" />

We have previously decided that we do not use these values for anything and are not updating this.

@jpobst jpobst force-pushed the api-14-beta3 branch 3 times, most recently from 2fd6ebb to e8d690e Compare June 12, 2023 18:09
@jpobst jpobst marked this pull request as ready for review June 26, 2023 20:53
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two test failures look unrelated, but I reran them.

<AndroidApiLevel>34</AndroidApiLevel>
<!-- The Xamarin.Android $(TargetFrameworkVersion) value that corresponds to $(AndroidApiLevel) -->
<AndroidFrameworkVersion>v13.0</AndroidFrameworkVersion>
<AndroidFrameworkVersion>v14.0</AndroidFrameworkVersion>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is one of the things we can rip out now that we're no longer maintaining Classic in main. (Not here and now, but eventually?)

new AndroidPlatformComponent ("platform-32_r01", apiLevel: "32", pkgRevision: "1"),
new AndroidPlatformComponent ("platform-33_r02", apiLevel: "33", pkgRevision: "2"),
new AndroidPlatformComponent ("platform-UpsideDownCake_r04", apiLevel: "UpsideDownCake", pkgRevision: "4"),
new AndroidPlatformComponent ("platform-34-ext7_r01", apiLevel: "34", pkgRevision: "1"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we read anything into the -ext7 suffix? That seems odd.

@jonpryor
Copy link
Contributor

jonpryor commented Jun 26, 2023

[Mono.Android] Bind and enumify API-34 (#8116)

Context: https://developer.android.com/about/versions/14
Context: https://android-developers.googleblog.com/2023/06/android-14-beta-3-and-platform-stability.html

Android 14 Developer Beta 3 has been released.

  * [API diff vs. API-33][0]
  * [API diff vs. API-UpsideDownCake Beta 2][1] (3c1a9851)

The Android 14 Developer Preview Program Overview
[Timeline and updates][2] section suggests the following timeline:

  * Feb/Mar: Developer Previews
  * April/May: Unstable Betas
  * June: Beta 3 with "First [Platform Stability][3] milestone
    including final APIs and behaviors.  Play publishing also opens."
  * July: Near-final builds for final testing
  * ???: Final

~~ Acceptable Breakages ~~

Many methods in `Android.Content.PM.PackageManager` and the
`Dalvik.SystemInterop.DexFile` type were un-deprecated.

Interface method `Java.Lang.Reflect.IAnnotatedElement.IsAnnotationPresent`
was given a default implementation, which we enabled in 3c1a9851.

`RequiresPermission` was removed from `AlarmManager.setExact(…)`
in `annotations.zip`.

`RequiresPermission` for `WallpaperManager.*` was changed:

	<!-- API-33 -->
	<val name="value" val="&quot;android.permission.READ_EXTERNAL_STORAGE&quot;" />
	<!-- API-34 -->
	<val name="anyOf" val="{&quot;android.permission.MANAGE_EXTERNAL_STORAGE&quot;, &quot;android.permission.READ_WALLPAPER_INTERNAL&quot;}" />

We have [previously decided][4] that we do not use these values for
anything and are not updating this.

~~ Enumification? ~~

While reviewing, we discovered that the *past four years* of
enumification was incomplete: we did the work, but the enums weren't
applied.  See e.g. [`TextView.LineBreakWordStyle Property`][5],
which is of type `int`, but *should* have been of enum type
`Android.Graphics.Text.LineBreakWordStyle`, via df6c716e41:

	33,android/widget,TextView,setLineBreakWordStyle,lineBreakWordStyle,Android.Graphics.Text.LineBreakWordStyle

The reason for this is that `methodmap.csv` column 2 should be a
*Java* `.`d package name, but we used the JNI `/`d name.

We can't fix these (API and ABI breaks are bad), and we are still
exploring what we can do to address this.

This oversight was caught in time that API-34 members are correctly
enumified.

[0]: https://developer.android.com/sdk/api_diff/34/changes
[1]: https://developer.android.com/sdk/api_diff/34-incr/changes
[2]: https://web.archive.org/web/20230616200934/https://developer.android.com/about/versions/14/overview#timeline
[3]: https://web.archive.org/web/20230616200934/https://developer.android.com/about/versions/14/overview#platform_stability
[4]: https://github.com/xamarin/xamarin-android/issues/6775
[5]: https://learn.microsoft.com/dotnet/api/android.widget.textview.LineBreakWordStyle?view=xamarin-android-sdk-13

@jonpryor jonpryor merged commit dab495f into main Jun 26, 2023
@jonpryor jonpryor deleted the api-14-beta3 branch June 26, 2023 23:54
grendello added a commit to grendello/xamarin-android that referenced this pull request Jun 27, 2023
* main:
  [Mono.Android] Bind and enumify API-34 (dotnet#8116)
grendello added a commit to grendello/xamarin-android that referenced this pull request Jun 27, 2023
* main:
  $(AndroidPackVersionSuffix)=preview.7; net8 is 34.0.0-preview.7 (dotnet#8149)
  [Mono.Android] Bind and enumify API-34 (dotnet#8116)
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants