Fixing CB-1801

This commit is contained in:
Joe Bowser 2012-11-01 12:23:18 -07:00
parent d9db845b43
commit eb59e76cde
3 changed files with 11 additions and 3 deletions

View File

@ -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)
{

View File

@ -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();

View File

@ -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