Commit Graph
1255 Commits
Author SHA1 Message Date
Mygod 4fc56e2fea Update dependency 2016-07-12 17:12:05 +08:00
Mygod c92d66d9f3 Revert "Refine #530 again and again" and probably fix #530
This reverts commit b833cb6267.
2016-07-12 15:56:32 +08:00
Max Lv b833cb6267 Refine #530 again and again
Put ShadowsocksRunnerService into :bg process. It helped to solve #530, but
still I'm not sure why it works.

One assumption is that the startService() in BootReceiver helps to ensure :bg
process in a valid state.
2016-07-12 13:36:23 +08:00
Max Lv 9c37f8cae6 Fix #754 2016-07-12 12:17:36 +08:00
Mygod 16f4572839 Use official icons 2016-07-11 22:29:22 +08:00
Mygod 44625ae5b0 Bugfix for DropDownPreference 2016-07-11 20:43:53 +08:00
Mygod 159e1dff78 Bugfix for NAT mode 2016-07-11 19:51:47 +08:00
Mygod 84ac2b06fa Refine #530 again
Have. To. Do. More. Refinements.

Here's what happened in the buggy versions: (I think)

* `BootReceiver` starts which invokes `Utils.startSsService` which starts `ShadowsocksRunnerService`;
* `ShadowsocksRunnerService` binds to `BaseService`;
* 1s after it's connected, it invokes `bgService.use` which returns immediately after pushing `use` in the queue since it's an oneway method;
* Then `stopSelf` => `detachService`, `BaseService` now have nothing bound to it and not started either (neither foreground nor background), so the system can destroy it any time; (at this point, `BaseService.use` isn't invoked yet)
* `com.github.shadowsocks` process then probably exits since booting is a resource-heavy task, anyway it doesn't matter;
* Some time later `com.github.shadowsocks:bg` resumes running, and `BaseService` is stopped and destroyed. Now the system is no longer aware of this `BaseService` instance but it isn't garbage collected yet;
* `use` is finally invoked;
* `startService` is invoked in `startRunner` and the destroyed background service starts running; (bug of Android?)
* `startForeground` is invoked in `ShadowsocksNotification` but the system probably refused it since the service itself is already destroyed;
* When the main activity UI is brought up and requests binding, `com.github.shadowsocks:bg` which is unaware of the existing instance of `BaseService` creates another `BaseService` and thus everything gets messed up.

This commit fixes this by invoking `getState` (which isn't an oneway method) immediately after `use` so that `ShadowsocksRunnerService` will wait for `BaseService` to start itself before destroying itself and its connection to `BaseService`. And thus its return value is not used.
2016-07-11 19:22:54 +08:00
Mygod dcf190c1f5 Bugfix for NumberPickerPreference 2016-07-11 17:51:24 +08:00
Mygod 74a0e397c1 Refine #752 and NumberPickerPreference 2016-07-11 17:49:17 +08:00
Max Lv f35a4b05b5 Fix #752 v2.10.6 2016-07-10 19:22:51 +08:00
Max Lv 82e6266f09 Revert "Disable AutoFocus and Flash"
This reverts commit 9919ead15e.
2016-07-10 16:13:20 +08:00
Max Lv 9919ead15e Disable AutoFocus and Flash 2016-07-10 16:04:43 +08:00
Max Lv f6c4d2ea5e Bump version 2016-07-09 09:38:33 +08:00
Max Lv fce0ffe566 Refine #530 2016-07-09 09:00:00 +08:00
Max Lv 556d8d78bd Revert "Refine #530"
This reverts commit 56de231c4f.
2016-07-09 08:59:13 +08:00
Mygod 929b8c94ae Ignore exceptions while unbinding service 2016-07-08 12:58:11 +08:00
Max Lv 197819e725 Update makefile 2016-07-08 12:42:08 +08:00
Max Lv d3f10dac5e Remove redudant libev source code 2016-07-08 12:19:17 +08:00
Max Lv a21d099a34 Fix #746 v2.10.5 2016-07-08 11:42:10 +08:00
Max Lv ae1e396a5d Update travis-ci 2016-07-06 13:34:34 +08:00
Max Lv 4f79fa16e3 add .jvmopts from @wongsyrone 2016-07-06 13:32:03 +08:00
Max Lv 7a87eab47c Update proguard rules 2016-07-06 12:54:59 +08:00
Mygod 07eb4d2a5c Refine utils.Key for readability 2016-07-05 19:31:58 +08:00
Mygod c480137dec Remove .aidl.Config and persisting SharedPreferences (#742)
Previously a profile can exist in the following forms:

* `.database.Profile` used for everything backend;
* `.ShadowsocksSettings` which uses Preferences to provide UI to tweak settings;
* `.aidl.Config` used for IPC;
* `<data dir>/shared_pref/com.github.shadowsocks_preferences.xml` which exists for no apparent reason.

Thus long code block can be seen whose purpose is simply converting the data from one form to another. This commit intends to remove the latter two by:

1. Using profile ID and take advantage of fs r/w lock SQLite uses for IPC and better extensibility;
2. Stop persisting redundant fields in the preferences file and update database directly.
2016-07-05 01:07:09 -05:00
Max Lv 8515edff60 Update shadowsocks-libev 2016-07-04 12:00:57 +08:00
Mygod 432ab6cc7a Fix the bug where UI is not updated after importing 2016-07-04 10:38:49 +08:00
Max Lv 31ed8480e0 Update libevent 2016-07-04 09:37:26 +08:00
Max Lv 98f1108600 Fix a building issue with clang 2016-07-04 09:35:57 +08:00
Max Lv f8088cd435 Update android ndk 2016-07-03 18:37:09 +08:00
Max Lv 6d78b496ec Fix a typo 2016-07-03 18:35:29 +08:00
Max Lv df09d39139 Add apply-all action 2016-07-03 17:27:50 +08:00
Max Lv 1fe0ab996f Refine native build by @wongsyrone 2016-07-01 16:49:07 +08:00
Max Lv 2adaa71ebf Update android ndk 2016-07-01 16:02:41 +08:00
Max Lv 903a854855 Ignore .d 2016-07-01 14:40:40 +08:00
Max Lv f7db519616 Revert "Roll back to default JVM for travis-ci"
This reverts commit 674efdcf93.
2016-07-01 14:40:03 +08:00
Mygod 5a2dd68080 Merge branch 'master' of github.com:shadowsocks/shadowsocks-android 2016-07-01 14:00:59 +08:00
Mygod 07528bdb8d Add missing translation for bytes 2016-07-01 14:00:45 +08:00
Mygod a07901006f Shrink APK size by 385KB (8.18%)
Before: 4.8 MB (4,821,638 bytes)
After:  4.4 MB (4,427,038 bytes)
2016-07-01 13:59:53 +08:00
Max Lv 674efdcf93 Roll back to default JVM for travis-ci 2016-07-01 13:40:42 +08:00
Mygod f787e795cc Merge branch 'master' of github.com:shadowsocks/shadowsocks-android 2016-07-01 13:27:40 +08:00
Max Lv 42460904ee Enlarge max memory for travis-ci 2016-07-01 13:26:58 +08:00
Mygod 0b3ee8b793 Refine #735
It's impolite to ask for permission over and over again.
2016-07-01 13:26:53 +08:00
Max Lv 8779427a43 Merge branch 'master' of github.com:shadowsocks/shadowsocks-android 2016-07-01 13:18:07 +08:00
Max Lv 67707c0f30 Update dependency 2016-07-01 13:17:50 +08:00
Mygod ba8efb96a9 Merge branch 'master' of github.com:shadowsocks/shadowsocks-android 2016-07-01 13:07:21 +08:00
Mygod 76a42f5b5e Fix quick switch
R/W SharedPreference should be restricted to one process only since it's not process-safe.
2016-07-01 13:06:08 +08:00
Mygod 99fd8f1e69 Fix accessibility issue for title view 2016-07-01 12:56:42 +08:00
Max Lv de92a8503e Update travis-ci 2016-07-01 12:49:19 +08:00
Mygod 333ff40621 Fix #737 by using support vector drawables 2016-07-01 12:42:26 +08:00