Fixed crash in crittercism launch, use of Pair in ask adapter

pull/14/head
Sam Bosley 13 years ago
parent c670f16bdd
commit 860a07ba28

@ -36,7 +36,6 @@ import android.text.Spanned;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.DisplayMetrics; import android.util.DisplayMetrics;
import android.util.Log; import android.util.Log;
import android.util.Pair;
import android.view.ContextMenu; import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo; import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -64,6 +63,7 @@ import com.todoroo.andlib.service.DependencyInjectionService;
import com.todoroo.andlib.service.ExceptionService; import com.todoroo.andlib.service.ExceptionService;
import com.todoroo.andlib.utility.AndroidUtilities; import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.andlib.utility.DateUtilities; import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.andlib.utility.Pair;
import com.todoroo.andlib.utility.Preferences; import com.todoroo.andlib.utility.Preferences;
import com.todoroo.astrid.activity.TaskEditActivity; import com.todoroo.astrid.activity.TaskEditActivity;
import com.todoroo.astrid.activity.TaskListActivity; import com.todoroo.astrid.activity.TaskListActivity;
@ -860,7 +860,7 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
v.getLocationOnScreen(location); v.getLocationOnScreen(location);
ViewHolder viewHolder = (ViewHolder)((View)v.getParent().getParent()).getTag(); ViewHolder viewHolder = (ViewHolder)((View)v.getParent().getParent()).getTag();
if(Math.abs(location[1] + lastTouchYRawY.first - lastTouchYRawY.second) > 10) { if(Math.abs(location[1] + lastTouchYRawY.getLeft() - lastTouchYRawY.getRight()) > 10) {
viewHolder.completeBox.setChecked(!viewHolder.completeBox.isChecked()); viewHolder.completeBox.setChecked(!viewHolder.completeBox.isChecked());
return; return;
} }

@ -105,8 +105,12 @@ public class StartupService {
// sets up context manager // sets up context manager
ContextManager.setContext(context); ContextManager.setContext(context);
Crittercism.init(context.getApplicationContext(), Constants.CRITTERCISM_APP_ID, try {
Crittercism.init(context.getApplicationContext(), Constants.CRITTERCISM_APP_ID,
Constants.CRITTERCISM_OATH_KEY, Constants.CRITTERCISM_SECRET); Constants.CRITTERCISM_OATH_KEY, Constants.CRITTERCISM_SECRET);
} catch (Exception e) {
// Sad times
}
// show notification if reminders are silenced // show notification if reminders are silenced
if(context instanceof Activity) { if(context instanceof Activity) {

Loading…
Cancel
Save