I've disabled the proximity sensor at the framework level. This means that when any app queries the system for the proximity sensor capability, it will get back a reply saying that the phone does not have a proximity sensor. The AOSP Dialer will not acquire the screen-off wake lock if the device reports no proximity sensor. In fact, the Google Phone app does the same thing, and so this fix will allow you to use Google's dialer as well. This is useful because I want the Duo integration in the dialer, which is missing in the AOSP version. In simpler terms, this fix will prevent any app from turning off the screen if it is triggered by the proximity sensor.
This might break apps that depend on the existence of the proximity sensor to work. I have not encountered any issues so far, but use at your own risk.
Please note that I've only tested this on the LineageOS 20171214 nightly for Nexus 4, and not on any other device; however, I don't see why this fix should not work elsewhere.
The fix is the attached services.jar. Source code is up to date as of 2017-12-18. You will need to replace the original jar at /system/framework/services.jar. Make sure you backup the original before proceeding. The steps to apply the fix is similar to applying the Dialer.apk; the only difference is the file path. You must wipe dalvik cache and cache from recovery after the replacement in order for the fix to take effect.
If you wish to do your own build of the services.jar, the diff is a one-liner that you can see at https://github.com/earthgrazer/andr...mmit/563a2c6c2267f667b4f05f0bce1a1e83892baeb5
This might break apps that depend on the existence of the proximity sensor to work. I have not encountered any issues so far, but use at your own risk.
Please note that I've only tested this on the LineageOS 20171214 nightly for Nexus 4, and not on any other device; however, I don't see why this fix should not work elsewhere.
The fix is the attached services.jar. Source code is up to date as of 2017-12-18. You will need to replace the original jar at /system/framework/services.jar. Make sure you backup the original before proceeding. The steps to apply the fix is similar to applying the Dialer.apk; the only difference is the file path. You must wipe dalvik cache and cache from recovery after the replacement in order for the fix to take effect.
If you wish to do your own build of the services.jar, the diff is a one-liner that you can see at https://github.com/earthgrazer/andr...mmit/563a2c6c2267f667b4f05f0bce1a1e83892baeb5
Attachments
Last edited: