incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject git commit: Changing to CordovaInterface in preparation of CordovaWebView
Date Mon, 06 Feb 2012 22:54:07 GMT
Updated Branches:
  refs/heads/master 52a3a919f -> 77547f882


Changing to CordovaInterface in preparation of CordovaWebView


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/77547f88
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/77547f88
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/77547f88

Branch: refs/heads/master
Commit: 77547f882635d02dc41eee97bff26641b737fa6a
Parents: 52a3a91
Author: Joe Bowser <bowserj@apache.org>
Authored: Mon Feb 6 14:13:34 2012 -0800
Committer: Joe Bowser <bowserj@apache.org>
Committed: Mon Feb 6 14:13:34 2012 -0800

----------------------------------------------------------------------
 .../src/com/phonegap/api/PhonegapActivity.java     |    2 +-
 framework/src/com/phonegap/api/PluginManager.java  |    4 +-
 .../src/org/apache/cordova/AccelListener.java      |    4 +-
 .../src/org/apache/cordova/CompassListener.java    |    4 +-
 framework/src/org/apache/cordova/Device.java       |    6 +-
 framework/src/org/apache/cordova/DroidGap.java     |    4 +-
 framework/src/org/apache/cordova/FileUtils.java    |    4 +-
 framework/src/org/apache/cordova/GpsListener.java  |    6 +-
 .../src/org/apache/cordova/NetworkListener.java    |    6 +-
 .../src/org/apache/cordova/NetworkManager.java     |    4 +-
 framework/src/org/apache/cordova/Notification.java |   10 +-
 framework/src/org/apache/cordova/TempListener.java |    4 +-
 .../org/apache/cordova/api/CordovaActivity.java    |   80 ---------------
 .../org/apache/cordova/api/CordovaInterface.java   |   80 +++++++++++++++
 framework/src/org/apache/cordova/api/IPlugin.java  |    2 +-
 framework/src/org/apache/cordova/api/Plugin.java   |    4 +-
 .../src/org/apache/cordova/api/PluginManager.java  |    6 +-
 17 files changed, 115 insertions(+), 115 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/com/phonegap/api/PhonegapActivity.java
----------------------------------------------------------------------
diff --git a/framework/src/com/phonegap/api/PhonegapActivity.java b/framework/src/com/phonegap/api/PhonegapActivity.java
index 9e01f56..d6968c3 100755
--- a/framework/src/com/phonegap/api/PhonegapActivity.java
+++ b/framework/src/com/phonegap/api/PhonegapActivity.java
@@ -22,5 +22,5 @@ package com.phonegap.api;
  * The Cordova activity abstract class that is extended by DroidGap.
  * It is used to isolate plugin development, and remove dependency on entire Cordova library.
  */
-public abstract class PhonegapActivity extends org.apache.cordova.api.CordovaActivity {
+public abstract class PhonegapActivity extends org.apache.cordova.api.CordovaInterface {
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/com/phonegap/api/PluginManager.java
----------------------------------------------------------------------
diff --git a/framework/src/com/phonegap/api/PluginManager.java b/framework/src/com/phonegap/api/PluginManager.java
index 190cc77..65c6f11 100755
--- a/framework/src/com/phonegap/api/PluginManager.java
+++ b/framework/src/com/phonegap/api/PluginManager.java
@@ -17,7 +17,7 @@
 */
 package com.phonegap.api;
 
-import org.apache.cordova.api.CordovaActivity;
+import org.apache.cordova.api.CordovaInterface;
 
 import android.webkit.WebView;
 
@@ -29,7 +29,7 @@ import android.webkit.WebView;
  */
 public class PluginManager extends org.apache.cordova.api.PluginManager {
 
-    public PluginManager(WebView app, CordovaActivity ctx) {
+    public PluginManager(WebView app, CordovaInterface ctx) {
         super(app, ctx);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/AccelListener.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/AccelListener.java b/framework/src/org/apache/cordova/AccelListener.java
index 61d7acf..6eb917f 100755
--- a/framework/src/org/apache/cordova/AccelListener.java
+++ b/framework/src/org/apache/cordova/AccelListener.java
@@ -20,7 +20,7 @@ package org.apache.cordova;
 
 import java.util.List;
 
-import org.apache.cordova.api.CordovaActivity;
+import org.apache.cordova.api.CordovaInterface;
 import org.apache.cordova.api.Plugin;
 import org.apache.cordova.api.PluginResult;
 import org.json.JSONArray;
@@ -72,7 +72,7 @@ public class AccelListener extends Plugin implements SensorEventListener
{
 	 * 
 	 * @param ctx The context of the main Activity.
 	 */
-	public void setContext(CordovaActivity ctx) {
+	public void setContext(CordovaInterface ctx) {
 		super.setContext(ctx);
         this.sensorManager = (SensorManager) ctx.getSystemService(Context.SENSOR_SERVICE);
 	}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/CompassListener.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CompassListener.java b/framework/src/org/apache/cordova/CompassListener.java
index f5fa2b6..9ebe424 100755
--- a/framework/src/org/apache/cordova/CompassListener.java
+++ b/framework/src/org/apache/cordova/CompassListener.java
@@ -20,7 +20,7 @@ package org.apache.cordova;
 
 import java.util.List;
 
-import org.apache.cordova.api.CordovaActivity;
+import org.apache.cordova.api.CordovaInterface;
 import org.apache.cordova.api.Plugin;
 import org.apache.cordova.api.PluginResult;
 import org.json.JSONArray;
@@ -69,7 +69,7 @@ public class CompassListener extends Plugin implements SensorEventListener
{
      * 
      * @param ctx The context of the main Activity.
      */
-    public void setContext(CordovaActivity ctx) {
+    public void setContext(CordovaInterface ctx) {
         super.setContext(ctx);
         this.sensorManager = (SensorManager) ctx.getSystemService(Context.SENSOR_SERVICE);
     }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/Device.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/Device.java b/framework/src/org/apache/cordova/Device.java
index 372402b..05a53ef 100644
--- a/framework/src/org/apache/cordova/Device.java
+++ b/framework/src/org/apache/cordova/Device.java
@@ -21,7 +21,7 @@ package org.apache.cordova;
 import java.util.TimeZone;
 
 import org.apache.cordova.api.LOG;
-import org.apache.cordova.api.CordovaActivity;
+import org.apache.cordova.api.CordovaInterface;
 import org.apache.cordova.api.Plugin;
 import org.apache.cordova.api.PluginResult;
 import org.json.JSONArray;
@@ -56,7 +56,7 @@ public class Device extends Plugin {
 	 * 
 	 * @param ctx The context of the main Activity.
 	 */
-	public void setContext(CordovaActivity ctx) {
+	public void setContext(CordovaInterface ctx) {
 		super.setContext(ctx);
         Device.uuid = getUuid();
         this.initTelephonyReceiver();
@@ -125,7 +125,7 @@ public class Device extends Plugin {
     private void initTelephonyReceiver() {
         IntentFilter intentFilter = new IntentFilter() ;
         intentFilter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
-        final CordovaActivity myctx = this.ctx;
+        final CordovaInterface myctx = this.ctx;
         this.telephonyReceiver = new BroadcastReceiver() {
             
             @Override

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/DroidGap.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java
index 539329e..61aba0d 100755
--- a/framework/src/org/apache/cordova/DroidGap.java
+++ b/framework/src/org/apache/cordova/DroidGap.java
@@ -31,7 +31,7 @@ import org.apache.cordova.PreferenceNode;
 import org.apache.cordova.PreferenceSet;
 import org.apache.cordova.api.IPlugin;
 import org.apache.cordova.api.LOG;
-import org.apache.cordova.api.CordovaActivity;
+import org.apache.cordova.api.CordovaInterface;
 import org.apache.cordova.api.PluginManager;
 import org.json.JSONArray;
 import org.json.JSONException;
@@ -159,7 +159,7 @@ import android.widget.LinearLayout;
  *          ...
  *      </plugins>
  */
-public class DroidGap extends CordovaActivity {
+public class DroidGap extends CordovaInterface {
     public static String TAG = "DroidGap";
     
     // The webview for our app

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/FileUtils.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/FileUtils.java b/framework/src/org/apache/cordova/FileUtils.java
index 0318797..c2bef70 100755
--- a/framework/src/org/apache/cordova/FileUtils.java
+++ b/framework/src/org/apache/cordova/FileUtils.java
@@ -25,7 +25,7 @@ import java.net.URLDecoder;
 import java.nio.channels.FileChannel;
 
 import org.apache.commons.codec.binary.Base64;
-import org.apache.cordova.api.CordovaActivity;
+import org.apache.cordova.api.CordovaInterface;
 import org.apache.cordova.api.Plugin;
 import org.apache.cordova.api.PluginResult;
 import org.apache.cordova.file.EncodingException;
@@ -1014,7 +1014,7 @@ public class FileUtils extends Plugin {
      * @param ctx the current applicaiton context
      * @return the full path to the file
      */
-    protected static String getRealPathFromURI(Uri contentUri, CordovaActivity ctx) {
+    protected static String getRealPathFromURI(Uri contentUri, CordovaInterface ctx) {
         String[] proj = { _DATA };
         Cursor cursor = ctx.managedQuery(contentUri, proj, null, null, null);
         int column_index = cursor.getColumnIndexOrThrow(_DATA);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/GpsListener.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/GpsListener.java b/framework/src/org/apache/cordova/GpsListener.java
index 165bd1e..f000692 100755
--- a/framework/src/org/apache/cordova/GpsListener.java
+++ b/framework/src/org/apache/cordova/GpsListener.java
@@ -19,7 +19,7 @@
 
 package org.apache.cordova;
 
-import org.apache.cordova.api.CordovaActivity;
+import org.apache.cordova.api.CordovaInterface;
 
 import android.content.Context;
 import android.location.Location;
@@ -33,7 +33,7 @@ import android.os.Bundle;
  */
 public class GpsListener implements LocationListener {
 	
-	private CordovaActivity mCtx;				// CordovaActivity object
+	private CordovaInterface mCtx;				// CordovaActivity object
 	
 	private LocationManager mLocMan;			// Location manager object
 	private GeoListener owner;					// Geolistener object (parent)
@@ -49,7 +49,7 @@ public class GpsListener implements LocationListener {
 	 * @param interval
 	 * @param m
 	 */
-	public GpsListener(CordovaActivity ctx, int interval, GeoListener m) {
+	public GpsListener(CordovaInterface ctx, int interval, GeoListener m) {
 		this.owner = m;
 		this.mCtx = ctx;
 		this.mLocMan = (LocationManager) this.mCtx.getSystemService(Context.LOCATION_SERVICE);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/NetworkListener.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/NetworkListener.java b/framework/src/org/apache/cordova/NetworkListener.java
index 5dd3342..fd3fbd5 100755
--- a/framework/src/org/apache/cordova/NetworkListener.java
+++ b/framework/src/org/apache/cordova/NetworkListener.java
@@ -18,7 +18,7 @@
 */
 package org.apache.cordova;
 
-import org.apache.cordova.api.CordovaActivity;
+import org.apache.cordova.api.CordovaInterface;
 
 import android.content.Context;
 import android.location.Location;
@@ -28,7 +28,7 @@ import android.os.Bundle;
 
 public class NetworkListener implements LocationListener {
 	
-	private CordovaActivity mCtx;              // CordovaActivity object
+	private CordovaInterface mCtx;              // CordovaActivity object
 	
 	private LocationManager mLocMan;           // Location manager object
 	private GeoListener owner;                 // Geolistener object (parent)
@@ -44,7 +44,7 @@ public class NetworkListener implements LocationListener {
 	 * @param interval
 	 * @param m
 	 */
-	public NetworkListener(CordovaActivity ctx, int interval, GeoListener m) {
+	public NetworkListener(CordovaInterface ctx, int interval, GeoListener m) {
 		this.owner = m;
 		this.mCtx = ctx;
 		this.mLocMan = (LocationManager) this.mCtx.getSystemService(Context.LOCATION_SERVICE);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/NetworkManager.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/NetworkManager.java b/framework/src/org/apache/cordova/NetworkManager.java
index 8159e63..808dac1 100755
--- a/framework/src/org/apache/cordova/NetworkManager.java
+++ b/framework/src/org/apache/cordova/NetworkManager.java
@@ -18,7 +18,7 @@
 */
 package org.apache.cordova;
 
-import org.apache.cordova.api.CordovaActivity;
+import org.apache.cordova.api.CordovaInterface;
 import org.apache.cordova.api.Plugin;
 import org.apache.cordova.api.PluginResult;
 import org.json.JSONArray;
@@ -87,7 +87,7 @@ public class NetworkManager extends Plugin {
      * 
      * @param ctx The context of the main Activity.
      */
-    public void setContext(CordovaActivity ctx) {
+    public void setContext(CordovaInterface ctx) {
         super.setContext(ctx);
         this.sockMan = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE);
       
         this.connectionCallbackId = null;

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/Notification.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/Notification.java b/framework/src/org/apache/cordova/Notification.java
index 9605ea6..535142b 100755
--- a/framework/src/org/apache/cordova/Notification.java
+++ b/framework/src/org/apache/cordova/Notification.java
@@ -18,7 +18,7 @@
 */
 package org.apache.cordova;
 
-import org.apache.cordova.api.CordovaActivity;
+import org.apache.cordova.api.CordovaInterface;
 import org.apache.cordova.api.Plugin;
 import org.apache.cordova.api.PluginResult;
 import org.json.JSONArray;
@@ -184,7 +184,7 @@ public class Notification extends Plugin {
 	 */
 	public synchronized void alert(final String message, final String title, final String buttonLabel,
final String callbackId) {
 
-		final CordovaActivity ctx = this.ctx;
+		final CordovaInterface ctx = this.ctx;
 		final Notification notification = this;
 		
 		Runnable runnable = new Runnable() {
@@ -220,7 +220,7 @@ public class Notification extends Plugin {
 	 */
 	public synchronized void confirm(final String message, final String title, String buttonLabels,
final String callbackId) {
 
-		final CordovaActivity ctx = this.ctx;
+		final CordovaInterface ctx = this.ctx;
 		final Notification notification = this;
 		final String[] fButtons = buttonLabels.split(",");
 
@@ -284,7 +284,7 @@ public class Notification extends Plugin {
 			this.spinnerDialog = null;
 		}
 		final Notification notification = this;
-		final CordovaActivity ctx = this.ctx;
+		final CordovaInterface ctx = this.ctx;
 		Runnable runnable = new Runnable() {
 			public void run() {
 				notification.spinnerDialog = ProgressDialog.show(ctx, title , message, true, true, 
@@ -320,7 +320,7 @@ public class Notification extends Plugin {
 			this.progressDialog = null;
 		}
 		final Notification notification = this;
-		final CordovaActivity ctx = this.ctx;
+		final CordovaInterface ctx = this.ctx;
 		Runnable runnable = new Runnable() {
 			public void run() {
 				notification.progressDialog = new ProgressDialog(ctx);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/TempListener.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/TempListener.java b/framework/src/org/apache/cordova/TempListener.java
index 85831da..93a5f82 100755
--- a/framework/src/org/apache/cordova/TempListener.java
+++ b/framework/src/org/apache/cordova/TempListener.java
@@ -20,7 +20,7 @@ package org.apache.cordova;
 
 import java.util.List;
 
-import org.apache.cordova.api.CordovaActivity;
+import org.apache.cordova.api.CordovaInterface;
 import org.apache.cordova.api.Plugin;
 import org.apache.cordova.api.PluginResult;
 import org.json.JSONArray;
@@ -49,7 +49,7 @@ public class TempListener extends Plugin implements SensorEventListener
{
 	 * 
 	 * @param ctx The context of the main Activity.
 	 */
-	public void setContext(CordovaActivity ctx) {
+	public void setContext(CordovaInterface ctx) {
 		super.setContext(ctx);
         this.sensorManager = (SensorManager) ctx.getSystemService(Context.SENSOR_SERVICE);
 	}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/api/CordovaActivity.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/api/CordovaActivity.java b/framework/src/org/apache/cordova/api/CordovaActivity.java
deleted file mode 100755
index be2a12a..0000000
--- a/framework/src/org/apache/cordova/api/CordovaActivity.java
+++ /dev/null
@@ -1,80 +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.api;
-
-import android.app.Activity;
-import android.content.Intent;
-
-/**
- * The Cordova activity abstract class that is extended by DroidGap.
- * It is used to isolate plugin development, and remove dependency on entire Cordova library.
- */
-public abstract class CordovaActivity extends Activity {
-
-    /**
-     * @deprecated
-     * Add services to res/xml/plugins.xml instead.
-     * 
-     * Add a class that implements a service.
-     * 
-     * @param serviceType
-     * @param className
-     */
-    @Deprecated
-    abstract public void addService(String serviceType, String className);
-    
-    /**
-     * Send JavaScript statement back to JavaScript.
-     * 
-     * @param message
-     */
-    abstract public void sendJavascript(String statement);
-
-    /**
-     * Launch an activity for which you would like a result when it finished. When this activity
exits, 
-     * your onActivityResult() method will be called.
-     *  
-     * @param command			The command object
-     * @param intent			The intent to start
-     * @param requestCode		The request code that is passed to callback to identify the activity
-     */
-    abstract public void startActivityForResult(IPlugin command, Intent intent, int requestCode);
-
-    /**
-     * Set the plugin to be called when a sub-activity exits.
-     * 
-     * @param plugin			The plugin on which onActivityResult is to be called
-     */
-    abstract public void setActivityResultCallback(IPlugin plugin);
-
-    /**
-     * Load the specified URL in the Cordova webview.
-     * 
-     * @param url				The URL to load.
-     */
-    abstract public void loadUrl(String url);
-    
-    /**
-     * Send a message to all plugins. 
-     * 
-     * @param id            The message id
-     * @param data          The message data
-     */
-    abstract public void postMessage(String id, Object data);
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/api/CordovaInterface.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/api/CordovaInterface.java b/framework/src/org/apache/cordova/api/CordovaInterface.java
new file mode 100755
index 0000000..b9b4b68
--- /dev/null
+++ b/framework/src/org/apache/cordova/api/CordovaInterface.java
@@ -0,0 +1,80 @@
+/*
+       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.api;
+
+import android.app.Activity;
+import android.content.Intent;
+
+/**
+ * The Cordova activity abstract class that is extended by DroidGap.
+ * It is used to isolate plugin development, and remove dependency on entire Cordova library.
+ */
+public abstract class CordovaInterface extends Activity {
+
+    /**
+     * @deprecated
+     * Add services to res/xml/plugins.xml instead.
+     * 
+     * Add a class that implements a service.
+     * 
+     * @param serviceType
+     * @param className
+     */
+    @Deprecated
+    abstract public void addService(String serviceType, String className);
+    
+    /**
+     * Send JavaScript statement back to JavaScript.
+     * 
+     * @param message
+     */
+    abstract public void sendJavascript(String statement);
+
+    /**
+     * Launch an activity for which you would like a result when it finished. When this activity
exits, 
+     * your onActivityResult() method will be called.
+     *  
+     * @param command			The command object
+     * @param intent			The intent to start
+     * @param requestCode		The request code that is passed to callback to identify the activity
+     */
+    abstract public void startActivityForResult(IPlugin command, Intent intent, int requestCode);
+
+    /**
+     * Set the plugin to be called when a sub-activity exits.
+     * 
+     * @param plugin			The plugin on which onActivityResult is to be called
+     */
+    abstract public void setActivityResultCallback(IPlugin plugin);
+
+    /**
+     * Load the specified URL in the Cordova webview.
+     * 
+     * @param url				The URL to load.
+     */
+    abstract public void loadUrl(String url);
+    
+    /**
+     * Send a message to all plugins. 
+     * 
+     * @param id            The message id
+     * @param data          The message data
+     */
+    abstract public void postMessage(String id, Object data);
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/api/IPlugin.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/api/IPlugin.java b/framework/src/org/apache/cordova/api/IPlugin.java
index 90a3b1d..44349ee 100755
--- a/framework/src/org/apache/cordova/api/IPlugin.java
+++ b/framework/src/org/apache/cordova/api/IPlugin.java
@@ -53,7 +53,7 @@ public interface IPlugin {
 	 * 
 	 * @param ctx The context of the main Activity.
 	 */
-	void setContext(CordovaActivity ctx);
+	void setContext(CordovaInterface ctx);
 
 	/**
 	 * Sets the main View of the application, this is the WebView within which 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/api/Plugin.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/api/Plugin.java b/framework/src/org/apache/cordova/api/Plugin.java
index 66bb168..648e86d 100755
--- a/framework/src/org/apache/cordova/api/Plugin.java
+++ b/framework/src/org/apache/cordova/api/Plugin.java
@@ -33,7 +33,7 @@ public abstract class Plugin implements IPlugin {
 
 	public String id;
     public WebView webView;					// WebView object
-    public CordovaActivity ctx;			// CordovaActivity object
+    public CordovaInterface ctx;			// CordovaActivity object
 
 	/**
 	 * Executes the request and returns PluginResult.
@@ -61,7 +61,7 @@ public abstract class Plugin implements IPlugin {
 	 * 
 	 * @param ctx The context of the main Activity.
 	 */
-	public void setContext(CordovaActivity ctx) {
+	public void setContext(CordovaInterface ctx) {
 		this.ctx = ctx;
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/77547f88/framework/src/org/apache/cordova/api/PluginManager.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/api/PluginManager.java b/framework/src/org/apache/cordova/api/PluginManager.java
index 035aa91..4367669 100755
--- a/framework/src/org/apache/cordova/api/PluginManager.java
+++ b/framework/src/org/apache/cordova/api/PluginManager.java
@@ -43,7 +43,7 @@ public class PluginManager {
 	private HashMap<String, IPlugin> plugins = new HashMap<String,IPlugin>();
 	private HashMap<String, String> services = new HashMap<String,String>();
 	
-	private final CordovaActivity ctx;
+	private final CordovaInterface ctx;
 	private final WebView app;
 	
     // Map URL schemes like foo: to plugins that want to handle those schemes
@@ -56,7 +56,7 @@ public class PluginManager {
 	 * @param app
 	 * @param ctx
 	 */
-	public PluginManager(WebView app, CordovaActivity ctx) {
+	public PluginManager(WebView app, CordovaInterface ctx) {
 		this.ctx = ctx;
 		this.app = app;
 		this.loadPlugins();
@@ -138,7 +138,7 @@ public class PluginManager {
 		try {
 			final JSONArray args = new JSONArray(jsonArgs);
 			final IPlugin plugin = this.getPlugin(service); 
-			final CordovaActivity ctx = this.ctx;
+			final CordovaInterface ctx = this.ctx;
 			if (plugin != null) {
 				runAsync = async && !plugin.isSynch(action);
 				if (runAsync) {


Mime
View raw message