Skip to content

Commit

Permalink
fix bug #19
Browse files Browse the repository at this point in the history
  • Loading branch information
luxiaoyu01 committed Nov 29, 2013
1 parent 95e642b commit 833a9d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testrunner/src/com/baidu/cafe/local/traveler/Operation.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ private boolean isTheSameView(Operation operation) {

// view.toString() is like that "android.widget.ImageButton@402f8d80"
// so there is no need to compare this.index
if (!getTypeString(mViewString).equals(getTypeString(operation.mViewString))) {
if (!getTypeString(mView).equals(getTypeString(operation.mView))) {
return false;
}

Expand All @@ -284,8 +284,8 @@ private boolean isTheSameLocation(Operation operation) {
return mViewLocation[0] == location[0] && mViewLocation[1] == location[1] ? true : false;
}

private String getTypeString(String viewString) {
return viewString.substring(0, viewString.indexOf("@"));
private String getTypeString(View view) {
return view.getClass().toString().split(" ")[1];
}

/**
Expand Down

0 comments on commit 833a9d5

Please sign in to comment.