I am using Android SearchWidget on SearchActivity for searches. It automatically gets focus and soft-input keyboard is displayed.
However, when user goes back with ActionBar (but not with back button), the soft-input stays on the screen even though activity has
android:windowSoftInputMode="stateHidden|adjustUnspecified"
as descripbed on https://developer.android.com/training/keyboard-input/visibility.html
It seems that it only works when going forward, and not coming back.
The problem: there may be many Activities calling SearchActivity and for them making stateAlwaysHidden may be not appropriate. (In other words: I don't know behavior of all other Activities.)
UPDATE: Giving code, actually just actionBar.setDisplayHomeAsUpEnabled(true);
@Override
protected void onCreate(Bundle savedInstanceState) {
    ....
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        // get the action bar
        ActionBar actionBar = getActionBar();
        if (null!=actionBar){
            // Enabling Back navigation on Action Bar icon
            actionBar.setDisplayHomeAsUpEnabled(true);          
        }
    }        
    ....
}
UDATE 2:
@Override
public boolean onOptionsItemSelected(MenuItem item) {
   return super.onOptionsItemSelected(item);
}
 
    