public void doAccessControlEnabled(boolean enabled) throws Exception {
    Log.d(TAG, "DoAccessControlEnabled: " + enabled);
    // Create post data
    Map<String, String> postData = createAccessControlEnabledPostData(enabled);

    Log.d(TAG, "Post Data:\n" + Utils.mapToString(postData));

    // Post access control data
    RestClient restClient =
        createRestClient(getRouterPage(this.getRouterParsing().advanced_accesscontrol.page));
    restClient.addData(postData);
    Response response = restClient.execute(RequestMethod.POST);

    // Is logged in
    if (isNotLoggedIn(response)) throw new NotLoggedinException();
  }
  public void doAccessControlPolicy(boolean enabled, int policyId) throws Exception {
    Log.d(TAG, "doAccessControlPolicyEnabled: " + enabled + ", " + policyId);
    // Create post data
    Integer[] policyIds = {policyId};
    Map<String, String> postData =
        createAccessControlEnablePolicyPostData(
            enabled ? policyIds : null, !enabled ? policyIds : null);

    Log.d(TAG, "Post Data:\n" + Utils.mapToString(postData));

    // Post access control data
    RestClient restClient =
        createRestClient(getRouterPage(this.getRouterParsing().advanced_accesscontrol.page));
    restClient.addData(postData);
    Response response = restClient.execute(RequestMethod.POST);

    // Is logged in
    if (isNotLoggedIn(response)) throw new NotLoggedinException();
  }