Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #348 from inoshperera/master
Browse files Browse the repository at this point in the history
fix for policy monitoring not responding to camera disable in BYOD sc…
  • Loading branch information
harshanL authored Nov 25, 2016
2 parents 4c82982 + f2d6bb1 commit 6ab3201
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,15 @@ public ComplianceFeature checkPolicyState(org.wso2.emm.agent.beans.Operation ope
case Constants.Operation.SET_SCREEN_CAPTURE_DISABLED:
case Constants.Operation.SET_STATUS_BAR_DISABLED:
if(applicationManager.isPackageInstalled(Constants.SERVICE_PACKAGE_NAME)) {
CommonUtils.callSystemApp(context,operation.getCode(),
Boolean.toString(operation.isEnabled()), null);
// Since without rooting the device a policy set by the device owner cannot
// be violated or overridden, no compliance check is necessary.
policy.setCompliance(true);
return policy;
} else {
throw new AndroidAgentException("Invalid operation code received");
CommonUtils.callSystemApp(context, operation.getCode(),
Boolean.toString(operation.isEnabled()), null);
}
// Since without rooting the device a policy set by the device owner cannot
// be violated or overridden, no compliance check is necessary.
//TODO: implement a mechanism in the system app to call the agent back and report
//policy status to agent.
policy.setCompliance(true);
return policy;
case Constants.Operation.APP_RESTRICTION:
return checkAppRestrictionPolicy(operation);
default:
Expand Down

0 comments on commit 6ab3201

Please sign in to comment.