1. java 中 使用 getprop的例子, 之前查过几篇文章, 发现真的是 罗里吧嗦, 废话一堆, 连个完整的例子都没有, 嘛玩意
private String getXXXYYY() {
String type = null;
try {
Process process = Runtime.getRuntime().exec("getprop ro.xxx.yyy");
if (process != null) {
InputStreamReader ir = new InputStreamReader(process.getInputStream());
if (ir != null) {
BufferedReader input = new BufferedReader(ir);
if (input != null) {
type = input.readLine();
}
}
}
} catch (IOException e) {
e.printStackTrace();
}
Slog.d(TAG, "getXXXYYY" + type);
return input.readLine();
}