diff --git a/CHANGELOG.md b/CHANGELOG.md index 75e297f45..0ae6ca37c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/src/biz/bokhorst/xprivacy/Meta.java b/src/biz/bokhorst/xprivacy/Meta.java index 50dc18a58..66e26025a 100644 --- a/src/biz/bokhorst/xprivacy/Meta.java +++ b/src/biz/bokhorst/xprivacy/Meta.java @@ -108,6 +108,7 @@ public static List 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()); diff --git a/src/biz/bokhorst/xprivacy/XUsbDevice.java b/src/biz/bokhorst/xprivacy/XUsbDevice.java index a63b20afd..dedb17d9c 100644 --- a/src/biz/bokhorst/xprivacy/XUsbDevice.java +++ b/src/biz/bokhorst/xprivacy/XUsbDevice.java @@ -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 getInstances() { List listHook = new ArrayList(); 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; }