diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java index 22ff1738c8..2728988362 100644 --- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java +++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java @@ -258,16 +258,20 @@ public class QtActivity extends Activity } //--------------------------------------------------------------------------- - @Override - public void onCreate(Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); + protected void onCreateHook(Bundle savedInstanceState) { m_loader.APPLICATION_PARAMETERS = APPLICATION_PARAMETERS; m_loader.ENVIRONMENT_VARIABLES = ENVIRONMENT_VARIABLES; m_loader.QT_ANDROID_THEMES = QT_ANDROID_THEMES; m_loader.QT_ANDROID_DEFAULT_THEME = QT_ANDROID_DEFAULT_THEME; m_loader.onCreate(savedInstanceState); } + + @Override + public void onCreate(Bundle savedInstanceState) + { + super.onCreate(savedInstanceState); + onCreateHook(savedInstanceState); + } //--------------------------------------------------------------------------- @Override diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtService.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtService.java index 71acf9683e..cdd6c1efea 100644 --- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtService.java +++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtService.java @@ -50,11 +50,14 @@ public class QtService extends Service /////////////////////////// Super class calls //////////////////////////////////// /////////////// PLEASE DO NOT CHANGE THE FOLLOWING CODE ////////////////////////// ////////////////////////////////////////////////////////////////////////////////// + protected void onCreateHook() { + m_loader.onCreate(); + } @Override public void onCreate() { super.onCreate(); - m_loader.onCreate(); + onCreateHook(); } //---------------------------------------------------------------------------