Details
-
Technical task
-
Resolution: Fixed
-
P1: Critical
-
None
-
None
-
None
-
1a6efa072 (dev), c95426619 (dev), b7f24ec07 (6.8), e4d553777 (6.8), 7c7b63f3e (dev), 9f8e49360 (dev), 35e027fb6 (6.9), 41047e8b2 (6.9), 93cdf9a01 (6.8), dca4361b9 (6.8)
Description
Currently we do a lot of initialization like storing references to classes in JNI_OnLoad. However, JNI_OnLoad only gets called once, when the library is loaded, so when those references get cleaned up when Qt is terminated once the Activity is destroyed, they don't get reinitialized when the Activity is recreated.
Separate things that only need to happen once/in JNI_OnLoad, like registering the native methods, and the things that need to be done again when the Activity has been destroyed and then restarted, like initializing the variables and creating the Qt thread.
Attachments
For Gerrit Dashboard: QTBUG-130610 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
606749,3 | Android: Remove unused ClassLoader reference | dev | qt/qtbase | Status: MERGED | +2 | 0 |
606750,4 | Android: Remove redundant JavaVM reference | dev | qt/qtbase | Status: MERGED | +2 | 0 |
606751,9 | Android: Separate JNI initialization from JNI_OnLoad | dev | qt/qtbase | Status: MERGED | +2 | 0 |
606752,9 | Android: Create new QtThread when needed | dev | qt/qtbase | Status: MERGED | +2 | 0 |
609080,2 | Android: Remove unused ClassLoader reference | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
609082,2 | Android: Remove redundant JavaVM reference | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
617642,2 | Android: Separate JNI initialization from JNI_OnLoad | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |
617643,2 | Android: Create new QtThread when needed | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |
617727,2 | Android: Separate JNI initialization from JNI_OnLoad | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
617728,4 | Android: Create new QtThread when needed | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |