Once upon a time my debugger hit the breakpoint on Log.d:
@Override
public void onDataChanged(DataTypeChanged dataType) {
if (!isDetached()) {
if(getActivity()==null){
Log.d(CommonConstants.DEBUG_TAG, "Yes, it is null.");
}
List<WeekViewCoreTask> tasks = DataProvider
.getWeekViewCoreTasks(getActivity().getApplicationContext());
mWeekView.setTasks(tasks);
}
}
I thought this never could occur. How this could occur: getActivity() had returned null when isDetached() had returned false?