Fix system reboot in systm_server caused by SensorPrivacyService

We should unregister all listeners from sensor privacy state change
 notifications when binder died.

Test: atest SensorPrivacyServiceMockingTest , Manual
Bug: 288750681
Change-Id: Ibfab9c96412e9ed09d0105eb20b1cb03105b6d44
This commit is contained in:
Shen Lin
2023-06-26 18:21:54 +08:00
parent 8fadd7d0c7
commit 5920e08dff

View File

@@ -1405,6 +1405,7 @@ public final class SensorPrivacyService extends SystemService {
@Override
public void binderDied() {
mSensorPrivacyServiceImpl.removeSensorPrivacyListener(mListener);
mSensorPrivacyServiceImpl.removeToggleSensorPrivacyListener(mListener);
}
public void destroy() {