want for a CronetEngine.Builder method to disable java fallback |
|||||
Issue descriptionThere is demand for a CronetEngine.Builder method to ensure the returned CronetEngine is not JavaCronetEngine.
,
Jun 13 2016
,
Sep 6 2016
,
Sep 6 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 6 2017
I think the CronetProvider API offers a superset of the features that this feature requires.
,
Sep 6 2017
AFAICT the CronetProvider API is a global and I'd rather not disable the Java fallback for every in-app usage of Cronet. What we've resorted to in the meantime is checking the version string of the returned CronetEngine for startsWith("CronetHttpURLConnection/") which is brittle but has worked so far. I'd still prefer to have something official like Builder.disableJavaFallback() which seems far less likely for an accidental mismatch to happen going forward.
,
Sep 7 2017
I think you're misunderstanding the CronetProvider API. CronetProvider doesn't have any static settings that affect all usage of Cronet. You can use CronetProvider.getAllProviders() to get all the CronetProviders available, and pick the one you want (e.g. native only, or Java only) based on the name.
,
Sep 7 2017
Cool using a single CronetProvider to build an engine directly SGTM. There doesn't seem to be a way to create ExperimentalCronetEngine.Builder instances though. I guess I'll have to open another feature request for that. Thanks for your help!
,
Sep 8 2017
Every instance of CronetEngine.Builder can be cast to an ExperimentalCronetEngine.Builder. ExperimentalCronetEngine's class comment describes this, though perhaps we should replicate that comment on its Builder class too. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by mef@chromium.org
, Apr 26 2016