public void doTask(Long userId, Long placeId, float lat, float lng, float accuracy, int radius) { mPeopleTask = new PeopleTask(); mPeopleTask.mActivity = mAct; mPeopleTask.mMethod = this; MyParams params = new MyParams(); params.mUserId = userId; params.mPlaceId = placeId; params.mLatitude = lat; params.mLongitude = lng; params.mAccuracy = accuracy; params.mRadius = radius; mPeopleTask.execute(params); }
public void cleanUp() { mAct.setSupportProgressBarIndeterminateVisibility(false); mPeopleTask.mActivity = null; if (mAct.isFinishing()) mPeopleTask.cancel(false); }