From 04376d3bc875161917dce4ebb60b6ebaf4f3a646 Mon Sep 17 00:00:00 2001 From: Catfriend1 Date: Tue, 22 Jan 2019 21:22:32 +0000 Subject: [PATCH] Fallback to http on Huawei Nova (CAN-Lxx) (fixes #262) (#263) --- .../nutomic/syncthingandroid/service/Constants.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nutomic/syncthingandroid/service/Constants.java b/app/src/main/java/com/nutomic/syncthingandroid/service/Constants.java index f49994f6..ffa127b1 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/service/Constants.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/service/Constants.java @@ -180,6 +180,16 @@ public class Constants { * to syncthing core v0.14.53+. */ public static Boolean osSupportsTLS12() { - return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP; + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { + return false; + } + + if ("huawei".equalsIgnoreCase(Build.MANUFACTURER)) { + if (com.nutomic.syncthingandroid.util.Util.containsIgnoreCase(Build.MODEL, "CAN")) { + return false; + } + } + + return true; } }