Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8097854

[Android] detect surface changes and send appropriate events

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u20
    • Fix Version/s: 8u20
    • Component/s: javafx
    • Labels:

      Description

      For the dalvik port to react appropriate on surface change events, support in glass is needed.
      This is the flow:
      * Dalvik runtime detects a change in the surface. DalvikInput.java has two native method onSurfaceChanged and onSurfaceChanged(int, int, int) that are implemented in dalvikInput.c
      * the implementations in dalvikInput.c will call glass_application_notifyScreenSettingsChanged, and will call lens_wm_repaint_all in order to repaint all windows.
      * glass_application_notifyScreenSettingsChanged(JNIEnv *env) is added to LensCommon.h and implemented in LensApplication.c
      * the glass_application_notifyScreenSettingsChanged implementation in LensApplication.c will call the new notifyScreenSettingsChanged method on LensApplication.java
      * notifyScreenSettingsChanged method on LensApplication.java will create a new LensScreenEvent which, when dispatched, will call Screen.notifySettingsChanged
      * the Screen.notifySettingsChanged already existed as a private method and is now public.

      * lens_wm_repaint_all has been added to LensWindowManager, sending ViewEvent.REPAINT to all windows

      The provided patch does not include the changes in DalvikInput. It only contains the suggested changes in Glass.

        Attachments

          Activity

            People

            Assignee:
            ddhill David Hill (Inactive)
            Reporter:
            jvos Johan Vos
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: