Permalink
Browse files

Tie libcouch to specific version of binaries

  • Loading branch information...
daleharvey committed Aug 13, 2011
1 parent 20d9d68 commit 720b79748e65df4aed7ad13c6e13f7ba3f8579e7
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Deleted file not rendered
@@ -9,6 +9,7 @@
public class CouchDB {
+ private final static String defaultRelease = "couchbase-1.0-dp-be9fe2f";
private static String releaseName;
private static ICouchService couchService;
@@ -35,11 +36,14 @@ public void onServiceDisconnected(ComponentName className) {
}
};
+ public static ServiceConnection getService(Context ctx, ICouchClient client) {
+ return getService(ctx, defaultRelease, client);
+ }
+
public static ServiceConnection getService(Context ctx, String release, ICouchClient client) {
releaseName = release;
couchClient = client;
ctx.bindService(new Intent(ctx, CouchService.class), mConnection, Context.BIND_AUTO_CREATE);
return mConnection;
}
-
}
@@ -1,5 +1,7 @@
package com.couchbase.libcouch;
+import java.io.FileNotFoundException;
+import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.URL;
@@ -125,7 +127,10 @@ void installCouch(final String pkg) {
public void run() {
try {
CouchInstaller.doInstall(pkg, mHandler, service);
- } catch (Exception e) {
+ } catch (FileNotFoundException e) {
+ Message.obtain(mHandler, CouchService.ERROR, e).sendToTarget();
+ e.printStackTrace();
+ } catch (IOException e) {
e.printStackTrace();
}
}

0 comments on commit 720b797

Please sign in to comment.