You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/10/21 19:00:25 UTC
[2/8] android commit: Undoing change to Math.random() for now,
this creates a weird bug
Undoing change to Math.random() for now, this creates a weird bug
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/16343ffe
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/16343ffe
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/16343ffe
Branch: refs/heads/4.0.x
Commit: 16343ffe7009dca68af77a53cebb90e76d6a9fe3
Parents: b37498d
Author: Joe Bowser <bo...@apache.org>
Authored: Fri Oct 17 13:52:33 2014 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Fri Oct 17 13:52:33 2014 -0700
----------------------------------------------------------------------
framework/src/org/apache/cordova/CordovaBridge.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/16343ffe/framework/src/org/apache/cordova/CordovaBridge.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaBridge.java b/framework/src/org/apache/cordova/CordovaBridge.java
index a6ebebb..c007db3 100644
--- a/framework/src/org/apache/cordova/CordovaBridge.java
+++ b/framework/src/org/apache/cordova/CordovaBridge.java
@@ -109,8 +109,7 @@ public class CordovaBridge {
/** Called by cordova.js to initialize the bridge. */
int generateBridgeSecret() {
- SecureRandom randGen = new SecureRandom();
- expectedBridgeSecret = (int)(randGen.nextInt() * Integer.MAX_VALUE);
+ expectedBridgeSecret = (int)(Math.random() * Integer.MAX_VALUE);
return expectedBridgeSecret;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org