\r
import android.content.ContentProvider;\r
import android.content.ContentValues;\r
+import android.content.Intent;\r
import android.content.UriMatcher;\r
import android.database.Cursor;\r
import android.net.Uri;\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
+ if (CategoryList.isSignedIn()==false) {\r
+ Intent frontdoor = new Intent(getContext(), FrontDoor.class);\r
+ frontdoor.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r
+ getContext().startActivity(frontdoor); \r
+ throw new CryptoHelperException("Not logged in.");\r
+ }\r
+\r
if (ch == null) {\r
throw new CryptoHelperException("CryptoHelper not available. Are you logged in?");\r
}\r
} catch (IllegalArgumentException e) {\r
throw e;\r
} catch (CryptoHelperException e) {\r
- if (debug) Log.d(TAG,"openFile: CryptoHelperException");\r
+ if (debug) Log.d(TAG,"openFile: CryptoHelperException:"+e.getLocalizedMessage());\r
pfd = null;\r
//throw e;\r
}\r
Intent serviceIntent = new Intent();
serviceIntent.setClass(LogOffActivity.this, ServiceDispatchImpl.class );
stopService(serviceIntent);
+ CategoryList.setSignedOut();
/*
Intent intent = new Intent(LogOffActivity.this, FrontDoor.class);
// if there are still clients attached. Should be fixed.
import org.openintents.intents.CryptoIntents;
+import org.openintents.safe.CategoryList;
import org.openintents.safe.CryptoHelper;
import org.openintents.safe.CryptoHelperException;
Intent intent = new Intent(CryptoIntents.ACTION_CRYPTO_LOGGED_OUT);
sendBroadcast(intent);
+ CategoryList.setSignedOut();
if (debug) Log.d( TAG,"onDestroy" );
}