The ideia is create a Bitmask (enum type) to make the NetworkConnectionParameter clear.
Examples:
public enum Bitmask {
AIRPLANE_MODE (1), ALL_NETWORK_ON(6), DATA_ONLY(4), WIFI_ONLY(2), NONE(0);
private int bitmask;
private Bitmask(int bitmask) {
this.bitmask = bitmask;
}
public int getValue() {
return bitmask;
}
}
Sample code...
This...
NetworkConnectionSetting ncs = new NetworkConnectionSetting(Bitmask.AIRPLANE_MODE.getValue());
Insted of this
NetworkConnectionSetting ncsModoAviao = new NetworkConnectionSetting(true, false, false);
Or even the original int bitmask (table locate on this link)
NetworkConnectionSetting ncsModoAviao = new NetworkConnectionSetting(6);