mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 03:53:09 +08:00
Fixing CB-1801
This commit is contained in:
parent
d9db845b43
commit
eb59e76cde
@ -35,6 +35,7 @@ import org.xmlpull.v1.XmlPullParserException;
|
|||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.annotation.TargetApi;
|
import android.annotation.TargetApi;
|
||||||
|
import android.app.Activity;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -688,6 +689,12 @@ public class CordovaWebView extends WebView {
|
|||||||
* <log level="DEBUG" />
|
* <log level="DEBUG" />
|
||||||
*/
|
*/
|
||||||
private void loadConfiguration() {
|
private void loadConfiguration() {
|
||||||
|
Activity action = this.cordova.getActivity();
|
||||||
|
if(action == null)
|
||||||
|
{
|
||||||
|
LOG.i("CordovaLog", "There is no activity. Is this on the lock screen?");
|
||||||
|
return;
|
||||||
|
}
|
||||||
int id = getResources().getIdentifier("config", "xml", this.cordova.getActivity().getPackageName());
|
int id = getResources().getIdentifier("config", "xml", this.cordova.getActivity().getPackageName());
|
||||||
if(id == 0)
|
if(id == 0)
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,8 @@ public class CordovaTest extends
|
|||||||
String className = testView.getClass().getSimpleName();
|
String className = testView.getClass().getSimpleName();
|
||||||
assertTrue(className.equals("CordovaWebView"));
|
assertTrue(className.equals("CordovaWebView"));
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
|
/*
|
||||||
public void testForPluginManager() {
|
public void testForPluginManager() {
|
||||||
CordovaWebView v = (CordovaWebView) testView;
|
CordovaWebView v = (CordovaWebView) testView;
|
||||||
PluginManager p = v.getPluginManager();
|
PluginManager p = v.getPluginManager();
|
||||||
|
@ -69,9 +69,9 @@ public class CordovaWebViewTestActivity extends Activity implements CordovaInter
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Note: This must always return an activity!
|
||||||
public Activity getActivity() {
|
public Activity getActivity() {
|
||||||
// TODO Auto-generated method stub
|
return this;
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
Loading…
Reference in New Issue
Block a user