summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilli Ye <williye97@gmail.com>2019-09-08 18:23:04 +0200
committerJesse Chan <jc@lineageos.org>2020-05-15 22:06:48 +0800
commit834dfaa39b4b6e7cd3e3ae03a567235e6c4db976 (patch)
tree9b3b458fd48ace9c1fa222cb8f27601fc0b7b34c
parent3e3dfb28a98f119eae8848bf87ccf1eed3eda745 (diff)
downloadandroid_hardware_samsung-834dfaa39b4b6e7cd3e3ae03a567235e6c4db976.tar.gz
android_hardware_samsung-834dfaa39b4b6e7cd3e3ae03a567235e6c4db976.tar.bz2
android_hardware_samsung-834dfaa39b4b6e7cd3e3ae03a567235e6c4db976.zip
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>
-rw-r--r--hidl/sensors/Sensors.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/hidl/sensors/Sensors.cpp b/hidl/sensors/Sensors.cpp
index 678ac72..a242e37 100644
--- a/hidl/sensors/Sensors.cpp
+++ b/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);