/[projects]/android/DroidRadar/src/dk/thoerup/droidradar/RadarView.java
ViewVC logotype

Diff of /android/DroidRadar/src/dk/thoerup/droidradar/RadarView.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 280 by torben, Mon Aug 24 21:48:00 2009 UTC revision 281 by torben, Tue Aug 25 19:00:58 2009 UTC
# Line 57  public class RadarView extends SurfaceVi Line 57  public class RadarView extends SurfaceVi
57    
58          long imei;          long imei;
59                    
60          Thread t;          //Thread t;
61                    
62          public RadarView(Context context) {          public RadarView(Context context) {
63                  super(context);                  super(context);
# Line 96  public class RadarView extends SurfaceVi Line 96  public class RadarView extends SurfaceVi
96                  surfaceHolder = this.getHolder();                  surfaceHolder = this.getHolder();
97                  surfaceHolder.addCallback(this);                  surfaceHolder.addCallback(this);
98                                    
                 t = new Thread(this);  
99                                    
100                  updateDistanceTexts();                  updateDistanceTexts();
101          }          }
# Line 165  public class RadarView extends SurfaceVi Line 164  public class RadarView extends SurfaceVi
164                  hcenter = width / 2;                  hcenter = width / 2;
165                  vcenter = hcenter + 20;                  vcenter = hcenter + 20;
166                                    
167                  t.start();                  mRun = true;
168                    Thread drawThread = new Thread(this);
169                    
170                    drawThread.start();
171                  locator.setDroidsLocatedListener(this);                  locator.setDroidsLocatedListener(this);
172                    locator.setContinue(true);
173                  Thread locatorThread = new Thread(locator);                  Thread locatorThread = new Thread(locator);
174                  locatorThread.start();                  locatorThread.start();
175          }          }
# Line 176  public class RadarView extends SurfaceVi Line 179  public class RadarView extends SurfaceVi
179          public void surfaceDestroyed(SurfaceHolder holder) { //surfaceholder.CallBack          public void surfaceDestroyed(SurfaceHolder holder) { //surfaceholder.CallBack
180                  Log.i("surfacDestroyed()","-");                  Log.i("surfacDestroyed()","-");
181          mRun = false;          mRun = false;
182          locator.stop();          locator.setContinue(false);
183          }          }
184                    
185      public void run() {      public void run() {
# Line 201  public class RadarView extends SurfaceVi Line 204  public class RadarView extends SurfaceVi
204                  Thread.sleep(20);                  Thread.sleep(20);
205              } catch (InterruptedException e) {}              } catch (InterruptedException e) {}
206          }          }
207            Log.i("RadarView", "Draw thread exiting");
208      }      }
209    
210            

Legend:
Removed from v.280  
changed lines
  Added in v.281

  ViewVC Help
Powered by ViewVC 1.1.20