Obtenha a resolução de tela real no Ice Cream Sandwich

s dispositivos @ Ice Cream Sandwich podem usar teclas programáveis na tela, e isso significa que parte da tela é ocupada por essas teclas. Preciso obter a resolução real da tela, e não a resolução menos o espaço ocupado pelas teclas programávei

Eu tentei o seguinte, mas nem funciona:

Display display = getWindowManager().getDefaultDisplay(); 
int width = display.getWidth();
int height = display.getHeight();
Log.d("SCREEN RES", "Width: " + width + ". Height: " + height);

DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
height = metrics.heightPixels;
width = metrics.widthPixels;
Log.d("SCREEN RES", "Width: " + width + ". Height: " + height);

Aqui está a saída:

12-19 20:18:42.012: D/SCREEN RES(20752): Width: 1196. Height: 720
12-19 20:18:42.012: D/SCREEN RES(20752): Width: 1196. Height: 720

A resolução real da tela é de 1280 x 720 pixels, não de 1196 x 720 pixel

Alguma ideia

Edita

Estou usando o seguinte código para tornar o aplicativo em tela cheia:

getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);

questionAnswers(2)

yourAnswerToTheQuestion