diff options
author | cyBerta <cyberta@riseup.net> | 2023-05-22 19:47:29 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2023-07-13 10:53:49 +0200 |
commit | 86bf641b9558e9b9532efbb70391e41b37f620e9 (patch) | |
tree | cf22b37266d5e5699b1adafec74f5cbab86bc4c7 /app/src/main | |
parent | 827999508878b319af3201bdc271521dcbbeaea2 (diff) |
sanitize launcher intent
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/base/StartActivity.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/StartActivity.java b/app/src/main/java/se/leap/bitmaskclient/base/StartActivity.java index 58b057b7..6426c3d6 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/StartActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/StartActivity.java @@ -103,10 +103,27 @@ public class StartActivity extends Activity{ // initialize app necessities VpnStatus.initLogCache(getApplicationContext().getCacheDir()); + sanitizeStartIntent(); prepareEIP(); } + private void sanitizeStartIntent() { + Intent intent = new Intent(); + try { + if (getIntent().hasExtra(EIP_RESTART_ON_BOOT)) { + intent.putExtra(EIP_RESTART_ON_BOOT, getIntent().getBooleanExtra(EIP_RESTART_ON_BOOT, false)); + } + if (getIntent().hasExtra(APP_ACTION_CONFIGURE_ALWAYS_ON_PROFILE)) { + intent.putExtra(APP_ACTION_CONFIGURE_ALWAYS_ON_PROFILE, false); + } + } catch (RuntimeException e) { + + } + this.setIntent(intent); + } + + /** * check if normal start, first run, up or downgrade * @return @StartupMode |