Procházet zdrojové kódy

Try to fix video for Huawei Mediapad 10 Android 7.0

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic před 7 roky
rodič
revize
6581d9b4d2

+ 2 - 1
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java

@@ -488,7 +488,8 @@ public class CallActivity extends AppCompatActivity {
             cameraEnumerator = new Camera2Enumerator(this);
         } else {
             cameraEnumerator = new Camera1Enumerator(!MagicWebRtcLists.HARDWARE_ACCELERATION_VENDOR_BLACKLIST.contains(Build
-                    .MANUFACTURER.toLowerCase()));
+                    .MANUFACTURER.toLowerCase()) && !MagicWebRtcLists.HARDWARE_ACCELERATION_DEVICE_BLACKLIST.contains
+                    (Build.MODEL));
         }
     }
 

+ 2 - 1
app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.java

@@ -124,7 +124,8 @@ public class NextcloudTalkApplication extends MultiDexApplication {
 
             PeerConnectionFactory.initialize(PeerConnectionFactory.InitializationOptions.builder(this)
                     .setEnableVideoHwAcceleration(!MagicWebRtcLists.HARDWARE_ACCELERATION_VENDOR_BLACKLIST.contains(Build
-                            .MANUFACTURER.toLowerCase()))
+                            .MANUFACTURER.toLowerCase()) && !MagicWebRtcLists.HARDWARE_ACCELERATION_DEVICE_BLACKLIST
+                            .contains(Build.MODEL))
                     .createInitializationOptions());
         } catch (UnsatisfiedLinkError e) {
             Log.w(TAG, e);

+ 1 - 0
app/src/main/java/com/nextcloud/talk/webrtc/MagicWebRtcLists.java

@@ -57,6 +57,7 @@ public class MagicWebRtcLists {
         add("GT-I9100"); // Samsung Galaxy S2
         add("GT-N8013"); // Samsung Galaxy Note 10.1
         add("SM-G930F"); // Samsung Galaxy S7
+        add("AGS-W09"); // Huawei MediaPad T3 10
     }};
 
     public static Set<String> HARDWARE_ACCELERATION_VENDOR_BLACKLIST = new HashSet<String>() {{