mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +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">
|
||||
<title>PhoneGap</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>
|
||||
|
||||
</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
|
||||
@ -5380,10 +5380,16 @@ module.exports = function(uri, successCallback, errorCallback) {
|
||||
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
|
||||
var success = function(entry) {
|
||||
var result;
|
||||
|
||||
if (entry) {
|
||||
if (typeof successCallback === 'function') {
|
||||
// create appropriate Entry object
|
||||
@ -5420,6 +5426,68 @@ var 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
|
||||
define("cordova/utils", function(require, exports, module) {
|
||||
var utils = exports;
|
||||
@ -5661,4 +5729,4 @@ window.cordova = require('cordova');
|
||||
}(window));
|
||||
|
||||
|
||||
})();
|
||||
})();
|
||||
|
@ -19,7 +19,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<script src="cordova-1.7.0.js"></script>
|
||||
<script src="cordova-1.8.0rc1.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -274,8 +274,10 @@ public class CameraLauncher extends Plugin {
|
||||
newWidth = (newHeight * origWidth) / origHeight;
|
||||
}
|
||||
}
|
||||
|
||||
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 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 uuid; // Device UUID
|
||||
|
||||
|
@ -42,7 +42,7 @@ public class Storage extends Plugin {
|
||||
private static final String CREATE = "create";
|
||||
private static final String DROP = "drop";
|
||||
private static final String TRUNCATE = "truncate";
|
||||
|
||||
|
||||
SQLiteDatabase myDb = null; // Database object
|
||||
String path = null; // Database path
|
||||
String dbName = null; // Database name
|
||||
@ -141,7 +141,7 @@ public class Storage extends Plugin {
|
||||
|
||||
// If no database path, generate from application package
|
||||
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";
|
||||
@ -163,18 +163,19 @@ public class Storage extends Plugin {
|
||||
if (isDDL(query)) {
|
||||
this.myDb.execSQL(query);
|
||||
this.sendJavascript("cordova.require('cordova/plugin/android/storage').completeQuery('" + tx_id + "', '');");
|
||||
}
|
||||
}
|
||||
else {
|
||||
Cursor myCursor = this.myDb.rawQuery(query, params);
|
||||
this.processResults(myCursor, tx_id);
|
||||
myCursor.close();
|
||||
}
|
||||
} catch (SQLiteException ex) {
|
||||
}
|
||||
catch (SQLiteException ex) {
|
||||
ex.printStackTrace();
|
||||
System.out.println("Storage.executeSql(): Error=" + ex.getMessage());
|
||||
|
||||
System.out.println("Storage.executeSql(): Error=" + ex.getMessage());
|
||||
|
||||
// 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…
Reference in New Issue
Block a user