One of the properties of the device’s screen that Android allows you to request an application is aspect ratio. In the examples I saw, this property has only two values: long and notlong .
I am trying to redo the logic used by Android to classify a device as having one of two aspect ratios.
To get some official data for work, I referenced the values provided by the device definitions included in the AVD Manager in Android Studio and combined them with my own calculations: 
The Published Ratio column shows the value retrieved from AVD Manager. Based on these results, I do not understand how the Nexus 5 and 6 are considered notlong , while the Galaxy S4 and Galaxy Nexus are considered long .
source share