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

Commit

Permalink
fix for policy monitoring not responding to camera disable in BYOD sc…
Browse files Browse the repository at this point in the history
…enario
  • Loading branch information
inoshperera committed Nov 25, 2016
1 parent 47dbece commit f2d6bb1
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 f2d6bb1

Please sign in to comment.