size is always diagonal so taking sqrt of x^2+y^2 , I get 169 dpi and 133 dpi roughly but aspect ratios are not the same.
so conversion will be unequal
THe correct resolution is the native resolution 1024*600 but it thinks it has 800x480 so you lowered the resolution to compensate. Default size must be stored somewhere?
I found this but cannot find the file which has these settings??
C:\Program Files\Android Commander\bin>adb shell dumpsys display
DISPLAY MANAGER (dumpsys display)
mHeadless=false
mOnlyCode=false
mSafeMode=false
mPendingTraversal=false
mAllDisplayBlankStateFromPowerManager=1
mNextNonDefaultDisplayId=1
mDefaultViewport=DisplayViewport{valid=true, displayId=0, orientation=0, logic
alFrame=Rect(0, 0 - 600, 1024), physicalFrame=Rect(0, 0 - 600, 1024), deviceWidt
h=600, deviceHeight=1024}
mExternalTouchViewport=DisplayViewport{valid=false, displayId=0, orientation=0
, logicalFrame=Rect(0, 0 - 0, 0), physicalFrame=Rect(0, 0 - 0, 0), deviceWidth=0
, deviceHeight=0}
mSingleDisplayDemoMode=false
Display Adapters: size=3
LocalDisplayAdapter
OverlayDisplayAdapter
mCurrentOverlaySetting=
mOverlays: size=0
WifiDisplayAdapter
mCurrentStatus=WifiDisplayStatus{featureState=3, scanState=0, activeDisplayS
tate=0, activeDisplay=null, availableDisplays=[], rememberedDisplays=[]}
mFeatureState=3
mScanState=0
mActiveDisplayState=0
mActiveDisplay=null
mAvailableDisplays=[]
mRememberedDisplays=[]
mPendingStatusChangeBroadcast=false
mPendingNotificationUpdate=false
mSupportsProtectedBuffers=false
mDisplayController:
mWifiDisplayOnSetting=true
mWifiP2pEnabled=true
mWfdEnabled=true
mWfdEnabling=false
mNetworkInfo=NetworkInfo: type: WIFI_P2P[], state: UNKNOWN/IDLE, reason: (
unspecified), extra: (none), roaming: false, failover: false, isAvailable: true
mDiscoverPeersInProgress=false
mDiscoverPeersRetriesLeft=0
mDesiredDevice=null
mConnectingDisplay=null
mDisconnectingDisplay=null
mCancelingDisplay=null
mConnectedDevice=null
mConnectionRetriesLeft=0
mRemoteDisplay=null
mRemoteDisplayInterface=null
mRemoteDisplayConnected=false
mRemoteSubmixOn=false
mAdvertisedDisplay=null
mAdvertisedDisplaySurface=null
mAdvertisedDisplayWidth=0
mAdvertisedDisplayHeight=0
mAdvertisedDisplayFlags=0
mAvailableWifiDisplayPeers: size=0
Display Devices: size=1
DisplayDeviceInfo{"Built-in Screen": 600 x 1024, 59.993 fps, density 160, 179.
29411 x 168.89351 dpi, touch INTERNAL, FLAG_DEFAULT_DISPLAY, FLAG_ROTATES_WITH_C
ONTENT, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS, rotation 0, type BUILT_IN,
address null}
mAdapter=LocalDisplayAdapter
mDisplayToken=android.os.BinderProxy@4191fd88
mCurrentLayerStack=-1
mCurrentOrientation=0
mCurrentLayerStackRect=Rect(0, 0 - 600, 1024)
mCurrentDisplayRect=Rect(0, 0 - 600, 1024)
mCurrentSurface=null
mBuiltInDisplayId=0
mPhys=PhysicalDisplayInfo{600 x 1024, 59.993 fps, density 1.0, 179.29411 x 1
68.89351 dpi, secure true}
mBlanked=true
Logical Displays: size=1
Display 0:
mDisplayId=0
mLayerStack=0
mHasContent=true
mPrimaryDisplayDevice=Built-in Screen
mBaseDisplayInfo=DisplayInfo{"Built-in Screen", app 600 x 1024, real 600 x 1
024, largest app 600 x 1024, smallest app 600 x 1024, 59.993 fps, rotation 0, de
nsity 160, 179.29411 x 168.89351 dpi, layerStack 0, type BUILT_IN, address null,
FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}
mOverrideDisplayInfo=DisplayInfo{"Built-in Screen", app 600 x 976, real 600
x 1024, largest app 1024 x 976, smallest app 600 x 552, 59.993 fps, rotation 0,
density 160, 179.29411 x 168.89351 dpi, layerStack 0, type BUILT_IN, address nul