[Samsung Galaxy S 5 Unified Development] Massedil:
Hi everyone,

I looked more to find what happens for my sensor.

I tried to clean the proximity sensor, without success.

In fact, I think the sensor is working well in kernel but there is a problem with the connection to the apps.

Because if I call `cat /sys/devices/virtual/sensors/proximity_sensor/state`, I can see that the state is changing if my hand moves near or far from the sensor.

Values moves from 255 (far from the sensor) to 97 (close to the sensor).

But in the SatStat app :

- When I open the app value is "-"

- But when I remove hand, value stay blocked to 0, like if apps listening the proximity sensor are not anymore updated by the system.

The moment the proximity sensor stopped working was after a LineageOS update on my kltedv phone (from April to May).

1. Can someone with a kltedv phone can confirm that his proximity sensor works with a May LineageOS update ?

2. Do you think I can flash an old April LineageOS build without wiping data to confirm it works in an old version ? If yes, did anyone keep an official April build for the kltedv phone ?

Useful links for my research :

https://xdaforums.com/showthread.php?t=2569141

https://github.com/GrenderG/ProximitySensorFixer/

Logcat :

```

05-17 18:14:13.681 537 573 I ActivityManager: Start proc 3481:com.vonglasow.michael.satstat/u0a80 for activity com.vonglasow.michael.satstat/.ui.MainActivit

y

05-17 18:14:13.756 3481 3481 I michael.satsta: The ClassLoaderContext is a special shared library.

05-17 18:14:13.765 404 963 W ServiceManager: Permission failure: android.permission.ACCESS_SURFACE_FLINGER from uid=10137 pid=1478

05-17 18:14:13.765 404 963 D PermissionCache: checking android.permission.ACCESS_SURFACE_FLINGER for uid=10137 => denied (324 us)

05-17 18:14:13.908 3481 3481 D MainActivity: isWideScreen=false

05-17 18:14:13.932 871 871 W StaticLayout: maxLineHeight should not be -1. maxLines:1 lineCount:1

05-17 18:14:13.943 3481 3481 D MainActivity: Registered with provider: gps

05-17 18:14:13.943 3481 3481 D MainActivity: Registered with provider: network

05-17 18:14:13.953 389 767 I Sensors : Mag old sensor_state 513, new sensor_state : 529 en : 1

05-17 18:14:13.960 389 767 E Sensors : U_Gyro old sensor_state 529, new sensor_state : 16913 en : 1

05-17 18:14:13.974 389 767 E Sensors : Gyro old sensor_state 16913, new sensor_state : 16915 en : 1

05-17 18:14:13.999 389 767 E Sensors : Proximity old sensor_state 16915, new sensor_state : 17043 en : 1

05-17 18:14:14.018 389 427 D Sensors : ProximitySensor : mHasPendingEvent mEnabled = 1

05-17 18:14:14.020 389 389 E Sensors : Pressure old sensor_state 17043, new sensor_state : 17075 en : 1

05-17 18:14:14.027 3481 3481 E SensorManager: sensor or listener is null

05-17 18:14:14.027 3481 3481 E SensorManager: sensor or listener is null

05-17 18:14:14.029 389 427 I Sensors : ProximitySensor - 8(cm)

05-17 18:14:14.034 3481 3481 D OpenGLRenderer: Skia GL Pipeline

05-17 18:14:14.098 3481 3481 W FragmentManager: moveToState: Fragment state for SensorSectionFragment{de75960 #0 id=0x7f0e006e android:switcher:2131624046:1}

not updated inline; expected state 3 found 2

05-17 18:14:14.144 3481 3505 I Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8974_LA.BF.1.1.3_RB1__release_AU (I7

41a3d36ca)

05-17 18:14:14.144 3481 3505 I Adreno-EGL: OpenGL ES Shader Compiler Version: E031.29.00.00

05-17 18:14:14.144 3481 3505 I Adreno-EGL: Build Date: 04/04/16 Mon

05-17 18:14:14.144 3481 3505 I Adreno-EGL: Local Branch: mybranch19053788

05-17 18:14:14.144 3481 3505 I Adreno-EGL: Remote Branch: quic/LA.BF.1.1.3_rb1.12

05-17 18:14:14.144 3481 3505 I Adreno-EGL: Local Patches: NONE

05-17 18:14:14.144 3481 3505 I Adreno-EGL: Reconstruct Branch: NOTHING

05-17 18:14:14.151 3481 3505 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0

05-17 18:14:14.151 3481 3505 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0

05-17 18:14:14.151 3481 3505 I OpenGLRenderer: Initialized EGL, version 1.4

05-17 18:14:14.151 3481 3505 D OpenGLRenderer: Swap behavior 1

05-17 18:14:14.162 3481 3505 W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE

05-17 18:14:14.169 3481 3505 W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE

05-17 18:14:14.172 3481 3505 D vndksupport: Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.

05-17 18:14:14.239 3481 3505 D vndksupport: Loading /vendor/lib/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namesp

ace.

05-17 18:14:14.240 3481 3505 D vndksupport: Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.

05-17 18:14:14.282 537 570 I ActivityManager: Displayed com.vonglasow.michael.satstat/.ui.MainActivity: +622ms

05-17 18:14:14.438 404 1281 W SurfaceFlinger: Attempting to set client state on removed layer: Splash Screen com.vonglasow.michael.satstat#0

05-17 18:14:14.438 404 1281 W SurfaceFlinger: Attempting to destroy on removed layer: Splash Screen com.vonglasow.michael.satstat#0

05-17 18:15:15.836 537 553 I WifiService: startScan uid=10080

05-17 18:15:16.848 537 1467 I WifiService: startScan uid=10080

05-17 18:15:17.849 537 1467 I WifiService: startScan uid=10080

05-17 18:15:18.855 537 759 I WifiService: startScan uid=10080

05-17 18:15:19.731 389 427 I Sensors : ProximitySensor - 0(cm)

05-17 18:15:19.864 537 1468 I WifiService: startScan uid=10080

[...]

05-17 18:15:28.947 537 1073 I WifiService: startScan uid=10080

```