yanzhenjie / AndPermission

:strawberry: Permissions manager for Android platform.
https://yanzhenjie.com/AndPermission
Apache License 2.0
6.63k stars 1.1k forks source link

部分手机无法调用或调用很慢很慢调用onGranted和onDenied问题 #545

Open W1913 opened 5 years ago

W1913 commented 5 years ago

使用 AndPermission.with(this) .runtime() .permission(Permission.READ_PHONE_STATE) .onGranted(permissions -> { weakHandler.postDelayed(new Runnable() {

            })
            .onDenied(permissions -> {
                TrackLog.INSTANCE.sendClick(TrackLog.Pagers.PAGE_SPLASH,TrackLog.Pagers.SplashPage.rejected_per,0,0);

                weakHandler.postDelayed(new Runnable() {
                    @Override
                    public void run() {

                    }
                },skipTime);

            })
            .start();

无法调用或调用很慢很慢调用onGranted和onDenied问题

使用如下 AndPermission.with(this) .runtime() .permission(Manifest.permission.READ_PHONE_STATE) .onGranted(new Action<List>() { @Override public void onAction(List data) { } }) .onDenied(new Action<List>() { @Override public void onAction(List data) { weakHandler.postDelayed(new Runnable() { @Override public void run() {

                        }
                    },skipTime);
                }
            })
            .start();

正常

W1913 commented 5 years ago

当我没说 又测试了一下 发现两个都不跳