@@ -570,7 +570,7 @@ protected void onStart() {
570570 public static int getNaturalOrientation () {
571571 int result = SDL_ORIENTATION_UNKNOWN ;
572572
573- Activity activity = ( Activity ) getContext ();
573+ Activity activity = getContext ();
574574 if (activity != null ) {
575575 Configuration config = activity .getResources ().getConfiguration ();
576576 Display display = activity .getWindowManager ().getDefaultDisplay ();
@@ -590,7 +590,7 @@ public static int getNaturalOrientation() {
590590 public static int getCurrentRotation () {
591591 int result = 0 ;
592592
593- Activity activity = ( Activity ) getContext ();
593+ Activity activity = getContext ();
594594 if (activity != null ) {
595595 Display display = activity .getWindowManager ().getDefaultDisplay ();
596596 switch (display .getRotation ()) {
@@ -1292,7 +1292,7 @@ public static boolean isVRHeadset() {
12921292 public static double getDiagonal ()
12931293 {
12941294 DisplayMetrics metrics = new DisplayMetrics ();
1295- Activity activity = ( Activity ) getContext ();
1295+ Activity activity = getContext ();
12961296 if (activity == null ) {
12971297 return 0.0 ;
12981298 }
@@ -1940,7 +1940,7 @@ public static void requestPermission(String permission, int requestCode) {
19401940 return ;
19411941 }
19421942
1943- Activity activity = ( Activity ) getContext ();
1943+ Activity activity = getContext ();
19441944 if (activity .checkSelfPermission (permission ) != PackageManager .PERMISSION_GRANTED ) {
19451945 activity .requestPermissions (new String []{permission }, requestCode );
19461946 } else {
0 commit comments