You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2013/06/11 02:04:07 UTC
[31/52] [partial] start of lazy loading: axe all vendored-in libs
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/framework/src/org/apache/cordova/api/LegacyContext.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/src/org/apache/cordova/api/LegacyContext.java b/lib/cordova-android/framework/src/org/apache/cordova/api/LegacyContext.java
deleted file mode 100644
index fe154f7..0000000
--- a/lib/cordova-android/framework/src/org/apache/cordova/api/LegacyContext.java
+++ /dev/null
@@ -1,154 +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.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.ServiceConnection;
-import android.content.SharedPreferences;
-import android.content.pm.PackageManager;
-import android.content.res.AssetManager;
-import android.content.res.Resources;
-import android.util.Log;
-
-import java.util.concurrent.ExecutorService;
-
-@Deprecated
-public class LegacyContext implements CordovaInterface {
- private static final String LOG_TAG = "Deprecation Notice";
- private CordovaInterface cordova;
-
- public LegacyContext(CordovaInterface cordova) {
- this.cordova = cordova;
- }
-
- @Deprecated
- public void cancelLoadUrl() {
- Log.i(LOG_TAG, "Replace ctx.cancelLoadUrl() with cordova.cancelLoadUrl()");
- }
-
- @Deprecated
- public Activity getActivity() {
- Log.i(LOG_TAG, "Replace ctx.getActivity() with cordova.getActivity()");
- return this.cordova.getActivity();
- }
-
- @Deprecated
- public Context getContext() {
- Log.i(LOG_TAG, "Replace ctx.getContext() with cordova.getContext()");
- return this.cordova.getActivity();
- }
-
- @Deprecated
- public Object onMessage(String arg0, Object arg1) {
- Log.i(LOG_TAG, "Replace ctx.onMessage() with cordova.onMessage()");
- return this.cordova.onMessage(arg0, arg1);
- }
-
- @Deprecated
- public void setActivityResultCallback(CordovaPlugin arg0) {
- Log.i(LOG_TAG, "Replace ctx.setActivityResultCallback() with cordova.setActivityResultCallback()");
- this.cordova.setActivityResultCallback(arg0);
- }
-
- @Deprecated
- public void startActivityForResult(CordovaPlugin arg0, Intent arg1, int arg2) {
- Log.i(LOG_TAG, "Replace ctx.startActivityForResult() with cordova.startActivityForResult()");
- this.cordova.startActivityForResult(arg0, arg1, arg2);
- }
-
- @Deprecated
- public void startActivity(Intent intent) {
- Log.i(LOG_TAG, "Replace ctx.startActivity() with cordova.getActivity().startActivity()");
- this.cordova.getActivity().startActivity(intent);
- }
-
- @Deprecated
- public Object getSystemService(String name) {
- Log.i(LOG_TAG, "Replace ctx.getSystemService() with cordova.getActivity().getSystemService()");
- return this.cordova.getActivity().getSystemService(name);
- }
-
- @Deprecated
- public AssetManager getAssets() {
- Log.i(LOG_TAG, "Replace ctx.getAssets() with cordova.getActivity().getAssets()");
- return this.cordova.getActivity().getAssets();
- }
-
- @Deprecated
- public void runOnUiThread(Runnable runnable) {
- Log.i(LOG_TAG, "Replace ctx.runOnUiThread() with cordova.getActivity().runOnUiThread()");
- this.cordova.getActivity().runOnUiThread(runnable);
- }
-
- @Deprecated
- public Context getApplicationContext() {
- Log.i(LOG_TAG, "Replace ctx.getApplicationContext() with cordova.getActivity().getApplicationContext()");
- return this.cordova.getActivity().getApplicationContext();
- }
-
- @Deprecated
- public PackageManager getPackageManager() {
- Log.i(LOG_TAG, "Replace ctx.getPackageManager() with cordova.getActivity().getPackageManager()");
- return this.cordova.getActivity().getPackageManager();
- }
-
- @Deprecated
- public SharedPreferences getSharedPreferences(String name, int mode) {
- Log.i(LOG_TAG, "Replace ctx.getSharedPreferences() with cordova.getActivity().getSharedPreferences()");
- return this.cordova.getActivity().getSharedPreferences(name, mode);
- }
-
- @Deprecated
- public void unregisterReceiver(BroadcastReceiver receiver) {
- Log.i(LOG_TAG, "Replace ctx.unregisterReceiver() with cordova.getActivity().unregisterReceiver()");
- this.cordova.getActivity().unregisterReceiver(receiver);
- }
-
- @Deprecated
- public Resources getResources() {
- Log.i(LOG_TAG, "Replace ctx.getResources() with cordova.getActivity().getResources()");
- return this.cordova.getActivity().getResources();
- }
-
- @Deprecated
- public ComponentName startService(Intent service) {
- Log.i(LOG_TAG, "Replace ctx.startService() with cordova.getActivity().startService()");
- return this.cordova.getActivity().startService(service);
- }
-
- @Deprecated
- public boolean bindService(Intent service, ServiceConnection conn, int flags) {
- Log.i(LOG_TAG, "Replace ctx.bindService() with cordova.getActivity().bindService()");
- return this.cordova.getActivity().bindService(service, conn, flags);
- }
-
- @Deprecated
- public void unbindService(ServiceConnection conn) {
- Log.i(LOG_TAG, "Replace ctx.unbindService() with cordova.getActivity().unbindService()");
- this.cordova.getActivity().unbindService(conn);
- }
-
- public ExecutorService getThreadPool() {
- Log.i(LOG_TAG, "Replace ctx.getThreadPool() with cordova.getThreadPool()");
- return this.cordova.getThreadPool();
- }
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/framework/src/org/apache/cordova/api/PluginEntry.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/src/org/apache/cordova/api/PluginEntry.java b/lib/cordova-android/framework/src/org/apache/cordova/api/PluginEntry.java
deleted file mode 100755
index 9b9af6b..0000000
--- a/lib/cordova-android/framework/src/org/apache/cordova/api/PluginEntry.java
+++ /dev/null
@@ -1,117 +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 org.apache.cordova.CordovaWebView;
-
-//import android.content.Context;
-//import android.webkit.WebView;
-
-/**
- * This class represents a service entry object.
- */
-public class PluginEntry {
-
- /**
- * The name of the service that this plugin implements
- */
- public String service = "";
-
- /**
- * The plugin class name that implements the service.
- */
- public String pluginClass = "";
-
- /**
- * The plugin object.
- * Plugin objects are only created when they are called from JavaScript. (see PluginManager.exec)
- * The exception is if the onload flag is set, then they are created when PluginManager is initialized.
- */
- public CordovaPlugin plugin = null;
-
- /**
- * Flag that indicates the plugin object should be created when PluginManager is initialized.
- */
- public boolean onload = false;
-
- /**
- * Constructor
- *
- * @param service The name of the service
- * @param pluginClass The plugin class name
- * @param onload Create plugin object when HTML page is loaded
- */
- public PluginEntry(String service, String pluginClass, boolean onload) {
- this.service = service;
- this.pluginClass = pluginClass;
- this.onload = onload;
- }
-
- /**
- * Create plugin object.
- * If plugin is already created, then just return it.
- *
- * @return The plugin object
- */
- public CordovaPlugin createPlugin(CordovaWebView webView, CordovaInterface ctx) {
- if (this.plugin != null) {
- return this.plugin;
- }
- try {
- @SuppressWarnings("rawtypes")
- Class c = getClassByName(this.pluginClass);
- if (isCordovaPlugin(c)) {
- this.plugin = (CordovaPlugin) c.newInstance();
- this.plugin.initialize(ctx, webView);
- return plugin;
- }
- } catch (Exception e) {
- e.printStackTrace();
- System.out.println("Error adding plugin " + this.pluginClass + ".");
- }
- return null;
- }
-
- /**
- * Get the class.
- *
- * @param clazz
- * @return
- * @throws ClassNotFoundException
- */
- @SuppressWarnings("rawtypes")
- private Class getClassByName(final String clazz) throws ClassNotFoundException {
- Class c = null;
- if (clazz != null) {
- c = Class.forName(clazz);
- }
- return c;
- }
-
- /**
- * Returns whether the given class extends CordovaPlugin.
- */
- @SuppressWarnings("rawtypes")
- private boolean isCordovaPlugin(Class c) {
- if (c != null) {
- return org.apache.cordova.api.CordovaPlugin.class.isAssignableFrom(c);
- }
- return false;
- }
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/framework/src/org/apache/cordova/api/PluginManager.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/src/org/apache/cordova/api/PluginManager.java b/lib/cordova-android/framework/src/org/apache/cordova/api/PluginManager.java
deleted file mode 100755
index 71fc258..0000000
--- a/lib/cordova-android/framework/src/org/apache/cordova/api/PluginManager.java
+++ /dev/null
@@ -1,403 +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 java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map.Entry;
-
-import org.apache.cordova.CordovaWebView;
-import org.json.JSONException;
-import org.xmlpull.v1.XmlPullParserException;
-
-import android.content.Intent;
-import android.content.res.XmlResourceParser;
-
-import android.util.Log;
-import android.webkit.WebResourceResponse;
-
-/**
- * PluginManager is exposed to JavaScript in the Cordova WebView.
- *
- * Calling native plugin code can be done by calling PluginManager.exec(...)
- * from JavaScript.
- */
-public class PluginManager {
- private static String TAG = "PluginManager";
-
- // List of service entries
- private final HashMap<String, PluginEntry> entries = new HashMap<String, PluginEntry>();
-
- private final CordovaInterface ctx;
- private final CordovaWebView app;
-
- // Flag to track first time through
- private boolean firstRun;
-
- // Map URL schemes like foo: to plugins that want to handle those schemes
- // This would allow how all URLs are handled to be offloaded to a plugin
- protected HashMap<String, String> urlMap = new HashMap<String, String>();
-
- /**
- * Constructor.
- *
- * @param app
- * @param ctx
- */
- public PluginManager(CordovaWebView app, CordovaInterface ctx) {
- this.ctx = ctx;
- this.app = app;
- this.firstRun = true;
- }
-
- /**
- * Init when loading a new HTML page into webview.
- */
- public void init() {
- LOG.d(TAG, "init()");
-
- // If first time, then load plugins from plugins.xml file
- if (this.firstRun) {
- this.loadPlugins();
- this.firstRun = false;
- }
-
- // Stop plugins on current HTML page and discard plugin objects
- else {
- this.onPause(false);
- this.onDestroy();
- this.clearPluginObjects();
- }
-
- // Start up all plugins that have onload specified
- this.startupPlugins();
- }
-
- /**
- * Load plugins from res/xml/plugins.xml
- */
- public void loadPlugins() {
- int id = this.ctx.getActivity().getResources().getIdentifier("config", "xml", this.ctx.getActivity().getPackageName());
- if(id == 0)
- {
- id = this.ctx.getActivity().getResources().getIdentifier("plugins", "xml", this.ctx.getActivity().getPackageName());
- LOG.i(TAG, "Using plugins.xml instead of config.xml. plugins.xml will eventually be deprecated");
- }
- if (id == 0) {
- this.pluginConfigurationMissing();
- //We have the error, we need to exit without crashing!
- return;
- }
- XmlResourceParser xml = this.ctx.getActivity().getResources().getXml(id);
- int eventType = -1;
- String service = "", pluginClass = "", paramType = "";
- boolean onload = false;
- boolean insideFeature = false;
- while (eventType != XmlResourceParser.END_DOCUMENT) {
- if (eventType == XmlResourceParser.START_TAG) {
- String strNode = xml.getName();
- //This is for the old scheme
- if (strNode.equals("plugin")) {
- service = xml.getAttributeValue(null, "name");
- pluginClass = xml.getAttributeValue(null, "value");
- Log.d(TAG, "<plugin> tags are deprecated, please use <features> instead. <plugin> will no longer work as of Cordova 3.0");
- onload = "true".equals(xml.getAttributeValue(null, "onload"));
- }
- //What is this?
- else if (strNode.equals("url-filter")) {
- this.urlMap.put(xml.getAttributeValue(null, "value"), service);
- }
- else if (strNode.equals("feature")) {
- //Check for supported feature sets aka. plugins (Accelerometer, Geolocation, etc)
- //Set the bit for reading params
- insideFeature = true;
- service = xml.getAttributeValue(null, "name");
- }
- else if (insideFeature && strNode.equals("param")) {
- paramType = xml.getAttributeValue(null, "name");
- if (paramType.equals("service")) // check if it is using the older service param
- service = xml.getAttributeValue(null, "value");
- else if (paramType.equals("package") || paramType.equals("android-package"))
- pluginClass = xml.getAttributeValue(null,"value");
- else if (paramType.equals("onload"))
- onload = "true".equals(xml.getAttributeValue(null, "value"));
- }
- }
- else if (eventType == XmlResourceParser.END_TAG)
- {
- String strNode = xml.getName();
- if (strNode.equals("feature") || strNode.equals("plugin"))
- {
- PluginEntry entry = new PluginEntry(service, pluginClass, onload);
- this.addService(entry);
-
- //Empty the strings to prevent plugin loading bugs
- service = "";
- pluginClass = "";
- insideFeature = false;
- }
- }
- try {
- eventType = xml.next();
- } catch (XmlPullParserException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- /**
- * Delete all plugin objects.
- */
- public void clearPluginObjects() {
- for (PluginEntry entry : this.entries.values()) {
- entry.plugin = null;
- }
- }
-
- /**
- * Create plugins objects that have onload set.
- */
- public void startupPlugins() {
- for (PluginEntry entry : this.entries.values()) {
- if (entry.onload) {
- entry.createPlugin(this.app, this.ctx);
- }
- }
- }
-
- /**
- * Receives a request for execution and fulfills it by finding the appropriate
- * Java class and calling it's execute method.
- *
- * PluginManager.exec can be used either synchronously or async. In either case, a JSON encoded
- * string is returned that will indicate if any errors have occurred when trying to find
- * or execute the class denoted by the clazz argument.
- *
- * @param service String containing the service to run
- * @param action String containing the action that the class is supposed to perform. This is
- * passed to the plugin execute method and it is up to the plugin developer
- * how to deal with it.
- * @param callbackId String containing the id of the callback that is execute in JavaScript if
- * this is an async plugin call.
- * @param rawArgs An Array literal string containing any arguments needed in the
- * plugin execute method.
- * @return Whether the task completed synchronously.
- */
- public boolean exec(String service, String action, String callbackId, String rawArgs) {
- CordovaPlugin plugin = this.getPlugin(service);
- if (plugin == null) {
- Log.d(TAG, "exec() call to unknown plugin: " + service);
- PluginResult cr = new PluginResult(PluginResult.Status.CLASS_NOT_FOUND_EXCEPTION);
- app.sendPluginResult(cr, callbackId);
- return true;
- }
- try {
- CallbackContext callbackContext = new CallbackContext(callbackId, app);
- boolean wasValidAction = plugin.execute(action, rawArgs, callbackContext);
- if (!wasValidAction) {
- PluginResult cr = new PluginResult(PluginResult.Status.INVALID_ACTION);
- app.sendPluginResult(cr, callbackId);
- return true;
- }
- return callbackContext.isFinished();
- } catch (JSONException e) {
- PluginResult cr = new PluginResult(PluginResult.Status.JSON_EXCEPTION);
- app.sendPluginResult(cr, callbackId);
- return true;
- }
- }
-
- @Deprecated
- public boolean exec(String service, String action, String callbackId, String jsonArgs, boolean async) {
- return exec(service, action, callbackId, jsonArgs);
- }
-
- /**
- * Get the plugin object that implements the service.
- * If the plugin object does not already exist, then create it.
- * If the service doesn't exist, then return null.
- *
- * @param service The name of the service.
- * @return CordovaPlugin or null
- */
- public CordovaPlugin getPlugin(String service) {
- PluginEntry entry = this.entries.get(service);
- if (entry == null) {
- return null;
- }
- CordovaPlugin plugin = entry.plugin;
- if (plugin == null) {
- plugin = entry.createPlugin(this.app, this.ctx);
- }
- return plugin;
- }
-
- /**
- * Add a plugin class that implements a service to the service entry table.
- * This does not create the plugin object instance.
- *
- * @param service The service name
- * @param className The plugin class name
- */
- public void addService(String service, String className) {
- PluginEntry entry = new PluginEntry(service, className, false);
- this.addService(entry);
- }
-
- /**
- * Add a plugin class that implements a service to the service entry table.
- * This does not create the plugin object instance.
- *
- * @param entry The plugin entry
- */
- public void addService(PluginEntry entry) {
- this.entries.put(entry.service, entry);
- }
-
- /**
- * Called when the system is about to start resuming a previous activity.
- *
- * @param multitasking Flag indicating if multitasking is turned on for app
- */
- public void onPause(boolean multitasking) {
- for (PluginEntry entry : this.entries.values()) {
- if (entry.plugin != null) {
- entry.plugin.onPause(multitasking);
- }
- }
- }
-
- /**
- * Called when the activity will start interacting with the user.
- *
- * @param multitasking Flag indicating if multitasking is turned on for app
- */
- public void onResume(boolean multitasking) {
- for (PluginEntry entry : this.entries.values()) {
- if (entry.plugin != null) {
- entry.plugin.onResume(multitasking);
- }
- }
- }
-
- /**
- * The final call you receive before your activity is destroyed.
- */
- public void onDestroy() {
- for (PluginEntry entry : this.entries.values()) {
- if (entry.plugin != null) {
- entry.plugin.onDestroy();
- }
- }
- }
-
- /**
- * Send a message to all plugins.
- *
- * @param id The message id
- * @param data The message data
- * @return
- */
- public Object postMessage(String id, Object data) {
- Object obj = this.ctx.onMessage(id, data);
- if (obj != null) {
- return obj;
- }
- for (PluginEntry entry : this.entries.values()) {
- if (entry.plugin != null) {
- obj = entry.plugin.onMessage(id, data);
- if (obj != null) {
- return obj;
- }
- }
- }
- return null;
- }
-
- /**
- * Called when the activity receives a new intent.
- */
- public void onNewIntent(Intent intent) {
- for (PluginEntry entry : this.entries.values()) {
- if (entry.plugin != null) {
- entry.plugin.onNewIntent(intent);
- }
- }
- }
-
- /**
- * Called when the URL of the webview changes.
- *
- * @param url The URL that is being changed to.
- * @return Return false to allow the URL to load, return true to prevent the URL from loading.
- */
- public boolean onOverrideUrlLoading(String url) {
- Iterator<Entry<String, String>> it = this.urlMap.entrySet().iterator();
- while (it.hasNext()) {
- HashMap.Entry<String, String> pairs = it.next();
- if (url.startsWith(pairs.getKey())) {
- return this.getPlugin(pairs.getValue()).onOverrideUrlLoading(url);
- }
- }
- return false;
- }
-
- /**
- * Called when the WebView is loading any resource, top-level or not.
- *
- * Uses the same url-filter tag as onOverrideUrlLoading.
- *
- * @param url The URL of the resource to be loaded.
- * @return Return a WebResourceResponse with the resource, or null if the WebView should handle it.
- */
- public WebResourceResponse shouldInterceptRequest(String url) {
- Iterator<Entry<String, String>> it = this.urlMap.entrySet().iterator();
- while (it.hasNext()) {
- HashMap.Entry<String, String> pairs = it.next();
- if (url.startsWith(pairs.getKey())) {
- return this.getPlugin(pairs.getValue()).shouldInterceptRequest(url);
- }
- }
- return null;
- }
-
- /**
- * Called when the app navigates or refreshes.
- */
- public void onReset() {
- Iterator<PluginEntry> it = this.entries.values().iterator();
- while (it.hasNext()) {
- CordovaPlugin plugin = it.next().plugin;
- if (plugin != null) {
- plugin.onReset();
- }
- }
- }
-
-
- private void pluginConfigurationMissing() {
- LOG.e(TAG, "=====================================================================================");
- LOG.e(TAG, "ERROR: plugin.xml is missing. Add res/xml/plugins.xml to your project.");
- LOG.e(TAG, "https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/res/xml/plugins.xml");
- LOG.e(TAG, "=====================================================================================");
- }
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/framework/src/org/apache/cordova/api/PluginResult.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/src/org/apache/cordova/api/PluginResult.java b/lib/cordova-android/framework/src/org/apache/cordova/api/PluginResult.java
deleted file mode 100755
index a642200..0000000
--- a/lib/cordova-android/framework/src/org/apache/cordova/api/PluginResult.java
+++ /dev/null
@@ -1,179 +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 org.json.JSONArray;
-import org.json.JSONObject;
-
-import android.util.Base64;
-
-public class PluginResult {
- private final int status;
- private final int messageType;
- private boolean keepCallback = false;
- private String strMessage;
- private String encodedMessage;
-
- public PluginResult(Status status) {
- this(status, PluginResult.StatusMessages[status.ordinal()]);
- }
-
- public PluginResult(Status status, String message) {
- this.status = status.ordinal();
- this.messageType = message == null ? MESSAGE_TYPE_NULL : MESSAGE_TYPE_STRING;
- this.strMessage = message;
- }
-
- public PluginResult(Status status, JSONArray message) {
- this.status = status.ordinal();
- this.messageType = MESSAGE_TYPE_JSON;
- encodedMessage = message.toString();
- }
-
- public PluginResult(Status status, JSONObject message) {
- this.status = status.ordinal();
- this.messageType = MESSAGE_TYPE_JSON;
- encodedMessage = message.toString();
- }
-
- public PluginResult(Status status, int i) {
- this.status = status.ordinal();
- this.messageType = MESSAGE_TYPE_NUMBER;
- this.encodedMessage = ""+i;
- }
-
- public PluginResult(Status status, float f) {
- this.status = status.ordinal();
- this.messageType = MESSAGE_TYPE_NUMBER;
- this.encodedMessage = ""+f;
- }
-
- public PluginResult(Status status, boolean b) {
- this.status = status.ordinal();
- this.messageType = MESSAGE_TYPE_BOOLEAN;
- this.encodedMessage = Boolean.toString(b);
- }
-
- public PluginResult(Status status, byte[] data) {
- this(status, data, false);
- }
-
- public PluginResult(Status status, byte[] data, boolean binaryString) {
- this.status = status.ordinal();
- this.messageType = binaryString ? MESSAGE_TYPE_BINARYSTRING : MESSAGE_TYPE_ARRAYBUFFER;
- this.encodedMessage = Base64.encodeToString(data, Base64.NO_WRAP);
- }
-
- public void setKeepCallback(boolean b) {
- this.keepCallback = b;
- }
-
- public int getStatus() {
- return status;
- }
-
- public int getMessageType() {
- return messageType;
- }
-
- public String getMessage() {
- if (encodedMessage == null) {
- encodedMessage = JSONObject.quote(strMessage);
- }
- return encodedMessage;
- }
-
- /**
- * If messageType == MESSAGE_TYPE_STRING, then returns the message string.
- * Otherwise, returns null.
- */
- public String getStrMessage() {
- return strMessage;
- }
-
- public boolean getKeepCallback() {
- return this.keepCallback;
- }
-
- @Deprecated // Use sendPluginResult instead of sendJavascript.
- public String getJSONString() {
- return "{\"status\":" + this.status + ",\"message\":" + this.getMessage() + ",\"keepCallback\":" + this.keepCallback + "}";
- }
-
- @Deprecated // Use sendPluginResult instead of sendJavascript.
- public String toCallbackString(String callbackId) {
- // If no result to be sent and keeping callback, then no need to sent back to JavaScript
- if ((status == PluginResult.Status.NO_RESULT.ordinal()) && keepCallback) {
- return null;
- }
-
- // Check the success (OK, NO_RESULT & !KEEP_CALLBACK)
- if ((status == PluginResult.Status.OK.ordinal()) || (status == PluginResult.Status.NO_RESULT.ordinal())) {
- return toSuccessCallbackString(callbackId);
- }
-
- return toErrorCallbackString(callbackId);
- }
-
- @Deprecated // Use sendPluginResult instead of sendJavascript.
- public String toSuccessCallbackString(String callbackId) {
- return "cordova.callbackSuccess('"+callbackId+"',"+this.getJSONString()+");";
- }
-
- @Deprecated // Use sendPluginResult instead of sendJavascript.
- public String toErrorCallbackString(String callbackId) {
- return "cordova.callbackError('"+callbackId+"', " + this.getJSONString()+ ");";
- }
-
- public static final int MESSAGE_TYPE_STRING = 1;
- public static final int MESSAGE_TYPE_JSON = 2;
- public static final int MESSAGE_TYPE_NUMBER = 3;
- public static final int MESSAGE_TYPE_BOOLEAN = 4;
- public static final int MESSAGE_TYPE_NULL = 5;
- public static final int MESSAGE_TYPE_ARRAYBUFFER = 6;
- // Use BINARYSTRING when your string may contain null characters.
- // This is required to work around a bug in the platform :(.
- public static final int MESSAGE_TYPE_BINARYSTRING = 7;
-
- public static String[] StatusMessages = new String[] {
- "No result",
- "OK",
- "Class not found",
- "Illegal access",
- "Instantiation error",
- "Malformed url",
- "IO error",
- "Invalid action",
- "JSON error",
- "Error"
- };
-
- public enum Status {
- NO_RESULT,
- OK,
- CLASS_NOT_FOUND_EXCEPTION,
- ILLEGAL_ACCESS_EXCEPTION,
- INSTANTIATION_EXCEPTION,
- MALFORMED_URL_EXCEPTION,
- IO_EXCEPTION,
- INVALID_ACTION,
- JSON_EXCEPTION,
- ERROR
- }
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/framework/src/org/apache/cordova/file/EncodingException.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/src/org/apache/cordova/file/EncodingException.java b/lib/cordova-android/framework/src/org/apache/cordova/file/EncodingException.java
deleted file mode 100644
index a32e18e..0000000
--- a/lib/cordova-android/framework/src/org/apache/cordova/file/EncodingException.java
+++ /dev/null
@@ -1,28 +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.file;
-
-public class EncodingException extends Exception {
-
- public EncodingException(String message) {
- super(message);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/framework/src/org/apache/cordova/file/FileExistsException.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/src/org/apache/cordova/file/FileExistsException.java b/lib/cordova-android/framework/src/org/apache/cordova/file/FileExistsException.java
deleted file mode 100644
index 18aa7ea..0000000
--- a/lib/cordova-android/framework/src/org/apache/cordova/file/FileExistsException.java
+++ /dev/null
@@ -1,28 +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.file;
-
-public class FileExistsException extends Exception {
-
- public FileExistsException(String msg) {
- super(msg);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/framework/src/org/apache/cordova/file/InvalidModificationException.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/src/org/apache/cordova/file/InvalidModificationException.java b/lib/cordova-android/framework/src/org/apache/cordova/file/InvalidModificationException.java
deleted file mode 100644
index aebab4d..0000000
--- a/lib/cordova-android/framework/src/org/apache/cordova/file/InvalidModificationException.java
+++ /dev/null
@@ -1,29 +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.file;
-
-public class InvalidModificationException extends Exception {
-
- public InvalidModificationException(String message) {
- super(message);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/framework/src/org/apache/cordova/file/NoModificationAllowedException.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/src/org/apache/cordova/file/NoModificationAllowedException.java b/lib/cordova-android/framework/src/org/apache/cordova/file/NoModificationAllowedException.java
deleted file mode 100644
index 8cae115..0000000
--- a/lib/cordova-android/framework/src/org/apache/cordova/file/NoModificationAllowedException.java
+++ /dev/null
@@ -1,28 +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.file;
-
-public class NoModificationAllowedException extends Exception {
-
- public NoModificationAllowedException(String message) {
- super(message);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/framework/src/org/apache/cordova/file/TypeMismatchException.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/src/org/apache/cordova/file/TypeMismatchException.java b/lib/cordova-android/framework/src/org/apache/cordova/file/TypeMismatchException.java
deleted file mode 100644
index 0ea5993..0000000
--- a/lib/cordova-android/framework/src/org/apache/cordova/file/TypeMismatchException.java
+++ /dev/null
@@ -1,29 +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.file;
-
-public class TypeMismatchException extends Exception {
-
- public TypeMismatchException(String message) {
- super(message);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/framework/test/org/apache/cordova/PreferenceNodeTest.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/test/org/apache/cordova/PreferenceNodeTest.java b/lib/cordova-android/framework/test/org/apache/cordova/PreferenceNodeTest.java
deleted file mode 100644
index 0dea62a..0000000
--- a/lib/cordova-android/framework/test/org/apache/cordova/PreferenceNodeTest.java
+++ /dev/null
@@ -1,53 +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.
-*/
-import org.junit.*;
-import static org.junit.Assert.*;
-
-import org.apache.cordova.PreferenceNode;
-
-public class PreferenceNodeTest {
- @Test
- public void testConstructor() {
- PreferenceNode foo = new org.apache.cordova.PreferenceNode("fullscreen", "false", false);
- assertEquals("fullscreen", foo.name);
- assertEquals("false", foo.value);
- assertEquals(false, foo.readonly);
- }
-
- @Test
- public void testNameAssignment() {
- PreferenceNode foo = new org.apache.cordova.PreferenceNode("fullscreen", "false", false);
- foo.name = "widescreen";
- assertEquals("widescreen", foo.name);
- }
-
- @Test
- public void testValueAssignment() {
- PreferenceNode foo = new org.apache.cordova.PreferenceNode("fullscreen", "false", false);
- foo.value = "maybe";
- assertEquals("maybe", foo.value);
- }
-
- @Test
- public void testReadonlyAssignment() {
- PreferenceNode foo = new org.apache.cordova.PreferenceNode("fullscreen", "false", false);
- foo.readonly = true;
- assertEquals(true, foo.readonly);
- }
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/framework/test/org/apache/cordova/PreferenceSetTest.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/test/org/apache/cordova/PreferenceSetTest.java b/lib/cordova-android/framework/test/org/apache/cordova/PreferenceSetTest.java
deleted file mode 100644
index ea915f9..0000000
--- a/lib/cordova-android/framework/test/org/apache/cordova/PreferenceSetTest.java
+++ /dev/null
@@ -1,73 +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.
-*/
-import org.junit.*;
-import static org.junit.Assert.*;
-
-import org.apache.cordova.PreferenceNode;
-import org.apache.cordova.PreferenceSet;
-
-public class PreferenceSetTest {
- private PreferenceSet preferences;
- private PreferenceNode screen;
-
- @Before
- public void setUp() {
- preferences = new PreferenceSet();
- screen = new PreferenceNode("fullscreen", "true", false);
- }
-
- @Test
- public void testAddition() {
- preferences.add(screen);
- assertEquals(1, preferences.size());
- }
-
- @Test
- public void testClear() {
- preferences.add(screen);
- preferences.clear();
- assertEquals(0, preferences.size());
- }
-
- @Test
- public void testPreferenceRetrieval() {
- preferences.add(screen);
- assertEquals("true", preferences.pref("fullscreen"));
- }
-
- @Test
- public void testNoPreferenceRetrieval() {
- // return null if the preference is not defined
- assertEquals(null, preferences.pref("antigravity"));
- }
-
- @Test
- public void testUnsetPreferenceChecking() {
- PreferenceSet emptySet = new PreferenceSet();
- boolean value = emptySet.prefMatches("fullscreen", "true");
- assertEquals(false, value);
- }
-
- @Test
- public void testSetPreferenceChecking() {
- preferences.add(screen);
- boolean value = preferences.prefMatches("fullscreen", "true");
- assertEquals(true, value);
- }
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/test/.classpath
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/.classpath b/lib/cordova-android/test/.classpath
deleted file mode 100644
index a4763d1..0000000
--- a/lib/cordova-android/test/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="gen"/>
- <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
- <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
- <classpathentry kind="output" path="bin/classes"/>
-</classpath>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/test/.project
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/.project b/lib/cordova-android/test/.project
deleted file mode 100644
index 7bacb6f..0000000
--- a/lib/cordova-android/test/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>CordovaViewTestActivity</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ApkBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/test/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/AndroidManifest.xml b/lib/cordova-android/test/AndroidManifest.xml
deleted file mode 100755
index f6c840e..0000000
--- a/lib/cordova-android/test/AndroidManifest.xml
+++ /dev/null
@@ -1,269 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- 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.
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
- package="org.apache.cordova.test" android:versionName="1.0" android:versionCode="1">
- <supports-screens
- android:largeScreens="true"
- android:normalScreens="true"
- android:smallScreens="true"
- android:xlargeScreens="true"
- android:resizeable="true"
- android:anyDensity="true"
- />
-
- <uses-permission android:name="android.permission.VIBRATE" />
- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
- <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.READ_PHONE_STATE" />
- <uses-permission android:name="android.permission.RECEIVE_SMS" />
- <uses-permission android:name="android.permission.RECORD_AUDIO" />
- <uses-permission android:name="android.permission.RECORD_VIDEO"/>
- <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
- <uses-permission android:name="android.permission.READ_CONTACTS" />
- <uses-permission android:name="android.permission.WRITE_CONTACTS" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <uses-permission android:name="android.permission.GET_ACCOUNTS" />
- <uses-permission android:name="android.permission.BROADCAST_STICKY" />
-
- <uses-sdk android:minSdkVersion="7" />
-
- <instrumentation
- android:name="android.test.InstrumentationTestRunner"
- android:targetPackage="org.apache.cordova.test" />
-
- <application
- android:icon="@drawable/icon"
- android:label="@string/app_name" >
- <uses-library android:name="android.test.runner" />
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.CordovaWebViewTestActivity" >
- <intent-filter >
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.backbbuttonmultipage" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.background" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.basicauth" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.CordovaActivity" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.CordovaDriverAction" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.errorurl" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.fullscreen" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.htmlnotfound" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.iframe" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.jqmtabbackbutton" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.lifecycle" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.loading" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.menus" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.splashscreen" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.tests" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.timeout" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.userwebview" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.whitelist" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.xhr" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- <activity
- android:windowSoftInputMode="adjustPan"
- android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden"
- android:name=".actions.backbuttonmultipage" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.SAMPLE_CODE" />
- </intent-filter>
- </activity>
- </application>
-</manifest>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/test/README.md
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/README.md b/lib/cordova-android/test/README.md
deleted file mode 100755
index 5d86720..0000000
--- a/lib/cordova-android/test/README.md
+++ /dev/null
@@ -1,50 +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.
-#
--->
-# Android Native Tests #
-
-These tests are designed to verify Android native features and other Android specific features.
-
-## Initial Setup ##
-
-Before running the tests, they need to be set up.
-
-0. Copy cordova-x.y.z.jar into libs directory
-
-To run from command line:
-
-0. Build by entering `ant debug install`
-0. Run tests by clicking on "CordovaTest" icon on device
-
-To run from Eclipse:
-
-0. Import Android project into Eclipse
-0. Ensure Project properties "Java Build Path" includes the lib/cordova-x.y.z.jar
-0. Create run configuration if not already created
-0. Run tests
-
-## Automatic Runs ##
-
-Once you have installed the test, you can launch and run the tests
-automatically with the below command:
-
- adb shell am instrument -w org.apache.cordova.test/android.test.InstrumentationTestRunner
-
-(Optionally, you can also run in Eclipse)
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/test/ant.properties
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/ant.properties b/lib/cordova-android/test/ant.properties
deleted file mode 100755
index ee52d86..0000000
--- a/lib/cordova-android/test/ant.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# This file is used to override default values used by the Ant build system.
-#
-# This file must be checked in Version Control Systems, as it is
-# integral to the build system of your project.
-
-# This file is only used by the Ant script.
-
-# You can use this to override default values such as
-# 'source.dir' for the location of your java source folder and
-# 'out.dir' for the location of your output folder.
-
-# You can also use it define how the release builds are signed by declaring
-# the following properties:
-# 'key.store' for the location of your keystore and
-# 'key.alias' for the name of the key to use.
-# The password will be asked during the build when you use the 'release' target.
-
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/test/assets/www/backbuttonmultipage/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/backbuttonmultipage/index.html b/lib/cordova-android/test/assets/www/backbuttonmultipage/index.html
deleted file mode 100755
index afab731..0000000
--- a/lib/cordova-android/test/assets/www/backbuttonmultipage/index.html
+++ /dev/null
@@ -1,41 +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.$
--->
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>Backbutton</title>
-<link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
-<script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
-<script type="text/javascript" charset="utf-8" src="../main.js"></script>
-
-<body onload="init();" id="stage" class="theme">
- <h1>Cordova Android Tests</h1>
- <div id="info">
- <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
- <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
- <h4>Width: <span id="width"> </span>, Height: <span id="height"> </span>, Color Depth: <span id="colorDepth"></span></h4>
- </div>
- <div id="info">
- <h4>Page 1</h4>
- Go to next page.<br>
- If returning from previous page, press "backbutton". You should exit this app.
- </div>
- <a href="sample2.html" class="btn large">Next page</a>
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/test/assets/www/backbuttonmultipage/sample2.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/backbuttonmultipage/sample2.html b/lib/cordova-android/test/assets/www/backbuttonmultipage/sample2.html
deleted file mode 100755
index 397ac70..0000000
--- a/lib/cordova-android/test/assets/www/backbuttonmultipage/sample2.html
+++ /dev/null
@@ -1,41 +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.$
--->
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>Backbutton</title>
-<link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
-<script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
-<script type="text/javascript" charset="utf-8" src="../main.js"></script>
-
-<body onload="init();" id="stage" class="theme">
- <h1>Cordova Android Tests</h1>
- <div id="info">
- <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
- <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
- <h4>Width: <span id="width"> </span>, Height: <span id="height"> </span>, Color Depth: <span id="colorDepth"></span></h4>
- </div>
- <div id="info">
- <h4>Page 2</h4>
- Go to next page.<br>
- If returning from previous page, press "backbutton". You should go to Page 1.
- </div>
- <a href="sample3.html" class="btn large">Next page</a>
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/test/assets/www/backbuttonmultipage/sample3.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/backbuttonmultipage/sample3.html b/lib/cordova-android/test/assets/www/backbuttonmultipage/sample3.html
deleted file mode 100755
index f4b1f8a..0000000
--- a/lib/cordova-android/test/assets/www/backbuttonmultipage/sample3.html
+++ /dev/null
@@ -1,43 +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.$
--->
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>Backbutton</title>
-<link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
-<script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
-<script type="text/javascript" charset="utf-8" src="../main.js"></script>
-
-<body onload="init();" id="stage" class="theme">
- <h1>Cordova Android Tests</h1>
- <div id="info">
- <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
- <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
- <h4>Width: <span id="width"> </span>, Height: <span id="height"> </span>, Color Depth: <span id="colorDepth"></span></h4>
- </div>
- <div id="info">
- <h4>Page 3</h4>
- Press the 3 buttons below. You should stay on same page.<br>
- Press "backbutton" 4 times. This will go back to #test3, #test2, #test1, then return to previous Page 2.<br>
- </div>
- <a href="sample3.html#test1" class="btn large">page3#test1</a>
- <a href="sample3.html#test2" class="btn large">page3#test2</a>
- <a href="sample3.html#test3" class="btn large">page3#test3</a>
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/test/assets/www/background/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/background/index.html b/lib/cordova-android/test/assets/www/background/index.html
deleted file mode 100755
index 2a073a6..0000000
--- a/lib/cordova-android/test/assets/www/background/index.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<!DOCTYPE HTML>
-<!--
- 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.$
--->
-<html>
-<head>
-<head>
-<meta http-equiv="Content-type" content="text/html; charset=utf-8">
-<title>Background Page 1</title>
-<link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
-<script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
-
-<script type="text/javascript" charset="utf-8">
-
- function onLoad() {
- console.log("Page1: onload");
- log("Page1: onload @ " + new Date().toLocaleTimeString());
- document.addEventListener("deviceready", onDeviceReady, false);
- }
-
- function onUnLoaded() {
- console.log("Page1: onunload");
- log("Page1: onunload @ " + new Date().toLocaleTimeString());
- }
-
- function onDeviceReady() {
- // Register the event listener
- document.getElementById("platform").innerHTML = device.platform;
- document.getElementById("version").innerHTML = device.version;
- document.getElementById("uuid").innerHTML = device.uuid;
- document.getElementById("name").innerHTML = device.name;
- document.getElementById("width").innerHTML = screen.width;
- document.getElementById("height").innerHTML = screen.height;
- document.getElementById("colorDepth").innerHTML = screen.colorDepth;
-
- document.addEventListener("pause", onPause, false);
- document.addEventListener("resume", onResume, false);
-
- window.setInterval(function() {
- log("Page1: Running");
- }, 2000);
- }
-
- function onPause() {
- console.log("Page1: onpause");
- log("Page1: onpause @ " + new Date().toLocaleTimeString());
- }
-
- function onResume() {
- console.log("Page1: onresume");
- log("Page1: onresume @ " + new Date().toLocaleTimeString());
- }
-
- function log(s) {
- var el = document.getElementById('status');
- var status = el.innerHTML + s + "<br>";
- el.innerHTML = status;
- localStorage.backgroundstatus = status;
- }
-
- function clearStatus() {
- console.log("clear()");
- localStorage.backgroundstatus = "";
- document.getElementById('status').innerHTML = "";
- }
-
-</script>
-</head>
-<body onload="onLoad()" onunload="onUnLoaded()" id="stage" class="theme">
- <h1>Events</h1>
- <div id="info">
- <h4>
- Platform: <span id="platform"> </span>, Version: <span
- id="version"> </span>
- </h4>
- <h4>
- UUID: <span id="uuid"> </span>, Name: <span id="name"> </span>
- </h4>
- <h4>
- Width: <span id="width"> </span>, Height: <span id="height">
- </span>, Color Depth: <span id="colorDepth"></span>
- </h4>
- </div>
- <div id="info">
- Press "Home" button, then return to this app to see pause/resume.<br>
- There shouldn't be any "Running" entries between pause and resume.<br>
- </div>
- <div id="info">
- <h4>Info for event testing:</h4>
- <div id="status"></div>
- </div>
-
- <!-- a href="index2.html" class="btn large" >Load new page</a -->
- <a href="javascript:" class="btn large" onclick="clearStatus();">Clear status</a>
-
- <script>
- document.getElementById('status').innerHTML = localStorage.backgroundstatus;
- </script>
-</body>
-</html>
-
-
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/test/assets/www/background/index2.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/background/index2.html b/lib/cordova-android/test/assets/www/background/index2.html
deleted file mode 100755
index addf6eb..0000000
--- a/lib/cordova-android/test/assets/www/background/index2.html
+++ /dev/null
@@ -1,116 +0,0 @@
-<!DOCTYPE HTML>
-<!--
- 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.$
--->
-<html>
-<head>
-<head>
-<meta http-equiv="Content-type" content="text/html; charset=utf-8">
-<title>Background Page 2</title>
-<link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
-<script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
-
-<script type="text/javascript" charset="utf-8">
-
- function onLoad() {
- console.log("Page2: onload");
- log("Page2: onload @ " + new Date().toLocaleTimeString());
- document.addEventListener("deviceready", onDeviceReady, false);
- }
-
- function onUnLoaded() {
- console.log("Page2: onunload");
- log("Page2: onunload @ " + new Date().toLocaleTimeString());
- }
-
- function onDeviceReady() {
- // Register the event listener
- document.getElementById("platform").innerHTML = device.platform;
- document.getElementById("version").innerHTML = device.version;
- document.getElementById("uuid").innerHTML = device.uuid;
- document.getElementById("name").innerHTML = device.name;
- document.getElementById("width").innerHTML = screen.width;
- document.getElementById("height").innerHTML = screen.height;
- document.getElementById("colorDepth").innerHTML = screen.colorDepth;
-
- document.addEventListener("pause", onPause, false);
- document.addEventListener("resume", onResume, false);
-
- window.setInterval(function() {
- log("Page2: Running");
- }, 2000);
-}
-
- function onPause() {
- console.log("Page2: onpause");
- log("Page2: onpause @ " + new Date().toLocaleTimeString());
- }
-
- function onResume() {
- console.log("Page2: onresume");
- log("Page2: onresume @ " + new Date().toLocaleTimeString());
- }
-
- function log(s) {
- var el = document.getElementById('status');
- var status = el.innerHTML + s + "<br>";
- el.innerHTML = status;
- localStorage.backgroundstatus = status;
- }
-
- function clearStatus() {
- console.log("clear()");
- localStorage.backgroundstatus = "";
- document.getElementById('status').innerHTML = "";
- }
-
-</script>
-</head>
-<body onload="onLoad()" onunload="onUnLoaded()" id="stage" class="theme">
- <h1>Events</h1>
- <div id="info">
- <h4>
- Platform: <span id="platform"> </span>, Version: <span
- id="version"> </span>
- </h4>
- <h4>
- UUID: <span id="uuid"> </span>, Name: <span id="name"> </span>
- </h4>
- <h4>
- Width: <span id="width"> </span>, Height: <span id="height">
- </span>, Color Depth: <span id="colorDepth"></span>
- </h4>
- </div>
- <div id="info">
- <h4>Press "Back" button to return to Page 1.</h4>
- </div>
- <div id="info">
- <h4>Info for event testing:</h4>
- <div id="status"></div>
- </div>
-
- <a href="index.html" class="btn large" >Load new page</a>
- <a href="javascript:" class="btn large" onclick="clearStatus();">Clear status</a>
-
- <script>
- document.getElementById('status').innerHTML = localStorage.backgroundstatus;
- </script>
-</body>
-</html>
-
-
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/test/assets/www/backgroundcolor/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/backgroundcolor/index.html b/lib/cordova-android/test/assets/www/backgroundcolor/index.html
deleted file mode 100755
index 0746dcf..0000000
--- a/lib/cordova-android/test/assets/www/backgroundcolor/index.html
+++ /dev/null
@@ -1,41 +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.
--->
-<!DOCTYPE HTML>
-<html>
- <head>
- <meta name="viewport" content="width=320; user-scalable=no" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
- <title>Cordova Tests</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
- <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
- <script type="text/javascript" charset="utf-8" src="../main.js"></script>
- </head>
- <body onload="init();" id="stage" class="theme">
- <h1>Background Color Test</h1>
- <div id="info">
- <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
- <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
- <h4>Width: <span id="width"> </span>, Height: <span id="height">
- </span>, Color Depth: <span id="colorDepth"></span></h4>
- </div>
- <div id="info">
- Before this page was show, you should have seen the background flash green.</br>
- </div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/91c74886/lib/cordova-android/test/assets/www/basicauth/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/basicauth/index.html b/lib/cordova-android/test/assets/www/basicauth/index.html
deleted file mode 100755
index 02ff0b2..0000000
--- a/lib/cordova-android/test/assets/www/basicauth/index.html
+++ /dev/null
@@ -1,42 +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.
--->
-<!DOCTYPE HTML>
-<html>
- <head>
- <meta name="viewport" content="width=320; user-scalable=no" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
- <title>Cordova Tests</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
- <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
- <script type="text/javascript" charset="utf-8" src="../main.js"></script>
- </head>
- <body onload="init();" id="stage" class="theme">
- <h1>Basic Auth</h1>
- <div id="info">
- <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
- <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
- <h4>Width: <span id="width"> </span>, Height: <span id="height">
- </span>, Color Depth: <span id="colorDepth"></span></h4>
- </div>
- <div id="info">
- Loading link below should be successful and show page indicating username=test & password=test. <br>
- </div>
- <a href="http://browserspy.dk/password-ok.php" class="btn large">Test password</a>
- </body>
-</html>