liuxue
2021-07-29 7e2df20ccc7cdfb528d309369460a4f3d66afdf1
Project/sp_sdk/src/main/java/com/secondworld/univeralsdk/MainActivity.java
@@ -7,6 +7,7 @@
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;
@@ -41,24 +42,25 @@
        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;
        }