summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2025-01-06 18:34:35 -0800
committer Siarhei Vishniakou <svv@google.com> 2025-01-06 19:04:01 -0800
commita629d023d482c5a986031d29b45a5ccbeb68dce3 (patch)
treef4cf7ab68949228f9e6c067471cf83e5fac642b9 /libs/androidfw/StringPool.cpp
parentf492c93e40d43f23947eb0f01d7bee1d38425cc3 (diff)
Log the exception when the view couldn't get added
We are getting reports of a crash inside ViewRootImpl's InputStage.onDetachedFromWindow method, due to 'mFirstInputStage' object being null. The only way that could happen is if 'mAdded' is true, but an exception occurs sometime before 'mFirstInputStage' is assigned. The most likely caller of this location is WindowManagerGlobal. Inside WMG, there is a "try / catch" section. The actual exception is indeed getting rethrown. However, because it's java, it's hard to trace whether anyone else higher up is catching this exception. Therefore, simply null checking the mFirstInputStage might be just postponing this problem. If we are going to throw anyways, then it's likely that try / catch approach of WMG is not needed - we should just throw and not do the "removeViewLocked" code. In this CL, the proposal is to add a log of the exception as soon as it occurs, so that we can learn more about the problem. We can then make a more informed decision on how to handle it. Bug: 385705687 Flag: EXEMPT refactor Test: none Change-Id: I3d239bcd5b84710325d33fff86d99a4be9a8dc3f
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions