浏览代码

Android BUG try to fix

/main
xingwei.zhu 6 年前
当前提交
28979f02
共有 1 个文件被更改,包括 19 次插入1 次删除
  1. 20
      Runtime/Plugins/platform/android/view/UIWidgetsViewController.java

20
Runtime/Plugins/platform/android/view/UIWidgetsViewController.java


import java.util.Arrays;
import android.view.WindowManager;
import android.os.Handler;
import java.lang.reflect.Method;
public class UIWidgetsViewController {

}
private boolean hasNavigationBar() {
boolean hasBar = false;
return id > 0 && resources.getBoolean(id);
if (id > 0) {
hasBar = resources.getBoolean(id);
}
try {
Class systemPropertiesClass = Class.forName("android.os.SystemProperties");
Method m = systemPropertiesClass.getMethod("get", String.class);
String navBarOverride = (String) m.invoke(systemPropertiesClass, "qemu.hw.mainkeys");
if ("1".equals(navBarOverride)) {
hasBar = false;
} else if ("0".equals(navBarOverride)) {
hasBar = true;
}
} catch (Exception e) {
e.printStackTrace();
}
return hasBar;
}
public void updateViewMetrics() {

正在加载...
取消
保存