Skip to content

Commit 3ca2a07

Browse files
authored
[Mono.Android] Android API-R Developer Preview 2 Binding (#4468)
Context: https://web.archive.org/web/20200307182928/https://developer.android.com/preview/overview Android 11 [Developer Preview 2 has been released][0]. * [API diff vs. Developer Preview 1][1] * [API diff vs. API-29][2] Google's documented timeline for Android 11 is unchanged wrt a20be39: * Developer Preview 3 in April * Beta 1 in May * Beta 2 in June This contains the final APIs and official SDK. * Beta 3 and final release sometime in Q3, 2019. For a change vs. previous releases, we are testing out some new workflows and tooling around enumification, and the updated API-R binding in `Mono.Android.dll` v10.0.99 has been enumified. Note: due to a [generator bug][3], the `Android.OS.VibrationEffectEffectType` enum must be manually bound. [0]: https://android-developers.googleblog.com/2020/03/android-11-developer-preview-2.html [1]: https://developer.android.com/sdk/api_diff/r-dp2-incr/changes [2]: https://developer.android.com/sdk/api_diff/r-dp2/changes [3]: dotnet/java-interop#613
1 parent 274d384 commit 3ca2a07

File tree

6 files changed

+1353
-81
lines changed

6 files changed

+1353
-81
lines changed

build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/AndroidToolchain.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public AndroidToolchain ()
4040
new AndroidPlatformComponent ("platform-27_r03", apiLevel: "27", pkgRevision: "3"),
4141
new AndroidPlatformComponent ("platform-28_r04", apiLevel: "28", pkgRevision: "4"),
4242
new AndroidPlatformComponent ("platform-29_r01", apiLevel: "29", pkgRevision: "1"),
43-
new AndroidPlatformComponent ("platform-R_r01", apiLevel: "R", pkgRevision: "1"),
43+
new AndroidPlatformComponent ("platform-R_r02", apiLevel: "R", pkgRevision: "2"),
4444

4545
new AndroidToolchainComponent ("docs-24_r01", destDir: "docs", pkgRevision: "1"),
4646
new AndroidToolchainComponent ("android_m2repository_r47", destDir: Path.Combine ("extras", "android", "m2repository"), pkgRevision: "47.0.0"),
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
namespace Android.OS
2+
{
3+
public enum VibrationEffectEffectType
4+
{
5+
[global::Android.Runtime.IntDefinition ("Android.OS.VibrationEffect.EffectClick", JniField = "android/os/VibrationEffect.EFFECT_CLICK")]
6+
EffectClick = 0,
7+
[global::Android.Runtime.IntDefinition ("Android.OS.VibrationEffect.EffectDoubleClick", JniField = "android/os/VibrationEffect.EFFECT_DOUBLE_CLICK")]
8+
EffectDoubleClick = 1,
9+
[global::Android.Runtime.IntDefinition ("Android.OS.VibrationEffect.EffectTick", JniField = "android/os/VibrationEffect.EFFECT_TICK")]
10+
EffectTick = 2,
11+
[global::Android.Runtime.IntDefinition ("Android.OS.VibrationEffect.EffectHeavyClick", JniField = "android/os/VibrationEffect.EFFECT_HEAVY_CLICK")]
12+
EffectHeavyClick = 5,
13+
}
14+
}

src/Mono.Android/Mono.Android.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
<Compile Include="Android.OS\Handler.cs" />
184184
<Compile Include="Android.OS\Message.cs" />
185185
<Compile Include="Android.OS\PowerManager.cs" />
186+
<Compile Include="Android.OS\VibrationEffectEffectType.cs" />
186187
<Compile Include="Android.OS\Vibrator.cs" />
187188
<Compile Include="Android.OS.Storage\StorageManager.cs" />
188189
<Compile Include="Android.Opengl\GLSurfaceView.cs" />

0 commit comments

Comments
 (0)