ViewRoot: Notify app when surface is released from setWindowStopped

NativeActivities do not receive onNativeWindowDestroyed callback when the activity is stopped. If
the app still uses the window object after the window is destroyed, the app can crash.

Test: run native-plasma from Android NDK. Launch activity & press home. Verify from the logs app
receives onNativeWindowDestroyed callback when its stopped.

Bug: b/111948775
Change-Id: I1de76feb7f4974b77b42b56e592ff6444713c699
1 file changed