diff --git a/android/capacitor/src/main/java/com/getcapacitor/Bridge.java b/android/capacitor/src/main/java/com/getcapacitor/Bridge.java index 00dd89d60..7280c88a0 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/Bridge.java +++ b/android/capacitor/src/main/java/com/getcapacitor/Bridge.java @@ -87,11 +87,6 @@ public class Bridge { public static final String CAPACITOR_FILE_START = "/_capacitor_file_"; public static final String CAPACITOR_CONTENT_START = "/_capacitor_content_"; public static final String CAPACITOR_HTTP_INTERCEPTOR_START = "/_capacitor_http_interceptor_"; - - /** @deprecated CAPACITOR_HTTPS_INTERCEPTOR_START is no longer required. All proxied requests are handled via CAPACITOR_HTTP_INTERCEPTOR_START instead */ - @Deprecated - public static final String CAPACITOR_HTTPS_INTERCEPTOR_START = "/_capacitor_https_interceptor_"; - public static final String CAPACITOR_HTTP_INTERCEPTOR_URL_PARAM = "u"; public static final int DEFAULT_ANDROID_WEBVIEW_VERSION = 60; diff --git a/android/capacitor/src/main/java/com/getcapacitor/CapConfig.java b/android/capacitor/src/main/java/com/getcapacitor/CapConfig.java index b20799ba3..305d61e59 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/CapConfig.java +++ b/android/capacitor/src/main/java/com/getcapacitor/CapConfig.java @@ -69,27 +69,6 @@ public class CapConfig { */ private CapConfig() {} - /** - * Get an instance of the Config file object. - * @deprecated use {@link #loadDefault(Context)} to load an instance of the Config object - * from the capacitor.config.json file, or use the {@link CapConfig.Builder} to construct - * a CapConfig for embedded use. - * - * @param assetManager The AssetManager used to load the config file - * @param config JSON describing a configuration to use - */ - @Deprecated - public CapConfig(AssetManager assetManager, JSONObject config) { - if (config != null) { - this.configJSON = config; - } else { - // Load the capacitor.config.json - loadConfigFromAssets(assetManager, null); - } - - deserializeConfig(null); - } - /** * Constructs a Capacitor Configuration from config.json file. * @@ -429,104 +408,6 @@ public PluginConfig getPluginConfiguration(String pluginId) { return pluginConfig; } - /** - * Get a JSON object value from the Capacitor config. - * @deprecated use {@link PluginConfig#getObject(String)} to access plugin config values. - * For main Capacitor config values, use the appropriate getter. - * - * @param key A key to fetch from the config - * @return The value from the config, if exists. Null if not - */ - @Deprecated - public JSONObject getObject(String key) { - try { - return configJSON.getJSONObject(key); - } catch (Exception ex) {} - return null; - } - - /** - * Get a string value from the Capacitor config. - * @deprecated use {@link PluginConfig#getString(String, String)} to access plugin config - * values. For main Capacitor config values, use the appropriate getter. - * - * @param key A key to fetch from the config - * @return The value from the config, if exists. Null if not - */ - @Deprecated - public String getString(String key) { - return JSONUtils.getString(configJSON, key, null); - } - - /** - * Get a string value from the Capacitor config. - * @deprecated use {@link PluginConfig#getString(String, String)} to access plugin config - * values. For main Capacitor config values, use the appropriate getter. - * - * @param key A key to fetch from the config - * @param defaultValue A default value to return if the key does not exist in the config - * @return The value from the config, if key exists. Default value returned if not - */ - @Deprecated - public String getString(String key, String defaultValue) { - return JSONUtils.getString(configJSON, key, defaultValue); - } - - /** - * Get a boolean value from the Capacitor config. - * @deprecated use {@link PluginConfig#getBoolean(String, boolean)} to access plugin config - * values. For main Capacitor config values, use the appropriate getter. - * - * @param key A key to fetch from the config - * @param defaultValue A default value to return if the key does not exist in the config - * @return The value from the config, if key exists. Default value returned if not - */ - @Deprecated - public boolean getBoolean(String key, boolean defaultValue) { - return JSONUtils.getBoolean(configJSON, key, defaultValue); - } - - /** - * Get an integer value from the Capacitor config. - * @deprecated use {@link PluginConfig#getInt(String, int)} to access the plugin config - * values. For main Capacitor config values, use the appropriate getter. - * - * @param key A key to fetch from the config - * @param defaultValue A default value to return if the key does not exist in the config - * @return The value from the config, if key exists. Default value returned if not - */ - @Deprecated - public int getInt(String key, int defaultValue) { - return JSONUtils.getInt(configJSON, key, defaultValue); - } - - /** - * Get a string array value from the Capacitor config. - * @deprecated use {@link PluginConfig#getArray(String)} to access the plugin config - * values. For main Capacitor config values, use the appropriate getter. - * - * @param key A key to fetch from the config - * @return The value from the config, if exists. Null if not - */ - @Deprecated - public String[] getArray(String key) { - return JSONUtils.getArray(configJSON, key, null); - } - - /** - * Get a string array value from the Capacitor config. - * @deprecated use {@link PluginConfig#getArray(String, String[])} to access the plugin - * config values. For main Capacitor config values, use the appropriate getter. - * - * @param key A key to fetch from the config - * @param defaultValue A default value to return if the key does not exist in the config - * @return The value from the config, if key exists. Default value returned if not - */ - @Deprecated - public String[] getArray(String key, String[] defaultValue) { - return JSONUtils.getArray(configJSON, key, defaultValue); - } - private static Map deserializePluginsConfig(JSONObject pluginsConfig) { Map pluginsMap = new HashMap<>(); diff --git a/android/capacitor/src/main/java/com/getcapacitor/MessageHandler.java b/android/capacitor/src/main/java/com/getcapacitor/MessageHandler.java index 4de485b6f..33bc2717e 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/MessageHandler.java +++ b/android/capacitor/src/main/java/com/getcapacitor/MessageHandler.java @@ -45,11 +45,6 @@ public MessageHandler(Bridge bridge, WebView webView) { } } - @Deprecated - public MessageHandler(Bridge bridge, WebView webView, Object cordovaPluginManager) { - this(bridge, webView); - } - /** * The main message handler that will be called from JavaScript * to send a message to the native bridge. diff --git a/android/capacitor/src/main/java/com/getcapacitor/Plugin.java b/android/capacitor/src/main/java/com/getcapacitor/Plugin.java index 19c8b8b3a..e07851022 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/Plugin.java +++ b/android/capacitor/src/main/java/com/getcapacitor/Plugin.java @@ -296,24 +296,6 @@ public PluginConfig getConfig() { return bridge.getConfig().getPluginConfiguration(handle.getId()); } - /** - * Get the value for a key on the config for this plugin. - * @deprecated use {@link #getConfig()} and access config values using the methods available - * depending on the type. - * - * @param key the key for the config value - * @return some object containing the value from the config - */ - @Deprecated - public Object getConfigValue(String key) { - try { - PluginConfig pluginConfig = getConfig(); - return pluginConfig.getConfigJSON().get(key); - } catch (JSONException ex) { - return null; - } - } - /** * Check whether any of the given permissions has been defined in the AndroidManifest.xml * @deprecated use {@link #isPermissionDeclared(String)} diff --git a/android/capacitor/src/main/java/com/getcapacitor/PluginCall.java b/android/capacitor/src/main/java/com/getcapacitor/PluginCall.java index 7308f0712..82c26a22a 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/PluginCall.java +++ b/android/capacitor/src/main/java/com/getcapacitor/PluginCall.java @@ -27,12 +27,6 @@ public class PluginCall { private boolean keepAlive = false; - /** - * Indicates that this PluginCall was released, and should no longer be used - */ - @Deprecated - private boolean isReleased = false; - public PluginCall(MessageHandler msgHandler, String pluginId, String callbackId, String methodName, JSObject data) { this.msgHandler = msgHandler; this.pluginId = pluginId; @@ -324,28 +318,6 @@ public JSArray getArray(String name, JSArray defaultValue) { return defaultValue; } - /** - * @param name of the option to check - * @return boolean indicating if the plugin call has an option for the provided name. - * @deprecated Presence of a key should not be considered significant. - * Use typed accessors to check the value instead. - */ - @Deprecated - public boolean hasOption(String name) { - return this.data.has(name); - } - - /** - * Indicate that the Bridge should cache this call in order to call - * it again later. For example, the addListener system uses this to - * continuously call the call's callback (😆). - * @deprecated use {@link #setKeepAlive(Boolean)} instead - */ - @Deprecated - public void save() { - setKeepAlive(true); - } - /** * Indicate that the Bridge should cache this call in order to call * it again later. For example, the addListener system uses this to @@ -360,16 +332,6 @@ public void setKeepAlive(Boolean keepAlive) { public void release(Bridge bridge) { this.keepAlive = false; bridge.releaseCall(this); - this.isReleased = true; - } - - /** - * @deprecated use {@link #isKeptAlive()} - * @return true if the plugin call is kept alive - */ - @Deprecated - public boolean isSaved() { - return isKeptAlive(); } /** @@ -380,11 +342,6 @@ public boolean isKeptAlive() { return keepAlive; } - @Deprecated - public boolean isReleased() { - return isReleased; - } - class PluginCallDataTypeException extends Exception { PluginCallDataTypeException(String m) {