Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Android] Changes in the logic to detect Device.Idiom #11206

Merged
merged 2 commits into from Nov 10, 2020
Merged

Conversation

jsuarezruiz
Copy link
Contributor

Description of Change

Changed checking the UiMode enum using HasFlag to use ==. Based on this changes xamarin/Essentials@b937b12 from Xamarin Essentials.

Issues Resolved

API Changes

None

Platforms Affected

  • Android

Behavioral/Visual Changes

None

Before/After Screenshots

Not applicable

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@samhouts samhouts added 4.5.0 regression on 4.5.0 i/regression feedback-ticket Issue originates from https://developercommunity.visualstudio.com labels Jun 25, 2020
@samhouts samhouts added this to In Review in 4.7.0 Jun 25, 2020
@samhouts samhouts added retarget-branch-required PR or associated issues target a milestone. Please target this PR to the matching branch. and removed retarget-branch-required PR or associated issues target a milestone. Please target this PR to the matching branch. labels Jun 25, 2020
@jsuarezruiz jsuarezruiz changed the base branch from 4.7.0 to 4.5.0 June 26, 2020 10:46
@jsuarezruiz jsuarezruiz changed the base branch from 4.5.0 to 4.7.0 June 26, 2020 10:46
@jsuarezruiz jsuarezruiz changed the base branch from 4.7.0 to 4.5.0 June 26, 2020 11:00
@jsuarezruiz
Copy link
Contributor Author

Retarget to 4.5.0.

@jsuarezruiz jsuarezruiz removed the retarget-branch-required PR or associated issues target a milestone. Please target this PR to the matching branch. label Jun 26, 2020
@samhouts samhouts removed this from In Review in 4.7.0 Jun 26, 2020
@samhouts samhouts requested review from hartez and PureWeen June 30, 2020 23:43
Copy link
Contributor

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

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

Both API 19 tests have the same failures

@hartez hartez changed the base branch from 4.5.0 to 4.8.0 July 1, 2020 17:50
@PureWeen PureWeen added the DO-NOT-MERGE-!!! 🛑 This is in progress and needs to be updated before it can be merged. label Jul 22, 2020
@samhouts samhouts added this to In Progress in vCurrent (4.8.0) Jul 30, 2020
@samhouts samhouts added the retarget-branch-required PR or associated issues target a milestone. Please target this PR to the matching branch. label Aug 13, 2020
@jsuarezruiz
Copy link
Contributor Author

@PureWeen Yes, are failing the tests Issue2948 and Issue2951 although Device.Idiom is not used in these cases. Will take a look.

@PawKanarek
Copy link
Contributor

PawKanarek commented Sep 4, 2020

Maybe test didn't succeed, because of you need to accept some new agreements?
@samhouts wrote:

For example, I just pinged a contributor yesterday about a test that I thought was legitimately failing, only to realize that it was actually failing because Chrome was asking us to accept the new terms of service. 🤦
dotnet/maui#109 (comment)

@rmarinho
Copy link
Member

Going to rebase and run tests again .

Tests that were failoing were 2951 and 2948

@samhouts
Copy link
Member

Same tests are failing. @jsuarezruiz Can you investigate, please? Thanks!

@PawKanarek
Copy link
Contributor

Maybe i could potentially help with fix, but i have problems with identifying failing test, as im not familiar with azure pipeline...
Here i can see Message:

"2020-09-10T15:18:47.5457580Z ##[error]There are one or more test failures detected in result files. Detailed summary of published test results can be viewed in the Tests tab."

But the Tests tab is empty :(
image

@jsuarezruiz
Copy link
Contributor Author

Updated the changes passing the failing UITests locally.
Captura de pantalla 2020-09-16 a las 10 57 21
Waiting for the Build results!

@samhouts samhouts removed the retarget-branch-required PR or associated issues target a milestone. Please target this PR to the matching branch. label Nov 3, 2020
Copy link
Contributor

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

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

I'm testing with the following code

			SetMainPage(new ContentPage()
			{
				Content = new StackLayout()
				{
					Children =
					{
						new Label()
						{
							Text = Device.Idiom.ToString()
						}
					}
				}
			});

And it's giving me back Unsupported. I'm testing on an API 23 emulator

if I roll back the changes here for Forms.cs then it gives me "Phone"

@jsuarezruiz
Copy link
Contributor Author

@PureWeen Updated fixing that issue. Could you try/review it again please?

@jsuarezruiz jsuarezruiz removed the DO-NOT-MERGE-!!! 🛑 This is in progress and needs to be updated before it can be merged. label Nov 6, 2020
Copy link
Member

@rmarinho rmarinho left a comment

Choose a reason for hiding this comment

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

Ok tested with @PureWeen example, can get Phone and Tablet ok , in api 23/ api 29 , api 30

@rmarinho rmarinho merged commit b00cb31 into 4.8.0 Nov 10, 2020
vCurrent (4.8.0) automation moved this from In Review to Done Nov 10, 2020
@rmarinho rmarinho deleted the fix-11166 branch November 10, 2020 15:19
@samhouts samhouts modified the milestone: 4.8.0 Nov 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4.5.0 regression on 4.5.0 feedback-ticket Issue originates from https://developercommunity.visualstudio.com i/regression p/Android t/bug 🐛
Projects
No open projects
7 participants