Pictogram 1.6, Beta 1

parent d5c40671
......@@ -142,6 +142,7 @@ public class RestapiWrapper {
StringBuilder response=new StringBuilder("");
String line;
JSONObject JSONresponse;
BufferedReader br = new BufferedReader(new InputStreamReader(responseCode == HttpURLConnection.HTTP_OK
? urlConnection.getInputStream()
: urlConnection.getErrorStream()));
......@@ -194,7 +195,6 @@ public class RestapiWrapper {
urlConnection.setRequestMethod("GET");
urlConnection.setDoInput(true);
urlConnection.connect();
return RestapiWrapper.resultToJSON(urlConnection);
}
......@@ -289,7 +289,6 @@ public class RestapiWrapper {
// onPostExecute displays the results of the AsyncTask.
@Override
protected void onPostExecute(HttpAsyncTaskParams params) {
if (params.error!=null) {
if (silentLogin!=null && !silentLogin.isValidToken(params.error, params.result)) {
silentLogin.login();
......
......@@ -243,7 +243,8 @@ public class UserLogin {
public void loadComplete() {
PCBcontext.getDevice().insertUser(student);
if(progressDialog.isShowing()) progressDialog.dismiss();
activity.startActivity(pictogramActivity);
activity.startActivity(pictogramActivity);
}
......
......@@ -52,8 +52,10 @@ public class VocabularyDownloader {
grids_reamining.remove(0);
downloaded_scenes.add(id_grid);
synchronize(next_grid, grids_reamining, downloaded_scenes);
} else
} else {
this.imgListener.loadComplete();
TransactionMonitor.endTransaction(true);
}
}
private void synchronize(final int id_grid, final Vector<Integer> grids_reamining, final Vector<Integer> downloaded_scenes) {
if (downloaded_scenes.contains(id_grid))
......@@ -159,8 +161,8 @@ public class VocabularyDownloader {
}
Log.d(this.getClass().getName(), "Vocabulary size: " + updated_collection.length);
ImgDownloader downloader = new ImgDownloader(PCBcontext.getContext(), imgListener,ImgDownloader.tsource.remote);
downloader.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, imgs);
ImgDownloader downloader = new ImgDownloader(PCBcontext.getContext(), null,ImgDownloader.tsource.remote);
downloader.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, imgs);
}
/**
......
......@@ -174,6 +174,5 @@
<orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="json-20090211" level="project" />
<orderEntry type="library" exported="" name="tabletlibrary-unspecified" level="project" />
</component>
</module>
\ No newline at end of file
......@@ -295,11 +295,11 @@ public abstract class VOCA extends Activity implements VocabularyTalk.iVocabular
}
@Override
protected void onStart() {
super.onStart();
onWindowFocusChanged(true);
protected void onResume() {
super.onResume();
Log.e(LOG_TAG,"onResume**************");
//onWindowFocusChanged(true);
if (!PCBcontext.getVocabulary().isVisibleAnyPicto()) {
onResumeWhenEmptyScene();
......@@ -420,6 +420,7 @@ public abstract class VOCA extends Activity implements VocabularyTalk.iVocabular
super.onPause();
this.pictoCategoryGridAdapter.allPictosInGrid();
this.pictoMainGridAdapter.allPictosInGrid();
Log.e(LOG_TAG,"onPause*********************");
}
@Override
......@@ -749,7 +750,7 @@ public abstract class VOCA extends Activity implements VocabularyTalk.iVocabular
p.set_mirror(false, false);
// If the picto is a category
Log.e(LOG_TAG,"CHILD?"+p.has_child_grid()+" p id:"+p.get_stupicto_id());
if (p.has_child_grid()) {
currentCategory = p;
PCBcontext.getActionLog().log(new TalkAction(TalkAction.SELECT, p));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment