title: Android Java code is giving Syntax error on break statement
body: <p>I need help on figuring out why this code is giving me:</p>
  
  <blockquote>
    <p>Syntax error on token ":", { expected after this token/line
    108,109,110(label125,label192,label202 in the beginning)/Java Problem</p>
  </blockquote>
  
  <pre><code>  public void onGPSUpdate(Location paramLocation)
    {
      if (paramLocation != null)
      {
        this.sampleCount = (1 + this.sampleCount);
        label125: int i;
        label192: int j;
        label202: int m;
        if (paramLocation.hasSpeed())
        {
          this.speed = (2.23693629D * paramLocation.getSpeed());
          this.oldLocation = paramLocation;
          this.mAvgSum += this.speed;
          this.speedQ.add(Double.valueOf(this.speed));
          if (this.speedQ.size() &gt; 300)
            this.mAvgSum -= ((Double)this.speedQ.remove()).doubleValue();
          if (!this.speedQ.isEmpty())
            break label324;
          this.mAvg = 0.0D;
          if (this.speed &lt;= this.speedThreshold)
            break label363;
          this.THRESHOLD_STATUS = ("OVER: " + this.speedThreshold + " MPH");
          if (!this.smsControlRunning)
          {
            smsControlOn();
            this.smsControlRunning = true;
          }
          if (!this.blueToothPaired)
            break label346;
          i = 0;
          if (!this.hasBlueTooth)
            break label351;
          j = 0;
          int k = i | j;
          if (!this.phoneControlRunning)
            break label357;
          m = 0;
          label218: if ((k &amp; m) != 0)
          {
            phoneControlOn();
            this.phoneControlRunning = true;
          }
        }
        while (true)
        {
          this.SPEED_STATUS = String.valueOf(this.speed);
          this.COUNT_STATUS = (this.sampleCount + " updates");
          this.MAVG_STATUS = ("mAvg: " + this.mAvg);
          return;
          this.speed = getSpeed(this.oldLocation, paramLocation);
          break;
          label324: this.mAvg = (this.mAvgSum / this.speedQ.size());
          break label125;
          label346: i = 1;
          break label192;
          label351: j = 1;
          break label202;
          label357: m = 1;
          break label218;
          label363: this.THRESHOLD_STATUS = ("UNDER: " + this.speedThreshold + " MPH");
          stopAllServices();
        }
      }
      Toast.makeText(this, "LOCATION NULL", 0).show();
    }
  </code></pre>
  
  <p>This is probably an obvious error but I am relatively new to Android development and using Eclipse.  The same code worked fine under a previous version before renaming(refactoring) the application.  This was coded by another programmer who worked on the project before me and I think this could be done better using a case or switch statement instead of the break and continue we have.  I am getting frustrated with it and would appreciate any advice.</p>