Source:
<code>protected void onResume() { super.onResume(); if (!areStoragePermissionsGranted(this)) { onResumeWasCalledWithoutPermissions = true; return; } <START> if (questionFontSize != Collect.getQuestionFontsize()) { <END> questionFontSize = Collect.getQuestionFontsize(); refreshCurrentView(); } String navigation = (String) GeneralSharedPreferences.getInstance().get(GeneralKeys.KEY_NAVIGATION); showNavigationButtons = navigation.contains(GeneralKeys.NAVIGATION_BUTTONS); findViewById(R.id.buttonholder).setVisibility(showNavigationButtons ? View.VISIBLE : View.GONE); findViewById(R.id.shadow_up).setVisibility(showNavigationButtons ? View.VISIBLE : View.GONE); if (showNavigationButtons) { updateNavigationButtonVisibility(); } if (errorMessage != null) { if (alertDialog != null && !alertDialog.isShowing()) { createErrorDialog(errorMessage, EXIT); } else { return; } } FormController formController = getFormController(); if (formLoaderTask != null) { formLoaderTask.setFormLoaderListener(this); if (formController == null && formLoaderTask.getStatus() == AsyncTask.Status.FINISHED) { FormController fec = formLoaderTask.getFormController(); if (fec != null) { if (!readPhoneStatePermissionRequestNeeded) { loadingComplete(formLoaderTask, formLoaderTask.getFormDef(), null); } } else { dismissFormLoadingDialogFragment(); FormLoaderTask t = formLoaderTask; formLoaderTask = null; t.cancel(true); t.destroy(); startActivity(new Intent(this, MainMenuActivity.class)); } } } else { if (formController == null) { startActivity(new Intent(this, MainMenuActivity.class)); finish(); return; } } if (saveToDiskTask != null) { saveToDiskTask.setFormSavedListener(this); } }</code><technical_language>good factor out a separate method, onResume() is big enough... goal small methods good names read code a story. I difficult find approach especially ForEntryActivity class a good practice</technical_language>

Target:
protected void onResume() { super.onResume(); if (!areStoragePermissionsGranted(this)) { onResumeWasCalledWithoutPermissions = true; return; } adjustFontSize(); String navigation = (String) GeneralSharedPreferences.getInstance().get(GeneralKeys.KEY_NAVIGATION); showNavigationButtons = navigation.contains(GeneralKeys.NAVIGATION_BUTTONS); findViewById(R.id.buttonholder).setVisibility(showNavigationButtons ? View.VISIBLE : View.GONE); findViewById(R.id.shadow_up).setVisibility(showNavigationButtons ? View.VISIBLE : View.GONE); if (showNavigationButtons) { updateNavigationButtonVisibility(); } if (errorMessage != null) { if (alertDialog != null && !alertDialog.isShowing()) { createErrorDialog(errorMessage, EXIT); } else { return; } } FormController formController = getFormController(); if (formLoaderTask != null) { formLoaderTask.setFormLoaderListener(this); if (formController == null && formLoaderTask.getStatus() == AsyncTask.Status.FINISHED) { FormController fec = formLoaderTask.getFormController(); if (fec != null) { if (!readPhoneStatePermissionRequestNeeded) { loadingComplete(formLoaderTask, formLoaderTask.getFormDef(), null); } } else { dismissFormLoadingDialogFragment(); FormLoaderTask t = formLoaderTask; formLoaderTask = null; t.cancel(true); t.destroy(); startActivity(new Intent(this, MainMenuActivity.class)); } } } else { if (formController == null) { startActivity(new Intent(this, MainMenuActivity.class)); finish(); return; } } if (saveToDiskTask != null) { saveToDiskTask.setFormSavedListener(this); } }