Closed
Bug 818390
Opened 13 years ago
Closed 13 years ago
Robocop: Improve the solution for identifying the device type and OS
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: AdrianT, Unassigned)
References
Details
This is a follow-up bug to bug 747835 to find a better solution to determine if the device the test is running on is a phone or a tablet and what OS it is running. The scope of this is to be able to run tests depending on the UI layout which may be different depending on OS and device type.
Here is Joel's proposition in bug 747835:
> I also see abstracting this out:
>
> DeviceClass myDevice = detectDevice()
> # myDevice.type = tablet
> # myDevice.version = ics
> # myDevice.width = 400
> # myDevice.height = 600
> # myDevice.rotate() rotate the display
>
> Then for the navigation stuff, it could be more like this:
> MenuNavigation nav = newMenuNavigation(myDevice)
> nav.back()
> nav.more()
> nav.forward()
Comment 1•13 years ago
|
||
For version-specific needs, Fennec code often uses Build.VERSION.SDK_INT. eg:
if (Build.VERSION.SDK_INT >= 16)
or
boolean honeycomb = (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB &&
Build.VERSION.SDK_INT <= Build.VERSION_CODES.HONEYCOMB_MR2);
context.getResources().getDisplayMetrics() may be appropriate for width/height.
| Reporter | ||
Comment 2•13 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #1)
> For version-specific needs, Fennec code often uses Build.VERSION.SDK_INT. eg:
>
> if (Build.VERSION.SDK_INT >= 16)
>
> or
>
> boolean honeycomb = (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB
> &&
> Build.VERSION.SDK_INT <=
> Build.VERSION_CODES.HONEYCOMB_MR2);
>
>
> context.getResources().getDisplayMetrics() may be appropriate for
> width/height.
Hi Geoff,
Actually I have found the same solution yesterday and implemented it I just need some more time to test it.
Thank you for your input here.
| Reporter | ||
Comment 3•13 years ago
|
||
Setting the status for this issue as fixed since bug 747835 contains the code for this also and the patch has been integrated
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•