NEWTEvent: Add isConsumed() and setConsumed(boolean) methods to simply usage, using the existing consumedTag attachment for compatibility and efficiency.
NEWT/Android: Fix BACK button implementation, use different KeyCode mappings and allowing native action to be suppressed.
- Don't trust soft-kbd visibility state, but perform invisible action. If the latter was successful - soft-kbd was visible before.
- Map BACK to VK_KEYBOARD_INVISIBLE and propagate it, if soft-kbd was visible before. No native default action is performed.
- Map BACK to VK_ESCAPE event and propagate it, if soft-kbd was invisible _and_ an activity was registered via registerActivity(Activity), i.e. by NewtBaseActivity. Otherwise proceed w/ default action (-> activity.finish()).
- If the KeyListener consumed the [EVENT_KEY_RELEASED, VK_ESCAPE] event, it will be suppressed and no default action performed. This allows applications to have a custom 'ESCAPE' or 'BACK' handling. Otherwise (not consumed) the default action is performed.
NEWT/Android (Bug 665): Add Support for GLStateKeeper ; onPause() always destroys ; Recognizing all GLAutoDrawable's GLAnimatorControl for pause/resume ; Use GLAnimatorControl instead of Animator
- Add Support for GLStateKeeper If !isFinishing() (HOME button), preserve the GLEventListener if an GLStateKeeper instance
- onPause() always destroys onDestroy() is too late, i.e. surfaceDestroyed() already called
- Recognizing all GLAutoDrawable's GLAnimatorControl for pause/resume pause/resume the GLAnimatorControl of all GLAutoDrawable instances
- Use GLAnimatorControl instead of Animator We used an Animator reference .. duh!
Note: The EGL native WindowDriver (Android and BCM.IV) must retain their own copy of EGLGraphicsDevice, which preserves the EGLDisplay handle due to EGLDisplayUtil reference counting per nativeHandleID.