diff options
author | Scott Main <smain@google.com> | 2012-07-03 16:25:52 -0700 |
---|---|---|
committer | Scott Main <smain@google.com> | 2012-07-03 18:08:19 -0700 |
commit | fd516987de29a48425da5ee5aace5be40adcc674 (patch) | |
tree | f657051084f11212b224dde22637d1e4d1ac0477 /docs/html/training/cloudsync | |
parent | 099fd80f984b8493de58bdda8ea05563261b0af2 (diff) | |
download | frameworks_base-fd516987de29a48425da5ee5aace5be40adcc674.zip frameworks_base-fd516987de29a48425da5ee5aace5be40adcc674.tar.gz frameworks_base-fd516987de29a48425da5ee5aace5be40adcc674.tar.bz2 |
docs: misc bugs from external tracker
Change-Id: I02d0d82c220401ac3a1ca180e8331a0f6dcd9e50
Diffstat (limited to 'docs/html/training/cloudsync')
-rw-r--r-- | docs/html/training/cloudsync/aesync.jd | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/docs/html/training/cloudsync/aesync.jd b/docs/html/training/cloudsync/aesync.jd index c60d28b..a21b429 100644 --- a/docs/html/training/cloudsync/aesync.jd +++ b/docs/html/training/cloudsync/aesync.jd @@ -224,8 +224,8 @@ public Task find(Long id) { PersistenceManager pm = PMF.get().getPersistenceManager(); try { Query query = pm.newQuery("select from " + Task.class.getName() - + " where id==" + id.toString() + " && emailAddress=='" + getUserEmail() + "'"); - List<Task> list = (List<Task>) query.execute(); + + " where id==" + id.toString() + " && emailAddress=='" + getUserEmail() + "'"); + List<Task> list = (List<Task>) query.execute(); return list.size() == 0 ? null : list.get(0); } catch (RuntimeException e) { System.out.println(e); @@ -273,24 +273,24 @@ like this:</p> public void fetchTasks (Long id) { // Request is wrapped in an AsyncTask to avoid making a network request // on the UI thread. - new AsyncTask<Long, Void, List<TaskProxy>>() { + new AsyncTask<Long, Void, List<TaskProxy>>() { @Override - protected List<TaskProxy> doInBackground(Long... arguments) { - final List<TaskProxy> list = new ArrayList<TaskProxy>(); + protected List<TaskProxy> doInBackground(Long... arguments) { + final List<TaskProxy> list = new ArrayList<TaskProxy>(); MyRequestFactory factory = Util.getRequestFactory(mContext, MyRequestFactory.class); TaskRequest taskRequest = factory.taskNinjaRequest(); if (arguments.length == 0 || arguments[0] == -1) { - factory.taskRequest().queryTasks().fire(new Receiver<List<TaskProxy>>() { + factory.taskRequest().queryTasks().fire(new Receiver<List<TaskProxy>>() { @Override - public void onSuccess(List<TaskProxy> arg0) { + public void onSuccess(List<TaskProxy> arg0) { list.addAll(arg0); } }); } else { newTask = true; - factory.taskRequest().readTask(arguments[0]).fire(new Receiver<TaskProxy>() { + factory.taskRequest().readTask(arguments[0]).fire(new Receiver<TaskProxy>() { @Override public void onSuccess(TaskProxy arg0) { list.add(arg0); @@ -301,7 +301,7 @@ public void fetchTasks (Long id) { } @Override - protected void onPostExecute(List<TaskProxy> result) { + protected void onPostExecute(List<TaskProxy> result) { TaskNinjaActivity.this.dump(result); } @@ -309,7 +309,7 @@ public void fetchTasks (Long id) { } ... -public void dump (List<TaskProxy> tasks) { +public void dump (List<TaskProxy> tasks) { for (TaskProxy task : tasks) { Log.i("Task output", task.getName() + "\n" + task.getNote()); } @@ -331,7 +331,7 @@ call its update method. Once again, this should be done in an result looks something like this.</p> <pre> -new AsyncTask<Void, Void, Void>() { +new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... arg0) { MyRequestFactory factory = (MyRequestFactory) |