Bug 1362918 - Extend the blacklist to cover certain Galaxy S4 models. r=jolin a=lizzard
authorJames Cheng <jacheng@mozilla.com>
Mon, 08 May 2017 11:56:56 +0800
changeset 393987 0884adb687d1b4cf95820feae19939d931053ae7
parent 393986 779f28c6c7d5e7b4e9a49f902b4ae60294bc532d
child 393988 a3bc13b60d416ad4a0dd42820ede5c0d69c288a0
push id7321
push usercbook@mozilla.com
push dateThu, 18 May 2017 06:45:08 +0000
treeherdermozilla-beta@0884adb687d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjolin, lizzard
bugs1362918
milestone54.0
Bug 1362918 - Extend the blacklist to cover certain Galaxy S4 models. r=jolin a=lizzard MozReview-Commit-ID: WZFON3SBvU
mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareCodecCapabilityUtils.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareCodecCapabilityUtils.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareCodecCapabilityUtils.java
@@ -36,18 +36,22 @@ public final class HardwareCodecCapabili
   private static final int[] supportedColorList = {
     CodecCapabilities.COLOR_FormatYUV420Planar,
     CodecCapabilities.COLOR_FormatYUV420SemiPlanar,
     CodecCapabilities.COLOR_QCOM_FormatYUV420SemiPlanar,
     COLOR_QCOM_FORMATYUV420PackedSemiPlanar32m
   };
   private static final String[] adaptivePlaybackBlacklist =
   {
-    "GT-I9300", // S3 (I9300 / I9300I)
-    "SCH-I535"  // S3
+    "GT-I9300",         // S3 (I9300 / I9300I)
+    "SCH-I535",         // S3
+    "SGH-M919",         // S4
+    "GT-I9505",         // S4
+    "SGH-I337",         // S4
+    "SAMSUNG-SGH-I337"  // S4
   };
 
   @WrapForJNI
   public static boolean findDecoderCodecInfoForMimeType(String aMimeType) {
     int numCodecs = 0;
     try {
       numCodecs = MediaCodecList.getCodecCount();
     } catch (final RuntimeException e) {
@@ -87,24 +91,21 @@ public final class HardwareCodecCapabili
       Log.e(LOGTAG, "Retrieve codec information failed", e);
     }
     return false;
   }
 
   // See Bug1360626 and
   // https://codereview.chromium.org/1869103002 for details.
   private static boolean isAdaptivePlaybackBlacklisted(String aMimeType) {
+    Log.d(LOGTAG, "The device ModelID is " + Build.MODEL);
     if (!aMimeType.equals("video/avc") && !aMimeType.equals("video/avc1")) {
       return false;
     }
 
-    if (!Build.VERSION.RELEASE.equals("4.4.2")) {
-      return false;
-    }
-
     if (!Build.MANUFACTURER.toLowerCase(Locale.getDefault()).equals("samsung")) {
       return false;
     }
 
     for (String model : adaptivePlaybackBlacklist) {
       if (Build.MODEL.startsWith(model)) {
         return true;
       }