@Override
 public void handleMessage(Message msg) {
   switch (msg.what) {
     case GUI_START_NOTIFIER:
       if (!Thread.currentThread().isInterrupted()) {
         /*设置为当前进度*/
         mProgressBar.setProgress(progress);
         /*将显示信息显示在屏幕上*/
         progress_detail_info.setText(
             getResources().getText(R.string.str_progress_loading)
                 + "("
                 + progress
                 + "%)\n"
                 + "Progress:"
                 + Integer.toString(mProgressBar.getProgress())
                 + "\n"
                 + "Indeterminate:"
                 + Boolean.toString(mProgressBar.isIndeterminate()));
         mHandler.postDelayed(progressThread, 1000);
       }
       break;
     case GUI_STOP_NOTIFIER:
       /*隐藏进度条*/
       mProgressBar.setVisibility(View.GONE);
       /*显示加载成功*/
       progress_detail_info.setText(R.string.str_progress_done);
       /*停止线程*/
       Thread.currentThread().interrupt();
       break;
   }
   super.handleMessage(msg);
 }
  /*
  public void waitOnThrobber() {
  	boolean flag;
  	do {
  		flag = false;
  		ArrayList<ProgressBar> bars = solo.getCurrentProgressBars();
  		for (ProgressBar b: bars) {
  			if (b.isShown() && b.isIndeterminate()) {
  				Log.d("nofatclips", "Waiting on Progress Bar #" + b.getId());
  				flag = true;
  				solo.sleep(500);
  			}
  		}
  	} while (flag);
  }
  */
  public void waitOnThrobber() {
    int sleepTime = SLEEP_ON_THROBBER;
    if (sleepTime == 0) return;

    boolean flag;
    do {
      flag = false;
      ArrayList<ProgressBar> bars = solo.getCurrentProgressBars();
      for (ProgressBar b : bars) {
        if (b.isShown() && b.isIndeterminate()) {
          Log.d("nofatclips", "Waiting on Progress Bar #" + b.getId());
          flag = true;
          solo.sleep(500);
          sleepTime -= 500;
        }
      }
    } while (flag && (sleepTime > 0));
    sync();
  }