FakePermissionEnforcer: provide a revokeAll method
This is useful in test suites that grant permissions on individual tests, and then revoke all permissions in an @After method. Bug: N/A Test: TH Change-Id: Ic3445f283702c7092c224bbe6f2340f5911b0541
This commit is contained in:
committed by
Matt Gilbride
parent
b931d69bd2
commit
9a46b01328
@@ -47,6 +47,10 @@ public class FakePermissionEnforcer extends PermissionEnforcer {
|
||||
mGranted.remove(permission);
|
||||
}
|
||||
|
||||
public void revokeAll() {
|
||||
mGranted.clear();
|
||||
}
|
||||
|
||||
private boolean granted(String permission) {
|
||||
return mGranted.contains(permission);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user