Search in sources :

Example 16 with AndroidPolicies

use of org.flyve.policies.manager.AndroidPolicies in project android-mdm-agent by flyve-mdm.

the class PasswordMinLetterPolicy method process.

@Override
protected boolean process() {
    try {
        int minimum = Integer.parseInt(this.policyValue.toString());
        AndroidPolicies androidPolicies = new AndroidPolicies(context, FlyveAdminReceiver.class);
        androidPolicies.setPasswordMinimumLetters(minimum);
        return true;
    } catch (Exception ex) {
        FlyveLog.e(this.getClass().getName() + ", process", ex.getMessage());
        return false;
    }
}
Also used : AndroidPolicies(org.flyve.policies.manager.AndroidPolicies)

Example 17 with AndroidPolicies

use of org.flyve.policies.manager.AndroidPolicies in project android-mdm-agent by flyve-mdm.

the class PasswordMinNonLetterPolicy method process.

@Override
protected boolean process() {
    try {
        int minimum = Integer.parseInt(this.policyValue.toString());
        AndroidPolicies androidPolicies = new AndroidPolicies(context, FlyveAdminReceiver.class);
        androidPolicies.setPasswordMinimumNonLetter(minimum);
        return true;
    } catch (Exception ex) {
        FlyveLog.e(this.getClass().getName() + ", process", ex.getMessage());
        return false;
    }
}
Also used : AndroidPolicies(org.flyve.policies.manager.AndroidPolicies)

Example 18 with AndroidPolicies

use of org.flyve.policies.manager.AndroidPolicies in project android-mdm-agent by flyve-mdm.

the class PasswordQualityPolicy method process.

@Override
protected boolean process() {
    try {
        String quality = this.policyValue.toString();
        AndroidPolicies androidPolicies = new AndroidPolicies(context, FlyveAdminReceiver.class);
        androidPolicies.setPasswordQuality(quality);
        return true;
    } catch (Exception ex) {
        FlyveLog.e(this.getClass().getName() + ", process", ex.getMessage());
        return false;
    }
}
Also used : AndroidPolicies(org.flyve.policies.manager.AndroidPolicies)

Example 19 with AndroidPolicies

use of org.flyve.policies.manager.AndroidPolicies in project android-mdm-agent by flyve-mdm.

the class VPNPolicy method process.

@Override
protected boolean process() {
    try {
        boolean disable = Boolean.parseBoolean(this.policyValue.toString());
        AndroidPolicies androidPolicies = new AndroidPolicies(context, FlyveAdminReceiver.class);
        androidPolicies.disableVPN(disable);
        return true;
    } catch (Exception ex) {
        FlyveLog.e(this.getClass().getName() + ", process", ex.getMessage());
        return false;
    }
}
Also used : AndroidPolicies(org.flyve.policies.manager.AndroidPolicies)

Aggregations

AndroidPolicies (org.flyve.policies.manager.AndroidPolicies)19 View (android.view.View)2 PoliciesData (org.flyve.mdm.agent.data.database.PoliciesData)2 FlyveAdminReceiver (org.flyve.mdm.agent.receivers.FlyveAdminReceiver)2 Context (android.content.Context)1 Location (android.location.Location)1 ActionBarDrawerToggle (android.support.v7.app.ActionBarDrawerToggle)1 AdapterView (android.widget.AdapterView)1 Button (android.widget.Button)1 CompoundButton (android.widget.CompoundButton)1 EditText (android.widget.EditText)1 ListView (android.widget.ListView)1 Switch (android.widget.Switch)1 TextView (android.widget.TextView)1 InventoryTask (org.flyve.inventory.InventoryTask)1 Routes (org.flyve.mdm.agent.core.Routes)1 ApplicationData (org.flyve.mdm.agent.data.database.ApplicationData)1 FileData (org.flyve.mdm.agent.data.database.FileData)1 MqttData (org.flyve.mdm.agent.data.database.MqttData)1 AppData (org.flyve.mdm.agent.data.localstorage.AppData)1