Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Added restriction for heart rate sensor (Android "L")
Browse files Browse the repository at this point in the history
Refs #1757
  • Loading branch information
M66B committed Jun 29, 2014
1 parent 5abf8b4 commit ac2b5c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Changelog
* Added parameter path to *MediaRecorder.setOutputFile*
* Added restriction for *getPackagesForUid*
* Added process name parameter to *queryContentProviders*
* Added restriction for heart rate sensor (Android "L") ([issue](/../../issues/1757))

[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)

Expand Down
1 change: 1 addition & 0 deletions src/biz/bokhorst/xprivacy/Meta.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ public static List<Hook> get() {
mListHook.add(new Hook("sensors", "rotation", "", 3, null, null));
mListHook.add(new Hook("sensors", "temperature", "", 3, null, null));
mListHook.add(new Hook("sensors", "step", "", 3, null, null));
mListHook.add(new Hook("sensors", "heartrate", "", 20, null, null));

mListHook.add(new Hook("shell", "sh", "", 10, "0.0", null).dangerous().whitelist(cTypeCommand));
mListHook.add(new Hook("shell", "su", "", 10, "0.0", null).dangerous().whitelist(cTypeCommand));
Expand Down
3 changes: 3 additions & 0 deletions src/biz/bokhorst/xprivacy/XSensorManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ else if (type == Sensor.TYPE_ACCELEROMETER || type == Sensor.TYPE_LINEAR_ACCELER
} else if (type == Sensor.TYPE_STEP_COUNTER || type == Sensor.TYPE_STEP_DETECTOR) {
if (isRestricted(param, "step"))
return true;
} else if (type == 21) { // TODO: replace by TYPE_HEART_RATE
if (isRestricted(param, "heartrate"))
return true;
} else
Util.log(this, Log.WARN, "Unknown sensor type=" + type);
return false;
Expand Down

0 comments on commit ac2b5c7

Please sign in to comment.