From 54a6cf08556043d3e40c783a02f8ee7478e5abb8 Mon Sep 17 00:00:00 2001 From: str4d Date: Sat, 16 Jul 2016 04:02:45 +0000 Subject: [PATCH] Add a preInit() method to BaseCrashReportDialog for e.g. AppCompatDelegate setup --- .../java/org/acra/dialog/BaseCrashReportDialog.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/org/acra/dialog/BaseCrashReportDialog.java b/src/main/java/org/acra/dialog/BaseCrashReportDialog.java index 2e4e29ac89..55ce7fc774 100644 --- a/src/main/java/org/acra/dialog/BaseCrashReportDialog.java +++ b/src/main/java/org/acra/dialog/BaseCrashReportDialog.java @@ -55,6 +55,7 @@ public abstract class BaseCrashReportDialog extends Activity { */ @Override protected final void onCreate(@Nullable Bundle savedInstanceState) { + preInit(savedInstanceState); super.onCreate(savedInstanceState); @@ -82,6 +83,16 @@ protected final void onCreate(@Nullable Bundle savedInstanceState) { } } + /** + * Handle any necessary pre-onCreate() setup here. + * + * @param savedInstanceState If the activity is being re-initialized after + * previously being shut down then this Bundle contains the data it most + * recently supplied in {@link #onSaveInstanceState}. Note: Otherwise it is null. + */ + protected void preInit(@Nullable Bundle savedInstanceState) { + } + /** * Responsible for creating and showing the crash report dialog. *