예제 #1
0
 private void updateProgress() {
   for (Action a : Action.values()) {
     if (a == currentAction) {
       // this is the current action
       showInProgress(a.viewId);
     } else if (a.ordinal() < currentAction.ordinal()) {
       // this action has completed
       showResult(a.viewId, results[a.ordinal()]);
     } else {
       // this action hasn't started
       showNotStarted(a.viewId);
     }
   }
   ChipsetDetection detection = ChipsetDetection.getDetection();
   if (currentAction == Action.Finished)
     if (detection == null
         || detection.getWifiChipset() == null
         || detection.getWifiChipset().supportedModes == null
         || detection.getWifiChipset().supportedModes.contains(WifiMode.Adhoc) == false) {
       app.showNoAdhocDialog = true;
       LogActivity.logMessage(
           "detect",
           "Could not work out how to control your WiFi chipset. Relying on operating system, so no ad-hoc WiFi.",
           false);
     }
 }