From ad378141742c5ac4e2e613d2726e8d0118a54ff1 Mon Sep 17 00:00:00 2001 From: client_Hale <339726288@qq.com> Date: 星期三, 12 九月 2018 10:01:32 +0800 Subject: [PATCH] fixed android刘海屏判断逻辑修改 --- Project/app/src/main/java/com/secondworld/univeralsdk/MainActivity.java | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Project/app/src/main/java/com/secondworld/univeralsdk/MainActivity.java b/Project/app/src/main/java/com/secondworld/univeralsdk/MainActivity.java index 1e0d5fc..aed6f2c 100644 --- a/Project/app/src/main/java/com/secondworld/univeralsdk/MainActivity.java +++ b/Project/app/src/main/java/com/secondworld/univeralsdk/MainActivity.java @@ -41,22 +41,22 @@ m_MainContainer = (RelativeLayout) findViewById(R.id.main_container); String _brand = NotchPhoneUtil.getDeviceBrand(); - if (_brand.indexOf("vivo") > 0) + if (_brand.indexOf("vivo") >= 0) { isNotch = NotchPhoneUtil.HasNotchVivo(MainActivity.this); mType = 1; } - else if (_brand.indexOf("HUAWEI") > 0) + else if (_brand.indexOf("HUAWEI") >= 0) { isNotch = NotchPhoneUtil.HasNotchVivo(MainActivity.this); mType = 2; } - else if (_brand.indexOf("OPPO") > 0) + else if (_brand.indexOf("OPPO") >= 0) { isNotch = NotchPhoneUtil.HasNotchVivo(MainActivity.this); mType = 3; } - else if (_brand.indexOf("Xiaomi") > 0) + else if (_brand.indexOf("Xiaomi") >= 0) { isNotch = NotchPhoneUtil.HasNotchVivo(MainActivity.this); mType = 4; -- Gitblit v1.8.0