mirror of
				https://github.com/yggdrasil-network/yggdrasil-android.git
				synced 2025-11-04 11:15:08 +03:00 
			
		
		
		
	Updated the yggdrasil-go submodule. Fixed #64, updated some deps.
This commit is contained in:
		
							parent
							
								
									34756b2193
								
							
						
					
					
						commit
						2b67079085
					
				
					 6 changed files with 22 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -9,9 +9,9 @@ android {
 | 
			
		|||
    defaultConfig {
 | 
			
		||||
        applicationId "eu.neilalexander.yggdrasil"
 | 
			
		||||
        minSdkVersion 21
 | 
			
		||||
        targetSdkVersion 33
 | 
			
		||||
        versionCode 18
 | 
			
		||||
        versionName "0.1-018"
 | 
			
		||||
        targetSdkVersion 34
 | 
			
		||||
        versionCode 19
 | 
			
		||||
        versionName "0.1-019"
 | 
			
		||||
 | 
			
		||||
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -51,12 +51,12 @@ android {
 | 
			
		|||
dependencies {
 | 
			
		||||
    implementation fileTree(include: ['*.aar'], dir: 'libs')
 | 
			
		||||
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
 | 
			
		||||
    implementation 'androidx.core:core-ktx:1.12.0'
 | 
			
		||||
    implementation 'androidx.appcompat:appcompat:1.6.1'
 | 
			
		||||
    implementation 'com.google.android.material:material:1.5.0'
 | 
			
		||||
    implementation 'androidx.core:core-ktx:1.13.1'
 | 
			
		||||
    implementation 'androidx.appcompat:appcompat:1.7.0'
 | 
			
		||||
    implementation 'com.google.android.material:material:1.12.0'
 | 
			
		||||
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
 | 
			
		||||
    implementation 'androidx.preference:preference-ktx:1.2.1'
 | 
			
		||||
    testImplementation 'junit:junit:4.+'
 | 
			
		||||
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
 | 
			
		||||
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
 | 
			
		||||
    testImplementation 'junit:junit:4.13.2'
 | 
			
		||||
    androidTestImplementation 'androidx.test.ext:junit:1.2.1'
 | 
			
		||||
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,6 +6,7 @@
 | 
			
		|||
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
 | 
			
		||||
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
 | 
			
		||||
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED" />
 | 
			
		||||
 | 
			
		||||
    <application
 | 
			
		||||
        android:name=".GlobalApplication"
 | 
			
		||||
| 
						 | 
				
			
			@ -42,6 +43,7 @@
 | 
			
		|||
        <service
 | 
			
		||||
            android:name=".PacketTunnelProvider"
 | 
			
		||||
            android:permission="android.permission.BIND_VPN_SERVICE"
 | 
			
		||||
            android:foregroundServiceType="systemExempted"
 | 
			
		||||
            android:exported="true">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="android.net.VpnService" />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -68,6 +68,7 @@ class MainActivity : AppCompatActivity() {
 | 
			
		|||
                        startVpnActivity.launch(vpnIntent)
 | 
			
		||||
                    } else {
 | 
			
		||||
                        start()
 | 
			
		||||
                        enabledSwitch.isEnabled = false
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                false -> {
 | 
			
		||||
| 
						 | 
				
			
			@ -181,6 +182,9 @@ class MainActivity : AppCompatActivity() {
 | 
			
		|||
                            else -> getString(R.string.main_many_peers, count)
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    if (!enabledSwitch.isEnabled) {
 | 
			
		||||
                        enabledSwitch.isEnabled = true
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -232,7 +232,11 @@ open class PacketTunnelProvider: VpnService() {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    private fun updater() {
 | 
			
		||||
        Thread.sleep(500)
 | 
			
		||||
        try {
 | 
			
		||||
            Thread.sleep(500)
 | 
			
		||||
        } catch (_: InterruptedException) {
 | 
			
		||||
            return
 | 
			
		||||
        }
 | 
			
		||||
        var lastStateUpdate = System.currentTimeMillis()
 | 
			
		||||
        updates@ while (started.get()) {
 | 
			
		||||
            val treeJSON = yggdrasil.treeJSON
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue