Fix for crashes reported from android market

pull/14/head
Tim Su 13 years ago
parent be1f716be9
commit 070972f72b

@ -286,7 +286,7 @@ public final class ActFmSyncService {
*/
public void pushTagDataOnSave(TagData tagData, ContentValues values) {
long remoteId;
if(tagData.containsValue(TagData.REMOTE_ID))
if(tagData.containsNonNullValue(TagData.REMOTE_ID))
remoteId = tagData.getValue(TagData.REMOTE_ID);
else {
TagData forRemote = tagDataService.fetchById(tagData.getId(), TagData.REMOTE_ID);

@ -258,8 +258,9 @@ public final class TaskEditActivity extends TabActivity {
public void onTabChanged(String tabId) {
for (int i = 0; i < tabHost.getTabWidget().getChildCount(); i++)
tabHost.getTabWidget().getChildAt(i).setBackgroundResource(0);
tabHost.getTabWidget().getChildAt(tabHost.getCurrentTab())
.setBackgroundColor(r.getColor(R.color.task_edit_selected));
View child = tabHost.getTabWidget().getChildAt(tabHost.getCurrentTab());
if(child != null)
child.setBackgroundColor(r.getColor(R.color.task_edit_selected));
}
};
tabChange.onTabChanged(null);

@ -497,9 +497,13 @@ public class TaskListActivity extends ListActivity implements OnScrollListener,
protected void onPause() {
StatisticsService.sessionPause();
super.onPause();
unregisterReceiver(detailReceiver);
unregisterReceiver(refreshReceiver);
unregisterReceiver(syncActionReceiver);
try {
unregisterReceiver(detailReceiver);
unregisterReceiver(refreshReceiver);
unregisterReceiver(syncActionReceiver);
} catch (IllegalArgumentException e) {
// might not have fully initialized
}
backgroundTimer.cancel();
}

Loading…
Cancel
Save