googlesamples / easypermissions

Simplify Android M system permissions
https://firebaseopensource.com/projects/googlesamples/easypermissions/
Apache License 2.0
9.87k stars 1.46k forks source link

Is it bug? #231

Closed AnMokoto closed 6 years ago

AnMokoto commented 6 years ago

Basic Information

Device type: _vivo x20___ OS version: _7.1.1___ EasyPermissions version: _1.2.0___

Describe the problem

What happened? What did you expect to happen?

Code and logs

// TODO(you): show the code that produces the problem,
//            and any relevant logs.

qq 20180727151318

support version 27.1.1 as verson: 3.1.2

@samtstern i need u help.

samtstern commented 6 years ago

@AnMokoto there's not enough information here to debug, you haven't shown the full stack trace or the code that causes the issue.

AnMokoto commented 6 years ago

@samtstern thx for u reply

that's my code below:


public abstract class BasePermissionActivity extends RxAppCompatActivity implements EasyPermissions.PermissionCallbacks {

    private static final int BASE_PERMISSION = 0x1001;

    private static final String[] PERMISSION = {
            Manifest.permission.WRITE_EXTERNAL_STORAGE,
            Manifest.permission.READ_EXTERNAL_STORAGE,
            Manifest.permission.CAMERA,
            Manifest.permission.VIBRATE,
            Manifest.permission.WAKE_LOCK,
            Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS,
    };

    @Override
    protected void onStart() {
        super.onStart();
        onRequestPermission();
    }

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
                                           @NonNull int[] grantResults) {
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
        EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this); 
// throw a exception
    }

    @AfterPermissionGranted(BASE_PERMISSION)
    public void onRequestPermission() {
        if (!EasyPermissions.hasPermissions(this, PERMISSION)) {
// Even though allows all of permission, repeat always into.
            EasyPermissions.requestPermissions(this, getString(R.string.app_permission), BASE_PERMISSION,
                    PERMISSION);
        }
    }

    @Override
    public void onPermissionsGranted(int requestCode, @NonNull List<String> perms) {

    }

    @Override
    public void onPermissionsDenied(int requestCode, @NonNull List<String> perms) {
        if (!EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
            new AppSettingsDialog.Builder(this).build().show();
        }
    }
}

Not of all have reported this error. The log shows that only this Chinese-produced such as vivo reported this error.I think of the wrong that Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS even though it's not a native ROM.

there are all of my logs below:


sions.requestPermissions(EasyPermissions.java:115)
--
107-28 22:10:38.049 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermission(BasePermissionActivity.java:56)
207-28 22:10:38.049 27893 27893 E EasyPermissions: at java.lang.reflect.Method.invoke(Native Method)
307-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.runAnnotatedMethods(EasyPermissions.java:429)
407-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.onRequestPermissionsResult(EasyPermissions.java:285)
507-28 22:10:38.049 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermissionsResult(BasePermissionActivity.java:50)
607-28 22:10:38.049 27893 27893 E EasyPermissions: at android.app.Activity.requestPermissions(Activity.java:4305)
707-28 22:10:38.049 27893 27893 E EasyPermissions: at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:507)
807-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.AppCompatActivityPermissionHelper.directRequestPermissions(AppCompatActivityPermissionHelper.java:25)
907-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.PermissionHelper.requestPermissions(PermissionHelper.java:78)
1007-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:227)
1107-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:115)
1207-28 22:10:38.049 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermission(BasePermissionActivity.java:56)
1307-28 22:10:38.049 27893 27893 E EasyPermissions: at java.lang.reflect.Method.invoke(Native Method)
1407-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.runAnnotatedMethods(EasyPermissions.java:429)
1507-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.onRequestPermissionsResult(EasyPermissions.java:285)
1607-28 22:10:38.049 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermissionsResult(BasePermissionActivity.java:50)
1707-28 22:10:38.049 27893 27893 E EasyPermissions: at android.app.Activity.requestPermissions(Activity.java:4305)
1807-28 22:10:38.049 27893 27893 E EasyPermissions: at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:507)
1907-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.AppCompatActivityPermissionHelper.directRequestPermissions(AppCompatActivityPermissionHelper.java:25)
2007-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.PermissionHelper.requestPermissions(PermissionHelper.java:78)
2107-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:227)
2207-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:115)
2307-28 22:10:38.049 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermission(BasePermissionActivity.java:56)
2407-28 22:10:38.049 27893 27893 E EasyPermissions: at java.lang.reflect.Method.invoke(Native Method)
2507-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.runAnnotatedMethods(EasyPermissions.java:429)
2607-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.onRequestPermissionsResult(EasyPermissions.java:285)
2707-28 22:10:38.049 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermissionsResult(BasePermissionActivity.java:50)
2807-28 22:10:38.049 27893 27893 E EasyPermissions: at android.app.Activity.requestPermissions(Activity.java:4305)
2907-28 22:10:38.049 27893 27893 E EasyPermissions: at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:507)
3007-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.AppCompatActivityPermissionHelper.directRequestPermissions(AppCompatActivityPermissionHelper.java:25)
3107-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.PermissionHelper.requestPermissions(PermissionHelper.java:78)
3207-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:227)
3307-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:115)
3407-28 22:10:38.049 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermission(BasePermissionActivity.java:56)
3507-28 22:10:38.049 27893 27893 E EasyPermissions: at java.lang.reflect.Method.invoke(Native Method)
3607-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.runAnnotatedMethods(EasyPermissions.java:429)
3707-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.onRequestPermissionsResult(EasyPermissions.java:285)
3807-28 22:10:38.049 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermissionsResult(BasePermissionActivity.java:50)
3907-28 22:10:38.049 27893 27893 E EasyPermissions: at android.app.Activity.requestPermissions(Activity.java:4305)
4007-28 22:10:38.049 27893 27893 E EasyPermissions: at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:507)
4107-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.AppCompatActivityPermissionHelper.directRequestPermissions(AppCompatActivityPermissionHelper.java:25)
4207-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.PermissionHelper.requestPermissions(PermissionHelper.java:78)
4307-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:227)
4407-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:115)
4507-28 22:10:38.049 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermission(BasePermissionActivity.java:56)
4607-28 22:10:38.049 27893 27893 E EasyPermissions: at java.lang.reflect.Method.invoke(Native Method)
4707-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.runAnnotatedMethods(EasyPermissions.java:429)
4807-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.onRequestPermissionsResult(EasyPermissions.java:285)
4907-28 22:10:38.049 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermissionsResult(BasePermissionActivity.java:50)
5007-28 22:10:38.049 27893 27893 E EasyPermissions: at android.app.Activity.requestPermissions(Activity.java:4305)
5107-28 22:10:38.049 27893 27893 E EasyPermissions: at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:507)
5207-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.AppCompatActivityPermissionHelper.directRequestPermissions(AppCompatActivityPermissionHelper.java:25)
5307-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.PermissionHelper.requestPermissions(PermissionHelper.java:78)
5407-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:227)
5507-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:115)
5607-28 22:10:38.049 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermission(BasePermissionActivity.java:56)
5707-28 22:10:38.049 27893 27893 E EasyPermissions: at java.lang.reflect.Method.invoke(Native Method)
5807-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.runAnnotatedMethods(EasyPermissions.java:429)
5907-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.onRequestPermissionsResult(EasyPermissions.java:285)
6007-28 22:10:38.049 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermissionsResult(BasePermissionActivity.java:50)
6107-28 22:10:38.049 27893 27893 E EasyPermissions: at android.app.Activity.requestPermissions(Activity.java:4305)
6207-28 22:10:38.049 27893 27893 E EasyPermissions: at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:507)
6307-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.AppCompatActivityPermissionHelper.directRequestPermissions(AppCompatActivityPermissionHelper.java:25)
6407-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.PermissionHelper.requestPermissions(PermissionHelper.java:78)
6507-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:227)
6607-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:115)
6707-28 22:10:38.049 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermission(BasePermissionActivity.java:56)
6807-28 22:10:38.049 27893 27893 E EasyPermissions: at java.lang.reflect.Method.invoke(Native Method)
6907-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.runAnnotatedMethods(EasyPermissions.java:429)
7007-28 22:10:38.049 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.onRequestPermissionsResult(EasyPermissions.java:285)
7107-28 22:10:38.049 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermissionsResult(BasePermissionActivity.java:50)
7207-28 22:10:38.049 27893 27893 E EasyPermissions: at android.app.Activity.requestPermissions(Activity.java:4305)
7307-28 22:10:38.049 27893 27893 E EasyPermissions: at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:507)
7407-28 22:10:38.067 27893 27904 I art : Background sticky concurrent mark sweep GC freed 186823(22MB) AllocSpace objects, 0(0B) LOS objects, 26% free, 43MB/59MB, paused 22.762ms total 103.658ms
7507-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.AppCompatActivityPermissionHelper.directRequestPermissions(AppCompatActivityPermissionHelper.java:25)
7607-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.PermissionHelper.requestPermissions(PermissionHelper.java:78)
7707-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:227)
7807-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:115)
7907-28 22:10:38.114 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermission(BasePermissionActivity.java:56)
8007-28 22:10:38.114 27893 27893 E EasyPermissions: at java.lang.reflect.Method.invoke(Native Method)
8107-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.runAnnotatedMethods(EasyPermissions.java:429)
8207-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.onRequestPermissionsResult(EasyPermissions.java:285)
8307-28 22:10:38.114 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermissionsResult(BasePermissionActivity.java:50)
8407-28 22:10:38.114 27893 27893 E EasyPermissions: at android.app.Activity.requestPermissions(Activity.java:4305)
8507-28 22:10:38.114 27893 27893 E EasyPermissions: at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:507)
8607-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.AppCompatActivityPermissionHelper.directRequestPermissions(AppCompatActivityPermissionHelper.java:25)
8707-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.PermissionHelper.requestPermissions(PermissionHelper.java:78)
8807-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:227)
8907-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:115)
9007-28 22:10:38.114 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermission(BasePermissionActivity.java:56)
9107-28 22:10:38.114 27893 27893 E EasyPermissions: at java.lang.reflect.Method.invoke(Native Method)
9207-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.runAnnotatedMethods(EasyPermissions.java:429)
9307-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.onRequestPermissionsResult(EasyPermissions.java:285)
9407-28 22:10:38.114 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermissionsResult(BasePermissionActivity.java:50)
9507-28 22:10:38.114 27893 27893 E EasyPermissions: at android.app.Activity.requestPermissions(Activity.java:4305)
9607-28 22:10:38.114 27893 27893 E EasyPermissions: at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:507)
9707-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.AppCompatActivityPermissionHelper.directRequestPermissions(AppCompatActivityPermissionHelper.java:25)
9807-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.PermissionHelper.requestPermissions(PermissionHelper.java:78)
9907-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:227)
10007-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:115)
10107-28 22:10:38.114 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermission(BasePermissionActivity.java:56)
10207-28 22:10:38.114 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onStart(BasePermissionActivity.java:43)
10307-28 22:10:38.114 27893 27893 E EasyPermissions: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1255)
10407-28 22:10:38.114 27893 27893 E EasyPermissions: at android.app.Activity.performStart(Activity.java:6894)
10507-28 22:10:38.114 27893 27893 E EasyPermissions: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2708)
10607-28 22:10:38.114 27893 27893 E EasyPermissions: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2806)
10707-28 22:10:38.114 27893 27893 E EasyPermissions: at android.app.ActivityThread.-wrap12(ActivityThread.java)
10807-28 22:10:38.114 27893 27893 E EasyPermissions: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1528)
10907-28 22:10:38.114 27893 27893 E EasyPermissions: at android.os.Handler.dispatchMessage(Handler.java:102)
11007-28 22:10:38.114 27893 27893 E EasyPermissions: at android.os.Looper.loop(Looper.java:181)
11107-28 22:10:38.114 27893 27893 E EasyPermissions: at android.app.ActivityThread.main(ActivityThread.java:6274)
11207-28 22:10:38.114 27893 27893 E EasyPermissions: at java.lang.reflect.Method.invoke(Native Method)
11307-28 22:10:38.114 27893 27893 E EasyPermissions: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900)
11407-28 22:10:38.114 27893 27893 E EasyPermissions: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:790)
11507-28 22:10:38.114 27893 27893 E EasyPermissions: Caused by: java.lang.StackOverflowError: stack size 8MB
11607-28 22:10:38.114 27893 27893 E EasyPermissions: at java.lang.reflect.Constructor.newInstance0(Native Method)
11707-28 22:10:38.114 27893 27893 E EasyPermissions: at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
11807-28 22:10:38.114 27893 27893 E EasyPermissions: at java.lang.reflect.Proxy.newInstance(Proxy.java:756)
11907-28 22:10:38.114 27893 27893 E EasyPermissions: at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:748)
12007-28 22:10:38.114 27893 27893 E EasyPermissions: at libcore.reflect.AnnotationFactory.createAnnotation(AnnotationFactory.java:95)
12107-28 22:10:38.114 27893 27893 E EasyPermissions: at java.lang.reflect.Method.getAnnotationNative(Native Method)
12207-28 22:10:38.114 27893 27893 E EasyPermissions: at java.lang.reflect.Method.getAnnotation(Method.java:557)
12307-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.runAnnotatedMethods(EasyPermissions.java:414)
12407-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.onRequestPermissionsResult(EasyPermissions.java:285)
12507-28 22:10:38.114 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermissionsResult(BasePermissionActivity.java:50)
12607-28 22:10:38.114 27893 27893 E EasyPermissions: at android.app.Activity.requestPermissions(Activity.java:4305)
12707-28 22:10:38.114 27893 27893 E EasyPermissions: at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:507)
12807-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.AppCompatActivityPermissionHelper.directRequestPermissions(AppCompatActivityPermissionHelper.java:25)
12907-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.helper.PermissionHelper.requestPermissions(PermissionHelper.java:78)
13007-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:227)
13107-28 22:10:38.114 27893 27893 E EasyPermissions: at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:115)
13207-28 22:10:38.114 27893 27893 E EasyPermissions: at com.main.core.base.rx.BasePermissionActivity.onRequestPermission(BasePermissionActivity.java:56)
13307-28 22:10:38.114 27893 27893 E EasyPermissions: ... 28701 more
13407-28 22:10:38.598 27893 27904 I art : Background sticky concurrent mark sweep GC freed 438630(15MB) AllocSpace objects, 0(0B) LOS objects, 21% free, 46MB/59MB, paused 23.098ms total 109.011ms
13507-28 22:10:38.879 27893 27904 I art : Background sticky concurrent mark sweep GC freed 485167(14MB) AllocSpace objects, 0(0B) LOS objects, 21% free, 46MB/59MB, paused 18.031ms total 90.703ms
13607-28 22:10:39.170 27893 27904 I art : Background sticky concurrent mark sweep GC freed 493947(14MB) AllocSpace objects, 0(0B) LOS objects, 21% free, 47MB/59MB, paused 14.494ms total 92.968ms
13707-28 22:10:39.427 27893 27904 I art : Background sticky concurrent mark sweep GC freed 482866(14MB) AllocSpace objects, 0(0B) LOS objects, 21% free, 46MB/59MB, paused 11.362ms total 66.214ms
13807-28 22:10:39.686 27893 27904 I art : Background sticky concurrent mark sweep GC freed 485639(14MB) AllocSpace objects, 0(0B) LOS objects, 21% free, 46MB/59MB, paused 9.646ms total 64.149ms
13907-28 22:10:39.926 27893 27904 I art : Background sticky concurrent mark sweep GC freed 484796(14MB) AllocSpace objects, 0(0B) LOS objects, 21% free, 46MB/59MB, paused 7.043ms total 51.545ms
14007-28 22:10:40.177 27893 27904 I art : Background sticky concurrent mark sweep GC freed 487253(14MB) AllocSpace objects, 0(0B) LOS objects, 21% free, 46MB/59MB, paused 5.376ms total 52.796ms
14107-28 22:10:40.782 27893 27893 D Activity: Contains:false

11507-28 22:10:38.114 27893 27893 E EasyPermissions: Caused by: java.lang.StackOverflowError: stack size 8MB

samtstern commented 6 years ago

@AnMokoto ok it looks like it's getting into an infinite loop. hasPermissions is returning false but then requestPermissions is coming back successful immediately. This calls the annotated method which gets back into the loop.

I assume this only reproduces on certain devices?

AnMokoto commented 6 years ago

@samtstern Yeap,it was successfully on the other devices. I did not known it was makes a fault that the producers does what. Cause the systems were not an Android Native Rom and framework.😢

samtstern commented 6 years ago

@AnMokoto I understand. Unfortunately with device-specific things like this there is nothing we can do in EasyPermissions. The error is at a lower level.

You will need to use the Android system permissions API yourself and track when you get a successful result to avoid getting into a loop, as I think hasPermissions is going to lie to you :-/