@LegacyNetworkConstant
  private static int convertConstraintsToLegacyNetConstant(int constraintMap) {
    int reqNet = LEGACY_NETWORK_ANY;

    reqNet =
        (constraintMap & Constraint.ON_ANY_NETWORK) == Constraint.ON_ANY_NETWORK
            ? LEGACY_NETWORK_CONNECTED
            : reqNet;

    reqNet =
        (constraintMap & Constraint.ON_UNMETERED_NETWORK) == Constraint.ON_UNMETERED_NETWORK
            ? LEGACY_NETWORK_UNMETERED
            : reqNet;

    return reqNet;
  }
Converts a bitmap of Constraint values into a LegacyNetworkConstraint constant (int).
jobdispatcher/src/main/java/com/firebase/jobdispatcher/GooglePlayJobWriter.java