* -else if single fix requested, -if powerUsage = HIGH, mode is
* Accuracy Optimal -if powerUsage != HIGH, mode is PDE Calculate -if
* powerUsage = LOW mode is Cellsite
*/
private void setupCriteria() {
_bbCriteria = new BlackBerryCriteria();
_bbCriteria.setPreferredResponseTime(Integer
.parseInt(_preferredResponseTimeField.getText()));
if (_enableConcurrentGeolocationField.getChecked()) {
_bbCriteria
.enableGeolocationWithGPS(BlackBerryCriteria.FASTEST_FIX_PREFERRED);
} else if (_enableGeolocationFallbackField.getChecked()) {
_bbCriteria.enableGeolocationWithGPS();
}
switch (_primaryModeField.getSelectedIndex()) {
case 0: // Stand Alone(s)
_isMultipleFixes = false;
_bbCriteria.setMode(GPSInfo.GPS_MODE_AUTONOMOUS);
log("Primary mode set to Stand Alone");
break;
case 1: // Stand Alone(m)
_isMultipleFixes = true;
_bbCriteria.setMode(GPSInfo.GPS_MODE_AUTONOMOUS);
log("Primary mode set to Stand Alone");
break;
case 2: // Data Optimal(m)
_isMultipleFixes = true;
_bbCriteria.setMode(GPSInfo.GPS_MODE_CDMA_DATA_OPTIMAL);
log("Primary mode set to Data Optimal");
break;
case 3: // Speed Optimal(m)
_isMultipleFixes = true;
_bbCriteria.setMode(GPSInfo.GPS_MODE_CDMA_SPEED_OPTIMAL);
log("Primary mode set to Speed Optimal");
break;
case 4: // MS-Based(m)
_isMultipleFixes = true;
_bbCriteria.setMode(GPSInfo.GPS_MODE_CDMA_MS_BASED);
log("Primary mode set to MS-Based");
break;
case 5: // Accuracy Optimal(s)
_isMultipleFixes = false;
_bbCriteria.setMode(GPSInfo.GPS_MODE_CDMA_ACCURACY_OPTIMAL);
log("Primary mode set to Accuracy Optimal");
break;
case 6: // PDE Calculate(s)
_isMultipleFixes = false;
_bbCriteria.setMode(GPSInfo.GPS_MODE_CDMA_MS_ASSIST);
log("Primary mode set to PDE Calculate");
break;
case 7: // Cellsite(s)
_isMultipleFixes = false;
_bbCriteria.setMode(GPSInfo.GPS_MODE_CELLSITE);
log("Primary mode set to Cellsite(s)");
break;
case 8: // Cellsite(m)
_isMultipleFixes = true;
_bbCriteria.setMode(GPSInfo.GPS_MODE_CELLSITE);
log("Primary mode set to Cellsite(m)");
break;
case 9: // Default(s)
_isMultipleFixes = false;
log("Primary mode set to Default(m)");
break;
case 10: // Default(m)
_isMultipleFixes = true;
log("Primary mode set to Default(m)");
break;
case 11: // Optimal Geolocation(s)
_isMultipleFixes = false;
_bbCriteria =
new BlackBerryCriteria(LocationInfo.GEOLOCATION_MODE);
break;
case 12: // Optimal Geolocation(m)
_isMultipleFixes = true;
_bbCriteria =
new BlackBerryCriteria(LocationInfo.GEOLOCATION_MODE);
break;
case 13: // Cell Geolocation(s)
_isMultipleFixes = false;
_bbCriteria =
new BlackBerryCriteria(
LocationInfo.GEOLOCATION_MODE_CELL);
break;
case 14: // Cell Geolocation(m)
_isMultipleFixes = true;
_bbCriteria =
new BlackBerryCriteria(
LocationInfo.GEOLOCATION_MODE_CELL);
break;
case 15: // WLAN Geolocation(s)
_isMultipleFixes = false;
_bbCriteria =
new BlackBerryCriteria(
LocationInfo.GEOLOCATION_MODE_WLAN);
break;
case 16: // WLAN Geolocation(m)
_isMultipleFixes = true;
_bbCriteria =
new BlackBerryCriteria(
LocationInfo.GEOLOCATION_MODE_WLAN);
break;
}
if (_failOverModeField.getSelectedIndex() < 6) {