Following method worked for me and tested in many devices.
public boolean hasNavBar (Resources resources)
{
int id = resources.getIdentifier("config_showNavigationBar", "bool", "android");
return id > 0 && resources.getBoolean(id);
}
Note: Verified this method in real device
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…