Closed Bug 1253812 Opened 8 years ago Closed 8 years ago

Return types possibly swapped through AndroidBridge (GetScreenOrientation <---> GetScreenAngle)

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: capella, Unassigned)

Details

?ni to be sure we're noticed
Flags: needinfo?(nchen)
Looks like screen orientation [1] and screen angle [2] both have Java short type (C++ int16_t type). In GeckoAppShell, getScreenOrientation stays as short and getScreenAngle is expanded to int. Finally, in AndroidBridge, getScreenOrientation is expanded to int (uint32_t) and getScreenAngle is reduced back to short (uint16_t).

So the types are definitely not consistent, but because the values are both 16-bit values originally, the inconsistency should be harmless, and shouldn't cause crashes.

[1] https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/GeckoScreenOrientation.java?rev=be593a64d7c6#37
[2] https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/GeckoScreenOrientation.java?rev=be593a64d7c6#280
Flags: needinfo?(nchen)
Thanks for the explanation. I'd meant to close this earlier :)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.