When device rotates display (screen) dimension change.
When application goes to background its surface is lost and later when application gets to foreground it is recreated (with different handle).
In case of rotation work flow is following:
Activity notifies glass that device configuration has changed. (dalvikInput.c)
Lens creates new ScreenEvent which dispatch to Screen.notifySettingsChanged
In case of surface lost event:
Activity notifies glass that device configuration has changed.
Lens creates new ScreenEvent which dispatch to Screen.notifySettingsChanged.
This causes screen to be recreated (if surface was lost new screen is zeroed) and native screen is updated.
PresentingPainter checks during pulse if native screen (PresentableState has been extended with native screen handle) has been lost and indicates to PresentingPainter a need to recreate presentable when native screen has been gained again.
When application goes to background its surface is lost and later when application gets to foreground it is recreated (with different handle).
In case of rotation work flow is following:
Activity notifies glass that device configuration has changed. (dalvikInput.c)
Lens creates new ScreenEvent which dispatch to Screen.notifySettingsChanged
In case of surface lost event:
Activity notifies glass that device configuration has changed.
Lens creates new ScreenEvent which dispatch to Screen.notifySettingsChanged.
This causes screen to be recreated (if surface was lost new screen is zeroed) and native screen is updated.
PresentingPainter checks during pulse if native screen (PresentableState has been extended with native screen handle) has been lost and indicates to PresentingPainter a need to recreate presentable when native screen has been gained again.
- duplicates
-
JDK-8090980 [Android] Add support for display orientation change
- Open
-
JDK-8091108 [Android] Add support for drawing surface change
- Open