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

Commit

Permalink
Add flush operation
Browse files Browse the repository at this point in the history
Refs #1678
  • Loading branch information
M66B committed May 27, 2014
1 parent 686d616 commit 3756edb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/biz/bokhorst/xprivacy/IPrivacyService.aidl
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ interface IPrivacyService {
void deleteSettings(int uid);

void clear();
void flush();
void dump(int uid);
}
16 changes: 16 additions & 0 deletions src/biz/bokhorst/xprivacy/PrivacyService.java
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,22 @@ public void clear() throws RemoteException {
}
}

@Override
public void flush() throws RemoteException {
try {
enforcePermission(0);
synchronized (mRestrictionCache) {
mRestrictionCache.clear();
}
synchronized (mSettingCache) {
mSettingCache.clear();
}
} catch (Throwable ex) {
Util.bug(null, ex);
throw new RemoteException(ex.toString());
}
}

@Override
public void dump(int uid) throws RemoteException {
if (uid == 0) {
Expand Down

0 comments on commit 3756edb

Please sign in to comment.