From 496c8b33c73e272598809380bd28b24c9e9996a6 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 23 May 2015 13:34:27 +0200 Subject: [PATCH] Fixed IMEI (getDeviceId) restriction Refs #2195 --- src/biz/bokhorst/xprivacy/XTelephonyManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/biz/bokhorst/xprivacy/XTelephonyManager.java b/src/biz/bokhorst/xprivacy/XTelephonyManager.java index 6b8aca4eb..1bd4b5954 100644 --- a/src/biz/bokhorst/xprivacy/XTelephonyManager.java +++ b/src/biz/bokhorst/xprivacy/XTelephonyManager.java @@ -6,6 +6,7 @@ import java.util.WeakHashMap; import android.os.Binder; +import android.os.Build; import android.os.Bundle; import android.telephony.CellLocation; import android.telephony.NeighboringCellInfo; @@ -158,7 +159,10 @@ public static List getInstances(String className, boolean server) { if (server) { // PhoneSubInfo - listHook.add(new XTelephonyManager(Methods.Srv_getDeviceId, PrivacyManager.cPhone, Srv.SubInfo)); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) + listHook.add(new XTelephonyManager(Methods.Srv_getDeviceId, PrivacyManager.cPhone, Srv.SubInfo)); + else + listHook.add(new XTelephonyManager(Methods.Srv_getDeviceId, PrivacyManager.cPhone, Srv.Phone)); listHook.add(new XTelephonyManager(Methods.Srv_getGroupIdLevel1, PrivacyManager.cPhone, Srv.SubInfo)); listHook.add(new XTelephonyManager(Methods.Srv_getIccSerialNumber, PrivacyManager.cPhone, Srv.SubInfo)); listHook.add(new XTelephonyManager(Methods.Srv_getIsimDomain, PrivacyManager.cPhone, Srv.SubInfo));