setOnCheckedChangeListener(new OnCheckedChangeListener() {
public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked) {}
});
CompoundButton.OnCheckedChangeListener, Interface definition for a callback to be invoked when the checked state of a compound button changed.

The onCheckedChanged is called when coming back from the another Activity, without possible user interaction to actually check anything.

Just realized you’re doing this in an Adapter. This may not be related to onRestoreInstanceState, but I think I see the problem. You are reusing Views in the Adapter, which is good, but you’re setting star to checked before setting the listener. The problem is that star already has a listener from the last time it came through the getView method. Before you call star.setChecked(), call star.setOnCheckedChangedListener(null) and see if that solves your problem.