mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 06:09:55 +01:00
[android] Fix theme of DevReportActivity after AndroidX migration
This commit is contained in:
@@ -15,6 +15,7 @@ import org.briarproject.briar.android.util.UserFeedback;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
@@ -47,17 +48,16 @@ public class DevReportActivity extends BaseCrashReportDialog {
|
|||||||
super.preInit(savedInstanceState);
|
super.preInit(savedInstanceState);
|
||||||
getDelegate().installViewFactory();
|
getDelegate().installViewFactory();
|
||||||
getDelegate().onCreate(savedInstanceState);
|
getDelegate().onCreate(savedInstanceState);
|
||||||
if (getDelegate().applyDayNight()) {
|
getDelegate().applyDayNight();
|
||||||
// If DayNight has been applied, we need to re-apply the theme for
|
// We always need to re-apply the theme
|
||||||
// the changes to take effect. On API 23+, we should bypass
|
// for day/night the changes to take effect.
|
||||||
// setTheme(), which will no-op if the theme ID is identical to the
|
// On API 23+, we should bypass setTheme(), which will no-op
|
||||||
// current theme ID.
|
// if the theme ID is identical to the current theme ID.
|
||||||
int theme = R.style.BriarTheme_NoActionBar;
|
int theme = R.style.BriarTheme_NoActionBar;
|
||||||
if (SDK_INT >= 23) {
|
if (SDK_INT >= 23) {
|
||||||
onApplyThemeResource(getTheme(), theme, false);
|
onApplyThemeResource(getTheme(), theme, false);
|
||||||
} else {
|
} else {
|
||||||
setTheme(theme);
|
setTheme(theme);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,6 +91,12 @@ public class DevReportActivity extends BaseCrashReportDialog {
|
|||||||
getDelegate().onPostCreate(state);
|
getDelegate().onPostCreate(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
getDelegate().onStart();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPostResume() {
|
protected void onPostResume() {
|
||||||
super.onPostResume();
|
super.onPostResume();
|
||||||
@@ -109,6 +115,12 @@ public class DevReportActivity extends BaseCrashReportDialog {
|
|||||||
getDelegate().onConfigurationChanged(newConfig);
|
getDelegate().onConfigurationChanged(newConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onSaveInstanceState(@NonNull Bundle outState) {
|
||||||
|
super.onSaveInstanceState(outState);
|
||||||
|
getDelegate().onSaveInstanceState(outState);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
|
|||||||
Reference in New Issue
Block a user