sensors: get rid of com.samsung.permission.SSENSOR

Samsung uses a permission com.samsung.permission.SSENSOR
for Samsung-specfic sensors. Android obviously does not
have that and the default is denied when there is no
permission. As such, those sensors are inaccessible.

Thus, this change removes this permission from those sensors
so we can use them.

Android does not require special permissions for most sensors
so this change doesn't attach additional permission requirements
to those sensors.

However, note that it is possible that some sensitive sensors
introduced by Samsung in the future may use SSENSOR permission
and for privacy reasons they should be handled separately with
appropriate permission control attached.

Change-Id: Ia3033898722039b285e522e226074238508f6093
Signed-off-by: Jesse Chan <jc@lineageos.org>
tirimbino
Willi Ye 5 years ago committed by Jesse Chan
parent 3e3dfb28a9
commit 834dfaa39b
  1. 4
      hidl/sensors/Sensors.cpp

@ -125,6 +125,10 @@ Return<void> Sensors::getSensorsList(getSensorsList_cb _hidl_cb) {
SensorInfo *dst = &out[i];
convertFromSensor(*src, dst);
if (dst->requiredPermission == "com.samsung.permission.SSENSOR") {
dst->requiredPermission = "";
}
}
_hidl_cb(out);

Loading…
Cancel
Save