mirror of
https://github.com/apache/cordova-android.git
synced 2025-04-24 18:30:12 +08:00
Merge commit with master, we need to kill all tabs
This commit is contained in:
commit
8b93e87e3e
@ -23,7 +23,7 @@
|
|||||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||||
<title>PhoneGap</title>
|
<title>PhoneGap</title>
|
||||||
<link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title">
|
<link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title">
|
||||||
<script type="text/javascript" charset="utf-8" src="cordova-1.7.0.js"></script>
|
<script type="text/javascript" charset="utf-8" src="cordova-1.8.0rc1.js"></script>
|
||||||
<script type="text/javascript" charset="utf-8" src="main.js"></script>
|
<script type="text/javascript" charset="utf-8" src="main.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// commit 68eebbca4a3691fed773d7599dd77c0030beabe6
|
// commit 95f199e1c207dc89b84e79a9a7b27d6a3cc8fe14
|
||||||
|
|
||||||
// File generated at :: Thu May 24 2012 09:30:21 GMT-0700 (PDT)
|
// File generated at :: Thu May 24 2012 21:36:17 GMT-0400 (EDT)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Licensed to the Apache Software Foundation (ASF) under one
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
@ -5380,10 +5380,16 @@ module.exports = function(uri, successCallback, errorCallback) {
|
|||||||
errorCallback(new FileError(error));
|
errorCallback(new FileError(error));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// sanity check for 'not:valid:filename'
|
||||||
|
if(!uri || uri.split(":").length > 2) {
|
||||||
|
setTimeout( function() {
|
||||||
|
fail(FileError.ENCODING_ERR);
|
||||||
|
},0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
// if successful, return either a file or directory entry
|
// if successful, return either a file or directory entry
|
||||||
var success = function(entry) {
|
var success = function(entry) {
|
||||||
var result;
|
var result;
|
||||||
|
|
||||||
if (entry) {
|
if (entry) {
|
||||||
if (typeof successCallback === 'function') {
|
if (typeof successCallback === 'function') {
|
||||||
// create appropriate Entry object
|
// create appropriate Entry object
|
||||||
@ -5420,6 +5426,68 @@ var splashscreen = {
|
|||||||
module.exports = splashscreen;
|
module.exports = splashscreen;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// file: lib/common/plugin/widget.js
|
||||||
|
define("cordova/plugin/widget", function(require, exports, module) {
|
||||||
|
var exec = require('cordova/exec'),
|
||||||
|
cordova = require('cordova'),
|
||||||
|
channel = require('cordova/channel');
|
||||||
|
|
||||||
|
var Widget = function () {
|
||||||
|
this.author = null;
|
||||||
|
this.description = null;
|
||||||
|
this.name = null;
|
||||||
|
this.shortName = null;
|
||||||
|
this.version = null;
|
||||||
|
this.id = null;
|
||||||
|
this.authorEmail = null;
|
||||||
|
this.authorHref = null;
|
||||||
|
this._firstRun = true;
|
||||||
|
|
||||||
|
var me = this;
|
||||||
|
|
||||||
|
channel.onCordovaReady.subscribeOnce(function() {
|
||||||
|
me.getInfo(function (info) {
|
||||||
|
me.author = info.author;
|
||||||
|
me.description = info.description;
|
||||||
|
me.name = info.name;
|
||||||
|
me.shortName = info.shortName;
|
||||||
|
me.version = info.version;
|
||||||
|
me.id = info.id;
|
||||||
|
me.authorEmail = info.authorEmail;
|
||||||
|
me.authorHref = info.authorHref;
|
||||||
|
|
||||||
|
// should only fire this once
|
||||||
|
if (me._firstRun) {
|
||||||
|
me._firstRun = false;
|
||||||
|
channel.onCordovaAppInfoReady.fire();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
function (e) {
|
||||||
|
// If we can't get the network info we should still tell Cordova
|
||||||
|
// to fire the deviceready event.
|
||||||
|
if (me._firstRun) {
|
||||||
|
me._firstRun = false;
|
||||||
|
channel.onCordovaAppInfoReady.fire();
|
||||||
|
}
|
||||||
|
console.log("Error initializing Widget: " + e);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get connection info
|
||||||
|
*
|
||||||
|
* @param {Function} successCallback The function to call when the Connection data is available
|
||||||
|
* @param {Function} errorCallback The function to call when there is an error getting the Connection data. (OPTIONAL)
|
||||||
|
*/
|
||||||
|
Widget.prototype.getInfo = function (successCallback, errorCallback) {
|
||||||
|
// Get info
|
||||||
|
exec(successCallback, errorCallback, "Widget", "getApplicationInfo", []);
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = new Widget();
|
||||||
|
});
|
||||||
|
|
||||||
// file: lib/common/utils.js
|
// file: lib/common/utils.js
|
||||||
define("cordova/utils", function(require, exports, module) {
|
define("cordova/utils", function(require, exports, module) {
|
||||||
var utils = exports;
|
var utils = exports;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title></title>
|
<title></title>
|
||||||
<script src="cordova-1.7.0.js"></script>
|
<script src="cordova-1.8.0rc1.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -275,7 +275,9 @@ public class CameraLauncher extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Bitmap.createScaledBitmap(bitmap, newWidth, newHeight, true);
|
Bitmap retval = Bitmap.createScaledBitmap(bitmap, newWidth, newHeight, true);
|
||||||
|
bitmap.recycle();
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,7 +38,7 @@ import android.telephony.TelephonyManager;
|
|||||||
public class Device extends Plugin {
|
public class Device extends Plugin {
|
||||||
public static final String TAG = "Device";
|
public static final String TAG = "Device";
|
||||||
|
|
||||||
public static String cordovaVersion = "1.7.0"; // Cordova version
|
public static String cordovaVersion = "1.8.0rc1"; // Cordova version
|
||||||
public static String platform = "Android"; // Device OS
|
public static String platform = "Android"; // Device OS
|
||||||
public static String uuid; // Device UUID
|
public static String uuid; // Device UUID
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ public class Storage extends Plugin {
|
|||||||
|
|
||||||
// If no database path, generate from application package
|
// If no database path, generate from application package
|
||||||
if (this.path == null) {
|
if (this.path == null) {
|
||||||
this.path = this.ctx.getActivity().getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath();
|
this.path = this.ctx.getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dbName = this.path + File.pathSeparator + db + ".db";
|
this.dbName = this.path + File.pathSeparator + db + ".db";
|
||||||
@ -169,12 +169,13 @@ public class Storage extends Plugin {
|
|||||||
this.processResults(myCursor, tx_id);
|
this.processResults(myCursor, tx_id);
|
||||||
myCursor.close();
|
myCursor.close();
|
||||||
}
|
}
|
||||||
} catch (SQLiteException ex) {
|
}
|
||||||
|
catch (SQLiteException ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
System.out.println("Storage.executeSql(): Error=" + ex.getMessage());
|
System.out.println("Storage.executeSql(): Error=" + ex.getMessage());
|
||||||
|
|
||||||
// Send error message back to JavaScript
|
// Send error message back to JavaScript
|
||||||
this.sendJavascript("cordova.require('cordova/plugin/android/storage').fail('" + ex.getMessage() + "','" + tx_id + "');");
|
this.sendJavascript("cordova.require('cordova/plugin/android/storage').failQuery('" + ex.getMessage() + "','" + tx_id + "');");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user