Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,17 @@ public void BuildHasNoWarnings (bool isRelease, bool xamarinForms, bool multidex
proj.SetProperty ("XamarinAndroidSupportSkipVerifyVersions", "True"); // Disables API 29 warning in Xamarin.Build.Download
proj.SetProperty ("AndroidPackageFormat", packageFormat);
proj.SetProperty ("TrimmerSingleWarn", "false");

// Add test code for: https://github.com/dotnet/android/issues/10509
proj.MainActivity = proj.DefaultMainActivity.Replace ("//${AFTER_ONCREATE}",
"""
// These should not cause warnings
new FrameLayout (this).Foreground = null;
new ListView (this).Adapter = null;
Console.WriteLine (Android.Provider.MediaStore.Video.IVideoColumns.DateTaken);
Console.WriteLine (Android.Provider.MediaStore.Images.IImageColumns.DateTaken);
""");

using (var b = CreateApkBuilder ()) {
Assert.IsTrue (b.Build (proj), "Build should have succeeded.");
b.AssertHasNoWarnings ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected override void OnCreate (Bundle savedInstanceState)
global::Xamarin.Forms.Forms.Init (this, savedInstanceState);
//${AFTER_FORMS_INIT}
LoadApplication (new App ());
//${AFTER_ONCREATE}
}
//${AFTER_ONCREATE}
}
}
Loading