判断MIUI版本是V5还是V6

来源:互联网 发布:男士真皮手套品牌 知乎 编辑:程序博客网 时间:2024/05/16 16:09
public static String getMIUIProperty() {        String line = null;        BufferedReader reader = null;        try {            Process p = Runtime.getRuntime().exec("getprop ro.miui.ui.version.name" );            reader = new BufferedReader(new InputStreamReader(p.getInputStream()), 1024);            line = reader.readLine();            return line;        } catch (IOException e) {        e.printStackTrace();        } finally {try {reader.close();} catch (IOException e) {e.printStackTrace();}        }        return "Unknow";    }

0 0