Permalink
Browse files

Send correct download vs progress notifications

  • Loading branch information...
Dale Harvey
Dale Harvey committed Jun 16, 2011
1 parent 7eb1cdb commit f4ffed909813809c03faa6cd7bc2307052cc228c
Showing with 5 additions and 1 deletion.
  1. +1 −1 src/com/couchbase/libcouch/CouchInstaller.java
  2. +4 −0 src/com/couchbase/libcouch/CouchService.java
@@ -157,7 +157,7 @@ private static void installPackage(String baseUrl, String pkg, Handler handler)
Message progress = new Message();
progress.arg1 = (int) ++filesUnpacked;
progress.arg2 = (int) filesInArchive;
- progress.what = CouchService.PROGRESS;
+ progress.what = CouchService.DOWNLOAD;
handler.sendMessage(progress);
}
@@ -18,6 +18,7 @@
public final static int ERROR = 0;
public final static int PROGRESS = 1;
public final static int COMPLETE = 2;
+ public final static int DOWNLOAD = 7;
public final static int COUCH_STARTED = 5;
public final static int INSTALLING = 3;
@@ -38,6 +39,9 @@ public void handleMessage(Message msg) {
String stacktrace = sw.toString();
client.exit(stacktrace);
break;
+ case DOWNLOAD:
+ client.downloading(msg.arg1, msg.arg2);
+ break;
case PROGRESS:
client.installing(msg.arg1, msg.arg2);
break;

0 comments on commit f4ffed9

Please sign in to comment.