incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [3/3] android commit: CB-472: FileWriter.seek(0) does not actually seek to the beginning of the file
Date Wed, 11 Apr 2012 18:45:26 GMT
CB-472: FileWriter.seek(0) does not actually seek to the beginning of the file


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

Branch: refs/heads/CordovaWebView
Commit: ac06892dec803f40c61f4dd5c1a43b71c04eb82e
Parents: 5e1997c
Author: macdonst <simon.macdonald@gmail.com>
Authored: Wed Apr 11 10:44:09 2012 -0400
Committer: macdonst <simon.macdonald@gmail.com>
Committed: Wed Apr 11 10:44:09 2012 -0400

----------------------------------------------------------------------
 framework/assets/js/cordova.android.js |   46 ++++++++++++++++++++++----
 1 files changed, 39 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/ac06892d/framework/assets/js/cordova.android.js
----------------------------------------------------------------------
diff --git a/framework/assets/js/cordova.android.js b/framework/assets/js/cordova.android.js
index d02b6f1..a9a6b23 100644
--- a/framework/assets/js/cordova.android.js
+++ b/framework/assets/js/cordova.android.js
@@ -1,4 +1,4 @@
-// File generated at :: Tue Apr 10 2012 11:22:35 GMT-0700 (PDT)
+// File generated at :: Wed Apr 11 2012 10:34:53 GMT-0400 (EDT)
 
 /*
  Licensed to the Apache Software Foundation (ASF) under one
@@ -416,7 +416,40 @@ module.exports = {
 // file: lib/common/channel.js
 define("cordova/channel", function(require, exports, module) {
 /**
- * Custom pub-sub channel that can have functions subscribed to it
+ * Custom pub-sub "channel" that can have functions subscribed to it
+ * This object is used to define and control firing of events for
+ * cordova initialization.
+ *
+ * The order of events during page load and Cordova startup is as follows:
+ *
+ * onDOMContentLoaded         Internal event that is received when the web page is loaded
and parsed.
+ * onNativeReady              Internal event that indicates the Cordova native side is ready.
+ * onCordovaReady             Internal event fired when all Cordova JavaScript objects have
been created.
+ * onCordovaInfoReady         Internal event fired when device properties are available.
+ * onCordovaConnectionReady   Internal event fired when the connection property has been
set.
+ * onDeviceReady              User event fired to indicate that Cordova is ready
+ * onResume                   User event fired to indicate a start/resume lifecycle event
+ * onPause                    User event fired to indicate a pause lifecycle event
+ * onDestroy                  Internal event fired when app is being destroyed (User should
use window.onunload event, not this one).
+ *
+ * The only Cordova events that user code should register for are:
+ *      deviceready           Cordova native code is initialized and Cordova APIs can be
called from JavaScript
+ *      pause                 App has moved to background
+ *      resume                App has returned to foreground
+ *
+ * Listeners can be registered as:
+ *      document.addEventListener("deviceready", myDeviceReadyListener, false);
+ *      document.addEventListener("resume", myResumeListener, false);
+ *      document.addEventListener("pause", myPauseListener, false);
+ *
+ * The DOM lifecycle events should be used for saving and restoring state
+ *      window.onload
+ *      window.onunload
+ *
+ */
+
+/**
+ * Channel
  * @constructor
  * @param type  String the channel name
  * @param opts  Object options to pass into the channel, currently
@@ -586,8 +619,7 @@ Channel.prototype.fire = function(e) {
     return true;
 };
 
-//HACK: defining them here so they are ready super fast!
-
+// defining them here so they are ready super fast!
 // DOM event that is received when the web page is loaded and parsed.
 channel.create('onDOMContentLoaded');
 
@@ -1044,11 +1076,11 @@ module.exports = {
 
 // file: lib/common/plugin/Acceleration.js
 define("cordova/plugin/Acceleration", function(require, exports, module) {
-var Acceleration = function(x, y, z) {
+var Acceleration = function(x, y, z, timestamp) {
   this.x = x;
   this.y = y;
   this.z = z;
-  this.timestamp = new Date().getTime();
+  this.timestamp = timestamp || (new Date()).getTime();
 };
 
 module.exports = Acceleration;
@@ -2739,7 +2771,7 @@ FileWriter.prototype.seek = function(offset) {
         throw new FileError(FileError.INVALID_STATE_ERR);
     }
 
-    if (!offset) {
+    if (!offset && offset != 0) {
         return;
     }
 


Mime
View raw message