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

[Android] arm detection on Android fails in Ensemble

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • 8u20
    • None
    • javafx
    • None

      On Android, the Ensemble application does not behave embedded. This is because the detection on embedded or not checks if the os.arch System Property equals "arm". In the Android case, the os.arch is "arm...." If the detection is changed to use startsWith rather than equals, it works. I noticed something similar is done for mac as well already.
      A patch for apps/samples/Ensemble8/src/app/java/ensemble/EnsembleApp.java is simple:
      < public static final boolean IS_EMBEDDED = "arm".equals(OS_ARCH) && !IS_IOS;
      ---
      > public static final boolean IS_EMBEDDED = OS_ARCH.startsWith("arm") && !IS_IOS;

      Also, a patch for apps/samples/Ensemble8/src/app/java/ensemble/PlatformFeatures.java is required:
      < private static final boolean ARM = arch.equals("arm");
      ---
      > private static final boolean ARM = arch.startsWith("arm");

      (thanks to Stefan Fuchs)

            mrkam Alexander Kuznetcov (Inactive)
            jvos Johan Vos
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: