Distinguish Andromeda and Android for SurfaceComposition test.

Use different surface composition performance score thresholds for
Andromeda and Android devices.

BUG=24158847
TEST=Flushed Nexus 9 device using volantis and volantis-andromeda
     images and confirmed that corresponding threshold is used
     for each image.

Change-Id: I8989741200e6584d142479acc1dea7ce8642b1d3
diff --git a/tests/SurfaceComposition/src/android/surfacecomposition/SurfaceCompositionMeasuringActivity.java b/tests/SurfaceComposition/src/android/surfacecomposition/SurfaceCompositionMeasuringActivity.java
index b4e0c70..4771b6c 100644
--- a/tests/SurfaceComposition/src/android/surfacecomposition/SurfaceCompositionMeasuringActivity.java
+++ b/tests/SurfaceComposition/src/android/surfacecomposition/SurfaceCompositionMeasuringActivity.java
@@ -24,6 +24,7 @@
 import android.app.ActivityManager;
 import android.app.ActivityManager.MemoryInfo;
 import android.content.Context;
+import android.content.pm.PackageManager;
 import android.graphics.Color;
 import android.graphics.PixelFormat;
 import android.graphics.Rect;
@@ -95,11 +96,9 @@
     private boolean mResumed;
 
     // Drop one frame per half second.
-    // TODO(khmel)
-    // Add a feature flag and set the target FPS dependent on the target system as e.g.:
-    // 59FPS for MULTI_WINDOW and 54 otherwise (to satisfy the default lax Android requirements).
     private double mRefreshRate;
     private double mTargetFPS;
+    private boolean mAndromeda;
 
     private int mWidth;
     private int mHeight;
@@ -182,6 +181,10 @@
         return score;
     }
 
+    public boolean isAndromeda() {
+        return mAndromeda;
+    }
+
     @Override
     public void onClick(View view) {
         if (view == mMeasureCompositionButton) {
@@ -247,6 +250,9 @@
 
         getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
 
+        // Detect Andromeda devices by having free-form window management feature.
+        mAndromeda = getPackageManager().hasSystemFeature(
+                PackageManager.FEATURE_FREEFORM_WINDOW_MANAGEMENT);
         detectRefreshRate();
 
         // To layouts in parent. First contains list of Surfaces and second
@@ -513,7 +519,8 @@
         }
 
         MemoryInfo memInfo = getMemoryInfo();
-        String info = "Available " +
+        String platformName = mAndromeda ? "Andromeda" : "Android";
+        String info = platformName + ": available " +
                 getReadableMemory(memInfo.availMem) + " from " +
                 getReadableMemory(memInfo.totalMem) + ".\nVisible " +
                 visibleCnt + " from " + mViews.size() + " " +