Changed method getScreenSize to return dimension array