Adding Built-In Crypto Library

This commit is contained in:
Brock Whitten
2010-02-24 16:18:35 -08:00
parent c4ac7e5383
commit cb90852dfc
3 changed files with 138 additions and 3 deletions
+5 -3
View File
@@ -60,8 +60,7 @@ public class DroidGap extends Activity {
private NetworkManager netMan;
private CompassListener mCompass;
private Storage cupcakeStorage;
private CryptoHandler crypto;
/** Called when the activity is first created. */
@Override
@@ -134,7 +133,8 @@ public class DroidGap extends Activity {
mContacts = new ContactManager(this, appView);
fs = new FileUtils(appView);
netMan = new NetworkManager(this, appView);
mCompass = new CompassListener(this, appView);
mCompass = new CompassListener(this, appView);
crypto = new CryptoHandler(appView);
// This creates the new javascript interfaces for PhoneGap
appView.addJavascriptInterface(gap, "DroidGap");
@@ -145,6 +145,8 @@ public class DroidGap extends Activity {
appView.addJavascriptInterface(fs, "FileUtil");
appView.addJavascriptInterface(netMan, "NetworkManager");
appView.addJavascriptInterface(mCompass, "CompassHook");
appView.addJavascriptInterface(crypto, "GapCrypto");
if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.DONUT)
{
cupcakeStorage = new Storage(appView);