use of org.flyve.policies.manager.CustomPolicies in project android-mdm-agent by flyve-mdm.
the class UsbPtpPolicy method process.
@Override
protected boolean process() {
try {
boolean disable = Boolean.parseBoolean(this.policyValue.toString());
CustomPolicies customPolicies = new CustomPolicies(context);
customPolicies.disablePTPUsbFileTransferProtocols(disable);
return true;
} catch (Exception ex) {
FlyveLog.e(this.getClass().getName() + ", process", ex.getMessage());
return false;
}
}
use of org.flyve.policies.manager.CustomPolicies in project android-mdm-agent by flyve-mdm.
the class CustomPhoneStateListener method onCallStateChanged.
public void onCallStateChanged(int state, String incomingNumber) {
// 0 = CALL_STATE_IDLE (close or no activity)
// 1 = CALL_STATE_RINGING
// 2 = CALL_STATE_OFFHOOK (At least one call exists that is dialing, active, or on hold, and no calls are ringing or waiting.)
FlyveLog.d("Status: " + state);
final Context context = MDMAgent.getInstance();
Boolean disable = Boolean.parseBoolean(new PoliciesData(context).getValue(SpeakerphonePolicy.POLICY_NAME).value);
if (state == 2) {
// Disable Speaker Phone
CustomPolicies customPolicies = new CustomPolicies(context);
customPolicies.disableSpeakerphone(disable);
}
}
use of org.flyve.policies.manager.CustomPolicies in project android-mdm-agent by flyve-mdm.
the class RoamingPolicy method process.
@Override
protected boolean process() {
try {
boolean disable = Boolean.parseBoolean(this.policyValue.toString());
CustomPolicies customPolicies = new CustomPolicies(context);
customPolicies.disableRoaming(disable);
return true;
} catch (Exception ex) {
FlyveLog.e(this.getClass().getName() + ", process", ex.getMessage());
return false;
}
}
use of org.flyve.policies.manager.CustomPolicies in project android-mdm-agent by flyve-mdm.
the class SpeakerphonePolicy method process.
@Override
protected boolean process() {
try {
boolean disable = Boolean.parseBoolean(this.policyValue.toString());
CustomPolicies customPolicies = new CustomPolicies(context);
customPolicies.disableSpeakerphone(disable);
return true;
} catch (Exception ex) {
FlyveLog.e(this.getClass().getName() + ", process", ex.getMessage());
return false;
}
}
use of org.flyve.policies.manager.CustomPolicies in project android-mdm-agent by flyve-mdm.
the class HostpotTetheringPolicy method process.
@Override
protected boolean process() {
try {
boolean disable = Boolean.parseBoolean(this.policyValue.toString());
CustomPolicies customPolicies = new CustomPolicies(context);
customPolicies.disableHostpotTethering(disable);
return true;
} catch (Exception ex) {
FlyveLog.e(this.getClass().getName() + ", process", ex.getMessage());
return false;
}
}
Aggregations