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 *USB.getSerialNumber* (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 c27c2b2 commit cd15365
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Changelog
* Added restriction *SIP.isSipWifiOnly*
* Added parameter destination address to *sendDataMessage*, *sendMultipartTextMessage* and *sendTextMessage* (SMS)
* Added parameter key to *%imei*, *%hostname*, *%serialno*, *%macaddr* and *%cid*
* Added restriction for *USB.getSerialNumber* (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 @@ -108,6 +108,7 @@ public static List<Hook> get() {

mListHook.add(new Hook("identification", "USB.getDeviceId", "", 12, "2.1.7", null));
mListHook.add(new Hook("identification", "USB.getDeviceName", "", 12, "2.1.7", null));
mListHook.add(new Hook("identification", "USB.getSerialNumber", "", 20, "2.1.17", null));

mListHook.add(new Hook("internet", "getAllByName", "INTERNET", 1, "0.0", null).dangerous());
mListHook.add(new Hook("internet", "getByAddress", "INTERNET", 1, "0.0", null).dangerous());
Expand Down
4 changes: 3 additions & 1 deletion src/biz/bokhorst/xprivacy/XUsbDevice.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@ public String getClassName() {
// public int getDeviceId()
// public String getDeviceName()
// public static String getDeviceName(int id)
// public String getSerialNumber()
// http://developer.android.com/reference/android/hardware/usb/UsbDevice.html

private enum Methods {
getDeviceId, getDeviceName
getDeviceId, getDeviceName, getSerialNumber
};

public static List<XHook> getInstances() {
List<XHook> listHook = new ArrayList<XHook>();
listHook.add(new XUsbDevice(Methods.getDeviceId, PrivacyManager.cIdentification));
listHook.add(new XUsbDevice(Methods.getDeviceName, PrivacyManager.cIdentification));
listHook.add(new XUsbDevice(Methods.getSerialNumber, PrivacyManager.cIdentification));
return listHook;
}

Expand Down

0 comments on commit cd15365

Please sign in to comment.