public void OnServiceDisconnected(ComponentName name) { if (name.ClassName.Equals(typeof(UpdateService).Name)) { searchActivity.UnregisterReceiver(searchActivity.mReceiver); } }