UserOverlayBase.java

removed the synchronized modifier from AnimationThread.abort() the prevent ANR's
This commit is contained in:
2012-01-18 16:10:39 +00:00
parent c3d155500a
commit f4ee1f1898
38 changed files with 5 additions and 14 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 898 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 776 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -43,7 +43,7 @@ public abstract class UserOverlayBase extends Overlay implements GeoPointLocatio
private boolean isAborted;
public synchronized void abort(){
public void abort(){
isAborted = true;
}
@@ -65,13 +65,13 @@ public abstract class UserOverlayBase extends Overlay implements GeoPointLocatio
switch(index){
case 1:
setDrawable(R.drawable.user_arrow_animation_2);
mUserArrow = R.drawable.user_arrow_animation_2;
break;
case 2:
setDrawable(R.drawable.user_arrow_animation_3);
mUserArrow = R.drawable.user_arrow_animation_3;
break;
default:
setDrawable(R.drawable.user_arrow_animation_1);
mUserArrow = R.drawable.user_arrow_animation_1;
try {
sleep(300l);
} catch (InterruptedException e) {
@@ -97,15 +97,6 @@ public abstract class UserOverlayBase extends Overlay implements GeoPointLocatio
}
}
/**
* Sets the id of the user drawable
* @param id
* @author ricky barrette
*/
private synchronized void setDrawable(int id){
mUserArrow = id;
}
}
private final String TAG = "UserOverlayBase";
private boolean isEnabled;
@@ -181,9 +172,9 @@ public abstract class UserOverlayBase extends Overlay implements GeoPointLocatio
onMyLocationDisabled();
isEnabled = false;
mCompass.disable();
mAnimationThread.abort();
if(mGPSprogress != null)
mGPSprogress.cancel();
mAnimationThread.abort();
}
/**