Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2021fbbe authored by Guillaume Jacquart's avatar Guillaume Jacquart
Browse files

Add select exit country feature

parent 05dde94e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -43,6 +43,9 @@ class MainActivity : AppCompatActivity(), IIpScramblerModule.Listener {
    private var mSelectAll: RadioButton? = null
    private var mSelectApp1: RadioButton? = null

    private var mToggleCountry: Switch? = null


    private lateinit var ipScramblerModule: IpScramblerModule


@@ -61,6 +64,7 @@ class MainActivity : AppCompatActivity(), IIpScramblerModule.Listener {
        mBtnStop = findViewById(R.id.button_stop)
        mSelectAll = findViewById(R.id.select_all)
        mSelectApp1 = findViewById(R.id.select_app1)
        mToggleCountry = findViewById(R.id.toggle_exit_node)

        mBtnStart?.setOnClickListener { v: View? ->
            ipScramblerModule.prepareAndroidVpn()?.let { startActivityForResult(it, 3)}
@@ -87,6 +91,11 @@ class MainActivity : AppCompatActivity(), IIpScramblerModule.Listener {
            updateAppSelection()
        }

        mToggleCountry?.setOnCheckedChangeListener { _, isChecked ->
            ipScramblerModule.exitCountry = if (isChecked) "US" else ""
        }

        mToggleCountry?.isChecked = ipScramblerModule.exitCountry == "US"
        updateAppSelection()
    }

+6 −0
Original line number Diff line number Diff line
@@ -88,6 +88,12 @@

    </RadioGroup>

    <Switch
        android:id="@+id/toggle_exit_node"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Exit node US"
        />
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
+2.38 KiB (27.8 KiB)

File changed and moved.

No diff preview for this file type.

+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
  <modelVersion>4.0.0</modelVersion>
  <groupId>foundation.e</groupId>
  <artifactId>privacymodule.tor</artifactId>
  <version>0.0.4</version>
  <version>0.0.5</version>
  <packaging>aar</packaging>
  <dependencies>
    <dependency>
+4 −4
Original line number Diff line number Diff line
@@ -3,11 +3,11 @@
  <groupId>foundation.e</groupId>
  <artifactId>privacymodule.tor</artifactId>
  <versioning>
    <latest>0.0.4</latest>
    <release>0.0.4</release>
    <latest>0.0.5</latest>
    <release>0.0.5</release>
    <versions>
      <version>0.0.4</version>
      <version>0.0.5</version>
    </versions>
    <lastUpdated>20210830061036</lastUpdated>
    <lastUpdated>20210830100900</lastUpdated>
  </versioning>
</metadata>
Loading