package com.beanpodtech.allinone.utils;

import android.app.Activity;
import android.os.Build;
import android.view.View;

import com.beanpodtech.allinone.application.EduApplication;

public class BoxUtil {

    private static final String TAG = "BoxUtil";

    public static String getDeviceSN() {
////        return "qazxswedcvfrtgbnhyujm";
//        String serialNumber = Build.SERIAL;
//        String substring = "";
//        if (serialNumber.length() > 17) {
//            substring = serialNumber.substring(0, 17);
//        } else {
//            substring = serialNumber;
//        }
////        ToastUtils.show(EduApplication.getContext(), "SN=" + substring);
////        Log.d(TAG, "SN is " + serialNumber.trim());
////        return "04:82:00:50:9c:22";
////        return "CSH61630502205";
//        return substring;
        return EduApplication.getInstance().uuid;
    }
    public static void hideBottomUIMenu(Activity activity) {
        //隐藏虚拟按键，并且全屏
        if (Build.VERSION.SDK_INT > 11 && Build.VERSION.SDK_INT < 19) { // lower api
            View v = activity.getWindow().getDecorView();
            v.setSystemUiVisibility(View.GONE);
        } else if (Build.VERSION.SDK_INT >= 19) {
            //for new api versions.
            View decorView = activity.getWindow().getDecorView();
            int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                    | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_FULLSCREEN;
            decorView.setSystemUiVisibility(uiOptions);

        }
    }
}
