ParkSangGwon / TedPermission

Easy check permission library for Android Marshmallow
1.74k stars 240 forks source link

#63 fix orientation issue in sdk 26 #74

Closed JSpiner closed 6 years ago

JSpiner commented 6 years ago

related with #63

Since android 'O'(26), we should satisfy following condition.

if (ActivityInfo.isFixedOrientation(requestedOrientation) && !fullscreen
                 && appInfo.targetSdkVersion >= O) {
             throw new IllegalStateException("Only fullscreen activities can request orientation");
         }

(detail info is here )

We don't know which direction the application using this library will use. So we should support all direction. And it should be able to change when the user needs it.

So, I changed TedPermissionActivity's screen orientation to unspecified. And create setScreenOrientation method at PermissionBuilder

thanks to @andreas-

ParkSangGwon commented 6 years ago

LGTM