@Override protected void onDestroy() { // TODO Auto-generated method stub if (mChooserAdapter != null) mChooserAdapter.stopAndClean(); if (mService != null) unbindService(mServiceConnection); super.onDestroy(); }
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_BACK: if (mManualSearch) { mManualSearch = false; findViewById(R.id.manual_input_sub_layout).setVisibility(View.GONE); findViewById(R.id.manual_input_go_button).setVisibility(View.GONE); findViewById(R.id.manual_input_enable_button).setVisibility(View.VISIBLE); mChooserAdapter.stopAndClean(); showAlbumChooser(); return true; } else break; } return super.onKeyDown(keyCode, event); }