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

Commit

Permalink
Secondary users can only see own use data
Browse files Browse the repository at this point in the history
Refs #1563
  • Loading branch information
M66B committed Mar 16, 2014
1 parent 0b54299 commit 8d39535
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/biz/bokhorst/xprivacy/PrivacyService.java
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ public List<PRestriction> getUsageList(int uid, String restrictionName) throws R
try {
enforcePermission(-1);
SQLiteDatabase dbUsage = getDbUsage();
int userId = Util.getUserId(Binder.getCallingUid());

mLockUsage.readLock().lock();
dbUsage.beginTransaction();
Expand Down Expand Up @@ -830,7 +831,8 @@ public List<PRestriction> 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();
Expand Down

0 comments on commit 8d39535

Please sign in to comment.