A bug in the server caused it to send a single space as the response to a poll. This space was stored into a fixed-size 4MB string and passed to the json.org library, which finally OOMed. The string is variable-size and the maximum size was lowered to 2MB.
If FonBot was moved to /system and then updated, it will have apks in
both /system/app and /data/app and ApplicationInfo.sourceDir will point
to the second one.
Merge SendHttpMessageAsyncTask and PollServerAsyncTask
The resulting class is named HttpCallExxecutableRunnable. It uses
the new ExecutableRunnable class and lets the users make a HTTP
call to a server URL and pass in a callback to use the response.
Command arguments are now represented as JSON arrays, and the
JSON parsing code uses less memory. Previous versions can no
longer receive commands, since they expect command arguments in
the old arg0, arg1, ... form.
Server protocol changes:
* All server requests use Basic access authentication
* There is no more X-Action. Server paths are used instead:
- /send for sending messages, with the destination address
in the X-Destination header.
- /ok for doing nothing. Used for the main activity login status.
Other minor changes:
* Centered the resultTextView in main.xml.
* Utils#parseHttpMessage can parse messages like "(text)".
Until now, the custom server hostname:port were only used in
SendHttpMessageAsyncTask, while PollServerAsyncTask used the
hardcoded http://ieval.ro:7777/get.