[Android] Simplify call for getting the WindowManager instance within EmulationActivity.

This commit is contained in:
Lioncash 2013-10-02 21:59:09 -04:00
parent cb3afe8f70
commit c517b7fe7e

View file

@ -45,7 +45,7 @@ public final class EmulationActivity extends Activity
// Retrieve screen dimensions.
DisplayMetrics displayMetrics = new DisplayMetrics();
WindowManager wm = (WindowManager) getApplicationContext().getSystemService(Context.WINDOW_SERVICE); // the results will be higher than using the activity context object or the getWindowManager() shortcut
WindowManager wm = getWindowManager();
wm.getDefaultDisplay().getMetrics(displayMetrics);
this.screenHeight = displayMetrics.heightPixels;
this.screenWidth = displayMetrics.widthPixels;