cordova-android
cordova-android copied to clipboard
Deprecate BuildHelper & PermissionHelper to be removed someday in the future?
From https://issues.apache.org/jira/browse/CB-12730 it looks like these classes were added to support cordova-plugin-compat, which is now a deprecated plugin.
My impression is that the functionality in BuildHelper & PermissionHelper classes could have been implemented in the plugins instead.
ping @macdonst because I think he was involved in the discussions around the cordova-plugin-compat and PermissionHelper stuff.
I seem to recall that they were necessary to support older Android versions where those APIs didn't exist
Thanks @dpogue. I spotted a couple things in PermissionHelper.java
:
From the class description:
* This class provides reflective methods for permission requesting and checking so that plugins * written for cordova-android 5.0.0+ can still compile with earlier cordova-android versions.
I think there should be no more need for plugins to support running on cordova-android pre-5.0.0.
The class also has a private static deliverPermissionResult
that is not called anywhere.
BuildHelper.java
seems to just get a field from a BuildConfig class:
https://github.com/apache/cordova-android/blob/8a4ae311ce165e31f0511ae43274aa52d3773fd2/framework/src/org/apache/cordova/BuildHelper.java#L54-L56
and check for exceptions, which is all very basic Java programming.
I would really favor marking these classes as deprecated classes, to be removed from a major release someday in the future, with plenty of advance warning.
I am looking forward to the response from @macdonst.