/** {@inheritDoc} */ @Override protected void onDestroy() { super.onDestroy(); if (!cancelled) { View content = findViewById(android.R.id.content); authWindow.setUsername(ViewUtil.getTextViewValue(content, R.id.username)); authWindow.setPassword(ViewUtil.getTextViewValue(content, R.id.password)); authWindow.setRememberPassword(ViewUtil.isCompoundChecked(content, R.id.store_password)); } if (!paused) { authWindow.setCanceled(cancelled); authWindow.windowClosed(); } }