summaryrefslogtreecommitdiff
path: root/tools/aapt2/diff/Diff.cpp
diff options
context:
space:
mode:
authorRobert Carr <racarr@google.com>2016-10-05 15:33:16 -0700
committerRobert Carr <racarr@google.com>2016-10-19 14:56:47 -0700
commit6cfc4e31b7bde552f8e57e97e0cbeb88ccffab3b (patch)
treea7ddacff227a8bfa68ea0ec469dffe3f02a19aac /tools/aapt2/diff/Diff.cpp
parentec36a7a9448cb5b3f674809820e666bb49005bb3 (diff)
Prevent crash from early Toast surface destruction.
To understand this change it's first helpful to review Toasts. The ViewRoot is constructed on the client side, but it's added, to a window token controlled by the NotificationManagerService. When we call NotificationManagerService#cancelToast, the system will remove this window token. With the window token removed, the WindowManager needs to destroy the surface to prevent orphaned windows. If we destroy the Surface before removing the toast on the client side however, we've never asked the ViewRoot to stop rendering and we could have a crash. To solve this we just have to ensure we call removeView before cancelToast. Test: cts-tradefed run singleCommand cts -d -o --module CtsWidgetTestCases --test android.widget.cts.ToastTest Bug: 31547288 Change-Id: I96672b0ac07ff18e9f51348f2ed42913c5a5226f
Diffstat (limited to 'tools/aapt2/diff/Diff.cpp')
0 files changed, 0 insertions, 0 deletions