To avoid any potential null access on the delegate from various paths like onResume(), onPause(), etc. where the delegate or some of its member or delegates might also be null, make it final and assign it a default instance in the Activity constructor. This applies the same way for QtDisplayManager and QtInputDelegate, which are final and assigned an instance at the QtActivityDelegate constructor. This means also, that each of those delegates or classes should ensure any of objects used under them are safely called or not in null cases. This should help us reduce the amount of potential NullPointerExceptions. Fixes: QTBUG-129704 Change-Id: I36861c95d3b389fd88822aac0ae3616ccb3e304d Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io> (cherry picked from commit 64f152d52a8720de71c7440ca2979345b919c58c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%