]> hydra-www.ietfng.org Git - android-vcpass-oisafe/commitdiff
OI Safe: Make crypto helper from ServiceDispatchImpl public static, instead of the...
authorpeli0101 <peli0101@72b678ce-9140-0410-bee8-679b907dd61a>
Wed, 8 Apr 2009 20:18:58 +0000 (20:18 +0000)
committerpeli0101 <peli0101@72b678ce-9140-0410-bee8-679b907dd61a>
Wed, 8 Apr 2009 20:18:58 +0000 (20:18 +0000)
git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@2021 72b678ce-9140-0410-bee8-679b907dd61a

src/org/openintents/safe/CryptoContentProvider.java
src/org/openintents/safe/IntentHandler.java
src/org/openintents/safe/service/ServiceDispatchImpl.java

index e9afe61163cb1d5d5a6dc0255f7b65abe4defec2..51f997f616184c7fb9f89db0a8f654d1c6f46a9f 100644 (file)
@@ -19,6 +19,8 @@ package org.openintents.safe;
 import java.io.File;\r
 import java.io.FileNotFoundException;\r
 \r
+import org.openintents.safe.service.ServiceDispatchImpl;\r
+\r
 import android.content.ContentProvider;\r
 import android.content.ContentValues;\r
 import android.content.UriMatcher;\r
@@ -133,7 +135,7 @@ public class CryptoContentProvider extends ContentProvider {
                                // TODO: Check that sessionKey is valid.\r
                                \r
                                // Decrypt file\r
-                               CryptoHelper ch = IntentHandler.ch; // Use the global crypto helper that is connected to the single service we have.\r
+                               CryptoHelper ch = ServiceDispatchImpl.ch; // Use the global crypto helper that is connected to the single service we have.\r
                                \r
                                Log.d(TAG, "Original file path: " + originalFile);\r
                                \r
index 0110db8242adf472d7dfa60340fddd7abaa38adb..1f1caf4003d3f0e052a838375cc459408099c70b 100644 (file)
@@ -57,8 +57,8 @@ public class IntentHandler extends Activity {
        \r
        private String salt;\r
        private String masterKey;\r
-       public static CryptoHelper ch; // TODO Peli: Could clean this up by moving it into a singleton? Or at least a separate static class?\r
-\r
+       private CryptoHelper ch;\r
+       \r
        // service elements\r
     private ServiceDispatch service;\r
     private ServiceDispatchConnection conn;\r
@@ -543,6 +543,7 @@ public class IntentHandler extends Activity {
                public void onServiceDisconnected(ComponentName className)\r
                {\r
                        service = null;\r
+                       \r
                        if (debug) Log.d( TAG,"onServiceDisconnected" );\r
                }\r
        };\r
index eccea2bd2e915154a997cabb74dbd58cf9fd3e07..0cf338116cd98e1aa18af6d970e6411df8350248 100644 (file)
@@ -37,7 +37,7 @@ import android.os.CountDownTimer;
 public class ServiceDispatchImpl extends Service {
        private static boolean debug = false;
        private static String TAG = "ServiceDispatchIMPL";
-       private CryptoHelper ch;
+       public static CryptoHelper ch;  // TODO Peli: Could clean this up by moving it into a singleton? Or at least a separate static class?
        private String salt;
        private String masterKey;
     private CountDownTimer t;