diff --git a/src/biz/bokhorst/xprivacy/PrivacyService.java b/src/biz/bokhorst/xprivacy/PrivacyService.java index b28c63a09..fdb491a1b 100644 --- a/src/biz/bokhorst/xprivacy/PrivacyService.java +++ b/src/biz/bokhorst/xprivacy/PrivacyService.java @@ -792,6 +792,7 @@ public List getUsageList(int uid, String restrictionName) throws R try { enforcePermission(-1); SQLiteDatabase dbUsage = getDbUsage(); + int userId = Util.getUserId(Binder.getCallingUid()); mLockUsage.readLock().lock(); dbUsage.beginTransaction(); @@ -830,7 +831,8 @@ public List getUsageList(int uid, String restrictionName) throws R data.restricted = (cursor.getInt(3) > 0); data.time = cursor.getLong(4); data.extra = cursor.getString(5); - result.add(data); + if (userId == 0 || Util.getUserId(data.uid) == userId) + result.add(data); } } finally { cursor.close();