update depreceated call
@@ -227,15 +227,16 @@ public class ImageUtils {
}
public static int getScreenOrientation(Activity activity) {
- switch (activity.getWindowManager().getDefaultDisplay().getRotation()) {
+ switch (activity.getDisplay().getRotation()) {
case Surface.ROTATION_270:
return 270;
case Surface.ROTATION_180:
return 180;
case Surface.ROTATION_90:
return 90;
+ case Surface.ROTATION_0:
default:
- return Surface.ROTATION_0;
+ return 0;
}
}
}
