mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +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.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -688,6 +689,12 @@ public class CordovaWebView extends WebView {
|
||||
* <log level="DEBUG" />
|
||||
*/
|
||||
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());
|
||||
if(id == 0)
|
||||
{
|
||||
|
@ -51,7 +51,8 @@ public class CordovaTest extends
|
||||
String className = testView.getClass().getSimpleName();
|
||||
assertTrue(className.equals("CordovaWebView"));
|
||||
}
|
||||
/*
|
||||
|
||||
/*
|
||||
public void testForPluginManager() {
|
||||
CordovaWebView v = (CordovaWebView) testView;
|
||||
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() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
|
Loading…
Reference in New Issue
Block a user