So in logs i have:
1080 x 1920, scale = 2.0 (320 dpi)
But Google's AVD says that 4.9" or 5" 1080x1920 is 480dpi (xxhdpi) and for 4.9" or 5" 720x1280 is 320dpi (xhdpi)
That value is what Android is reporting from context.getResources().getDisplayMetrics().density so it is the tablet or emulator that is getting it wrong, if indeed it is wrong and not intentional.
That value is what Android is reporting from context.getResources().getDisplayMetrics().density so it is the tablet or emulator that is getting it wrong, if indeed it is wrong and not intentional.