try getContext()

This commit is contained in:
sonora 2015-01-06 02:17:21 +01:00
parent 6c20fd5bdf
commit 8a37d68ee6

View file

@ -185,8 +185,7 @@ public class DashFavoritesFragment extends DashBaseFragment {
//Hardy: getRotation() is the correction if device's screen orientation != the default display's standard orientation
//TODO: getOrientation() needs to be used for API<8, deprecated after that
//int screenOrientation = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation();
int screenRotation;
int screenOrientation = ((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation();
switch (screenOrientation)
{
case ORIENTATION_0: // Portrait