ConfigActivity: Fragments are hard; this un-breaks animations

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Samuel Holland
2017-08-14 18:32:14 -05:00
parent ab271e7153
commit e6a6605ff8
2 changed files with 88 additions and 79 deletions
@@ -34,7 +34,10 @@ abstract class BaseConfigActivity extends Activity {
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Trigger starting the service as early as possible
bindService(new Intent(this, VpnService.class), callbacks, Context.BIND_AUTO_CREATE);
if (VpnService.getInstance() != null)
onServiceAvailable();
else
bindService(new Intent(this, VpnService.class), callbacks, Context.BIND_AUTO_CREATE);
// Restore the saved configuration if there is one; otherwise grab it from the intent.
if (savedInstanceState != null)
initialConfig = savedInstanceState.getString(KEY_CURRENT_CONFIG);