Yes, you can get the actual distance from the surface of the phone.
In fact ALL hardware DO sensors provide this information. But, unfortunately, the touch API defined in Android determines the proximity to boolean ie NEAR (1) OR FAR (0).
, , , . -HAL.
, / . . , , "".
, Android ( v4.1 "jelly- bean" ) API- . -HAL ( sys-fs).
/ Android.