/** * Revokes install app policy on the device (Particular app in the policy should be removed). * * @param operation - Operation object. */ private void revokeInstallAppPolicy(org.wso2.emm.agent.beans.Operation operation) throws AndroidAgentException { String appIdentifier = null; try { JSONObject appData = new JSONObject(operation.getPayLoad().toString()); if (!appData.isNull(resources.getString(R.string.app_identifier))) { appIdentifier = appData.getString(resources.getString(R.string.app_identifier)); } if (isAppInstalled(appIdentifier)) { appList.uninstallApplication(appIdentifier); } } catch (JSONException e) { throw new AndroidAgentException("Invalid JSON format.", e); } }