diff --git a/briar-android/src/main/java/org/briarproject/briar/android/reporting/DevReportActivity.java b/briar-android/src/main/java/org/briarproject/briar/android/reporting/DevReportActivity.java index 9014a7dfd..4861bdb50 100644 --- a/briar-android/src/main/java/org/briarproject/briar/android/reporting/DevReportActivity.java +++ b/briar-android/src/main/java/org/briarproject/briar/android/reporting/DevReportActivity.java @@ -15,6 +15,7 @@ import org.briarproject.briar.android.util.UserFeedback; import java.io.File; +import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatDelegate; import androidx.appcompat.widget.Toolbar; @@ -47,17 +48,16 @@ public class DevReportActivity extends BaseCrashReportDialog { super.preInit(savedInstanceState); getDelegate().installViewFactory(); getDelegate().onCreate(savedInstanceState); - if (getDelegate().applyDayNight()) { - // If DayNight has been applied, we need to re-apply the theme for - // the changes to take effect. On API 23+, we should bypass - // setTheme(), which will no-op if the theme ID is identical to the - // current theme ID. - int theme = R.style.BriarTheme_NoActionBar; - if (SDK_INT >= 23) { - onApplyThemeResource(getTheme(), theme, false); - } else { - setTheme(theme); - } + getDelegate().applyDayNight(); + // We always need to re-apply the theme + // for day/night the changes to take effect. + // On API 23+, we should bypass setTheme(), which will no-op + // if the theme ID is identical to the current theme ID. + int theme = R.style.BriarTheme_NoActionBar; + if (SDK_INT >= 23) { + onApplyThemeResource(getTheme(), theme, false); + } else { + setTheme(theme); } } @@ -91,6 +91,12 @@ public class DevReportActivity extends BaseCrashReportDialog { getDelegate().onPostCreate(state); } + @Override + protected void onStart() { + super.onStart(); + getDelegate().onStart(); + } + @Override protected void onPostResume() { super.onPostResume(); @@ -109,6 +115,12 @@ public class DevReportActivity extends BaseCrashReportDialog { getDelegate().onConfigurationChanged(newConfig); } + @Override + protected void onSaveInstanceState(@NonNull Bundle outState) { + super.onSaveInstanceState(outState); + getDelegate().onSaveInstanceState(outState); + } + @Override public void onStop() { super.onStop();