mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +08:00
Add missing changes from previous merge commit
This commit is contained in:
parent
4ca2305693
commit
a8330773ca
@ -65,7 +65,7 @@ public class AndroidChromeClient extends WebChromeClient implements CordovaChrom
|
||||
private static final String LOG_TAG = "CordovaChromeClient";
|
||||
private long MAX_QUOTA = 100 * 1024 * 1024;
|
||||
protected CordovaInterface cordova;
|
||||
protected CordovaWebView appView;
|
||||
protected AndroidWebView appView;
|
||||
|
||||
// the video progress view
|
||||
private View mVideoProgressView;
|
||||
@ -73,35 +73,17 @@ public class AndroidChromeClient extends WebChromeClient implements CordovaChrom
|
||||
// File Chooser
|
||||
public ValueCallback<Uri> mUploadMessage;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param cordova
|
||||
*/
|
||||
public AndroidChromeClient(CordovaInterface cordova) {
|
||||
this.cordova = cordova;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param ctx
|
||||
* @param app
|
||||
*/
|
||||
public AndroidChromeClient(CordovaInterface ctx, CordovaWebView app) {
|
||||
public AndroidChromeClient(CordovaInterface ctx, AndroidWebView app) {
|
||||
this.cordova = ctx;
|
||||
this.appView = app;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param view
|
||||
*/
|
||||
public void setWebView(CordovaWebView view) {
|
||||
this.appView = view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tell the client to display a javascript alert dialog.
|
||||
*
|
||||
|
@ -93,7 +93,7 @@ public class AndroidWebView extends WebView implements CordovaWebView {
|
||||
private long lastMenuEventTime = 0;
|
||||
|
||||
NativeToJsMessageQueue jsMessageQueue;
|
||||
ExposedJsApi exposedJsApi;
|
||||
AndroidExposedJsApi exposedJsApi;
|
||||
|
||||
/** custom view created by the browser (a video player for example) */
|
||||
private View mCustomView;
|
||||
@ -235,7 +235,7 @@ public class AndroidWebView extends WebView implements CordovaWebView {
|
||||
*/
|
||||
@Override
|
||||
public CordovaChromeClient makeWebChromeClient() {
|
||||
return (CordovaChromeClient) new AndroidChromeClient(this.cordova);
|
||||
return (CordovaChromeClient) new AndroidChromeClient(this.cordova, this);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -991,22 +991,6 @@ public class AndroidWebView extends WebView implements CordovaWebView {
|
||||
return this.pluginManager.getPlugin(initCallbackClass);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String exec(String service, String action, String callbackId,
|
||||
String message) throws JSONException {
|
||||
return this.exposedJsApi.exec(service, action, callbackId, message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNativeToJsBridgeMode(int parseInt) {
|
||||
this.exposedJsApi.setNativeToJsBridgeMode(parseInt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String retrieveJsMessages(boolean equals) {
|
||||
return this.exposedJsApi.retrieveJsMessages(equals);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOverrideUrlLoading(String url) {
|
||||
return this.pluginManager.onOverrideUrlLoading(url);
|
||||
|
@ -753,7 +753,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
|
||||
LOG.d(TAG, "Incoming Result");
|
||||
super.onActivityResult(requestCode, resultCode, intent);
|
||||
Log.d(TAG, "Request code = " + requestCode);
|
||||
if (appView != null && requestCode == CordovaChromeClient.FILECHOOSER_RESULTCODE) {
|
||||
if (appView != null && requestCode == AndroidChromeClient.FILECHOOSER_RESULTCODE) {
|
||||
ValueCallback<Uri> mUploadMessage = ((CordovaChromeClient) this.appView.getWebChromeClient()).getValueCallback();
|
||||
Log.d(TAG, "did we get here?");
|
||||
if (null == mUploadMessage)
|
||||
|
@ -22,6 +22,5 @@ import android.net.Uri;
|
||||
import android.webkit.ValueCallback;
|
||||
|
||||
public interface CordovaChromeClient {
|
||||
void setWebView(CordovaWebView appView);
|
||||
ValueCallback<Uri> getValueCallback();
|
||||
}
|
||||
|
@ -102,12 +102,6 @@ public interface CordovaWebView {
|
||||
|
||||
boolean isCustomViewShowing();
|
||||
|
||||
String exec(String service, String action, String callbackId, String message) throws JSONException;
|
||||
|
||||
void setNativeToJsBridgeMode(int parseInt);
|
||||
|
||||
String retrieveJsMessages(boolean equals);
|
||||
|
||||
void showCustomView(View view, CustomViewCallback callback);
|
||||
|
||||
void hideCustomView();
|
||||
|
@ -23,6 +23,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.cordova.CordovaWebView;
|
||||
import org.apache.cordova.CallbackContext;
|
||||
|
Loading…
Reference in New Issue
Block a user