Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

当权限拒绝,不再提示时,一直会弹ActionActivity #18

Open
yeqinfu opened this issue May 17, 2019 · 1 comment
Open

当权限拒绝,不再提示时,一直会弹ActionActivity #18

yeqinfu opened this issue May 17, 2019 · 1 comment

Comments

@yeqinfu
Copy link

yeqinfu commented May 17, 2019

`
List deniedPermissions = null;
if ((deniedPermissions = SuperWebX5Utils.getDeniedPermissions(mActivity, SuperWebX5Permissions.LOCATION)).isEmpty()) {
callback.invoke(origin, true, false);
} else {

        ActionActivity.Action mAction = ActionActivity.Action.createPermissionsAction(deniedPermissions.toArray(new String[]{}));
        mAction.setFromIntention(FROM_CODE_INTENTION_LOCATION);
        ActionActivity.setPermissionListener(mPermissionListener);
        this.mCallback = callback;
        this.origin = origin;
        ActionActivity.start(mActivity, mAction);
    }

`
此段代码有问题,比如我们在外面拒绝了定位权限,然后进百度。此段代码第一个if得到拒绝的权限不为空。走else。然后就去启动actionactivity了。不是应该拒绝了,就不要弹出吗?

然后demo中的权限拦截器没有作用。发现虽然设置到CommonBuilderForFragment这个builder中了,但是再也没有取出来过。等于白设置。

` ``` mSuperWebX5 = SuperWebX5.with(this)
.setSuperWebParent((LinearLayout) view, new LinearLayout.LayoutParams(-1, -1))
.setCustomIndicator(getIndicatorView())
.setWebLayout(getWebLayout())
.setWebSettings(getSettings())
.setWebViewClient(mWebViewClient)
.setWebChromeClient(mWebChromeClient)
.setReceivedTitleCallback(mCallback)
.setPermissionInterceptor(mPermissionInterceptor)
.setNotifyIcon(R.mipmap.download)
.useMiddleWareWebChrome(getMiddleWareWebChrome())
.useMiddleWareWebClient(getMiddleWareWebClient())
.setOpenOtherPageWays(DefaultWebClient.OpenOtherPageWays.ASK)
.interceptUnkownScheme()
.openParallelDownload()
.setSecurityType(SuperWebX5.SecurityType.strict)
.addDownLoadResultListener(mDownLoadResultListener)
.createSuperWeb()
.ready()
.go(getUrl());
PermissionInterceptor it=mSuperWebX5.getPermissionInterceptor();

我在后面加了一句,去取这个拦截器,发现拦截器根本就是null。不起作用
@yeqinfu
Copy link
Author

yeqinfu commented May 17, 2019

demo中也会出现不断弹出actionactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant