diff --git a/RELEASENOTES.md b/RELEASENOTES.md index be5f75d6..5dafc879 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -48,12 +48,15 @@ Changes For Plugin Developers: * Android Studio is now fully supported, and recommended over Eclipse * Build using Gradle * All builds [use Gradle by default](Android%20Shell%20Tool%20Guide_building_with_gradle), instead of Ant + * Plugins can add their own gradle build steps! + * Plugins can depend on Maven libraries using `` tags +* New APIs: `onStart`, `onStop`, `onConfigurationChanged` +* `"onScrollChanged"` message removed. Use `view.getViewTreeObserver().addOnScrollChangedListener(...)` instead +* CB-8702 New API for plugins to override `shouldInterceptRequest` with a stream #### Other Changes #### * CB-8378 Removed `hidekeyboard` and `showkeyboard` events (apps should use a plugin instead) -* CB-7085 Add `onConfigurationChanged` hook for plugins * CB-8735 `bin/create` regex relaxed / better support for numbers -* CB-8702 Add API for plugins to override `shouldInterceptRequest` with a stream * CB-8699 Fix CordovaResourceApi `copyResource` creating zero-length files when src=uncompressed asset * CB-8693 CordovaLib should not contain icons / splashscreens * CB-8592 Fix NPE if lifecycle events reach CordovaWebView before `init()` has been called diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java index 45254b33..bf86c059 100755 --- a/framework/src/org/apache/cordova/CordovaActivity.java +++ b/framework/src/org/apache/cordova/CordovaActivity.java @@ -421,10 +421,6 @@ public class CordovaActivity extends Activity { * @return Object or null */ public Object onMessage(String id, Object data) { - if (!"onScrollChanged".equals(id)) { - LOG.d(TAG, "onMessage(" + id + "," + data + ")"); - } - if ("onReceivedError".equals(id)) { JSONObject d = (JSONObject) data; try { diff --git a/framework/src/org/apache/cordova/ScrollEvent.java b/framework/src/org/apache/cordova/ScrollEvent.java deleted file mode 100644 index 4e31ca71..00000000 --- a/framework/src/org/apache/cordova/ScrollEvent.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova; - -import android.view.View; - -/* - * @deprecated As of release 4.0. Use view.getViewTreeObserver().addOnScrollChangedListener(...) instead. - */ -@Deprecated -public class ScrollEvent { - - public int l, t, nl, nt; - private View targetView; - - /* - * ScrollEvent constructor - * No idea why it uses l and t instead of x and y - * - * @param x - * @param y - * @param nx - * @param ny - * @param view - */ - - public ScrollEvent(int nx, int ny, int x, int y, View view) - { - l = x; y = t; nl = nx; nt = ny; - targetView = view; - } - - public int dl() - { - return nl - l; - } - - public int dt() - { - return nt - t; - } - - public View getTargetView() - { - return targetView; - } - -} diff --git a/framework/src/org/apache/cordova/engine/SystemWebView.java b/framework/src/org/apache/cordova/engine/SystemWebView.java index 66ce8468..e3cee30e 100644 --- a/framework/src/org/apache/cordova/engine/SystemWebView.java +++ b/framework/src/org/apache/cordova/engine/SystemWebView.java @@ -10,7 +10,6 @@ import android.webkit.WebViewClient; import org.apache.cordova.CordovaInterface; import org.apache.cordova.CordovaWebView; import org.apache.cordova.CordovaWebViewEngine; -import org.apache.cordova.ScrollEvent; /** * Custom WebView subclass that enables us to capture events needed for Cordova. @@ -59,18 +58,6 @@ public class SystemWebView extends WebView implements CordovaWebViewEngine.Engin super.setWebChromeClient(client); } - @Override - public void onScrollChanged(int l, int t, int oldl, int oldt) - { - // TODO: scrolling is perf-sensitive, so we'd be better to not use postMessage - // here, and also not create any new objects. Instead, plugins should use: - // webView.getView().getViewTreeObserver().addOnScrollChangedListener(...) - if (parentEngine != null && parentEngine.pluginManager != null) { - ScrollEvent myEvent = new ScrollEvent(l, t, oldl, oldt, this); - parentEngine.pluginManager.postMessage("onScrollChanged", myEvent); - } - } - @Override public boolean dispatchKeyEvent(KeyEvent event) { Boolean ret = parentEngine.client.onDispatchKeyEvent(event);