| | |
| | | import android.content.pm.PackageManager; |
| | | import android.content.res.Configuration; |
| | | import android.net.Uri; |
| | | import android.os.Build; |
| | | import android.os.Bundle; |
| | | import android.os.Process; |
| | | import android.provider.Settings; |
| | |
| | | m_MainContainer = (RelativeLayout) findViewById(R.id.main_container); |
| | | |
| | | String _brand = NotchPhoneUtil.getDeviceBrand(); |
| | | if (_brand.indexOf("vivo") >= 0) |
| | | if (_brand.toUpperCase().contains("VIVO")) |
| | | { |
| | | isNotch = NotchPhoneUtil.HasNotchVivo(MainActivity.this); |
| | | mType = 1; |
| | | } |
| | | else if (_brand.indexOf("HUAWEI") >= 0) |
| | | else if (_brand.toUpperCase().contains("HUAWEI") |
| | | || _brand.toUpperCase().contains("HONOR")) |
| | | { |
| | | isNotch = NotchPhoneUtil.HasNotchVivo(MainActivity.this); |
| | | mType = 2; |
| | | // isNotch = NotchPhoneUtil.hasNotchAtHuawei(this);; |
| | | // mType = 2; |
| | | } |
| | | else if (_brand.indexOf("OPPO") >= 0) |
| | | else if (_brand.toUpperCase().contains("OPPO")) |
| | | { |
| | | isNotch = NotchPhoneUtil.HasNotchVivo(MainActivity.this); |
| | | isNotch = NotchPhoneUtil.HasNotchOPPO(MainActivity.this); |
| | | mType = 3; |
| | | } |
| | | else if (_brand.indexOf("Xiaomi") >= 0) |
| | | else if (_brand.toUpperCase().contains("XIAOMI")) |
| | | { |
| | | isNotch = NotchPhoneUtil.HasNotchVivo(MainActivity.this); |
| | | isNotch = NotchPhoneUtil.HasNotchXiaoMi(); |
| | | mType = 4; |
| | | } |
| | | |