Merge branch 'main' into kari/avatar

Signed-off-by: kari-ts <135075563+kari-ts@users.noreply.github.com>
pull/538/head
kari-ts 1 year ago committed by GitHub
commit 71619e96c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -208,7 +208,7 @@ tag_release: ## Tag the current commit with the current version
.PHONY: bumposs ## Bump to the latest oss and update teh versions. .PHONY: bumposs ## Bump to the latest oss and update teh versions.
bumposs: update-oss update-version bumposs: update-oss update-version
git commit -sm "android: bumping OSS" -m "OSS and Version updated to ${VERSION_LONG}" go.toolchain.rev android/build.gradle go.mod go.sum git commit -sm "android: bump OSS" -m "OSS and Version updated to ${VERSION_LONG}" go.toolchain.rev android/build.gradle go.mod go.sum
git tag -a "$(VERSION_LONG)" -m "OSS and Version updated to ${VERSION_LONG}" git tag -a "$(VERSION_LONG)" -m "OSS and Version updated to ${VERSION_LONG}"
.PHONY: bump_version_code .PHONY: bump_version_code

@ -11,7 +11,7 @@ buildscript {
} }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:8.5.1' classpath 'com.android.tools.build:gradle:8.6.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath("com.ncorti.ktfmt.gradle:plugin:0.17.0") classpath("com.ncorti.ktfmt.gradle:plugin:0.17.0")
@ -38,7 +38,7 @@ android {
minSdkVersion 26 minSdkVersion 26
targetSdkVersion 34 targetSdkVersion 34
versionCode 241 versionCode 241
versionName "1.75.81-t4ad3f0122-g0126db799b1" versionName "1.77.12-ta8f9c0d6e-g753b8d3fb4b"
// This setting, which defaults to 'true', will cause Tailscale to fall // This setting, which defaults to 'true', will cause Tailscale to fall
// back to the Google DNS servers if it cannot determine what the // back to the Google DNS servers if it cannot determine what the
@ -112,7 +112,7 @@ dependencies {
implementation 'androidx.core:core-ktx:1.13.1' implementation 'androidx.core:core-ktx:1.13.1'
implementation "androidx.browser:browser:1.8.0" implementation "androidx.browser:browser:1.8.0"
implementation "androidx.security:security-crypto:1.1.0-alpha06" implementation "androidx.security:security-crypto:1.1.0-alpha06"
implementation "androidx.work:work-runtime:2.9.0" implementation "androidx.work:work-runtime:2.9.1"
// Kotlin dependencies. // Kotlin dependencies.
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3" implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3"
@ -123,20 +123,20 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
// Compose dependencies. // Compose dependencies.
def composeBom = platform('androidx.compose:compose-bom:2024.06.00') def composeBom = platform('androidx.compose:compose-bom:2024.09.03')
implementation composeBom implementation composeBom
implementation 'androidx.compose.material3:material3:1.2.1' implementation 'androidx.compose.material3:material3:1.3.0'
implementation 'androidx.compose.material:material-icons-core:1.6.8' implementation 'androidx.compose.material:material-icons-core:1.7.3'
implementation "androidx.compose.ui:ui:1.6.8" implementation "androidx.compose.ui:ui:1.7.3"
implementation "androidx.compose.ui:ui-tooling:1.6.8" implementation "androidx.compose.ui:ui-tooling:1.7.3"
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.3' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.6'
implementation 'androidx.activity:activity-compose:1.9.0' implementation 'androidx.activity:activity-compose:1.9.2'
implementation "com.google.accompanist:accompanist-permissions:$accompanist_version" implementation "com.google.accompanist:accompanist-permissions:$accompanist_version"
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version" implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"
implementation "androidx.core:core-splashscreen:1.1.0-rc01" implementation "androidx.core:core-splashscreen:1.1.0-rc01"
// Navigation dependencies. // Navigation dependencies.
def nav_version = "2.7.7" def nav_version = "2.8.2"
implementation "androidx.navigation:navigation-compose:$nav_version" implementation "androidx.navigation:navigation-compose:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version" implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
@ -151,7 +151,7 @@ dependencies {
// Integration Tests // Integration Tests
androidTestImplementation composeBom androidTestImplementation composeBom
androidTestImplementation 'androidx.test:runner:1.6.1' androidTestImplementation 'androidx.test:runner:1.6.2'
androidTestImplementation 'androidx.test.ext:junit-ktx:1.2.1' androidTestImplementation 'androidx.test.ext:junit-ktx:1.2.1'
androidTestImplementation 'androidx.test.ext:junit:1.2.1' androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
@ -164,7 +164,7 @@ dependencies {
// Unit Tests // Unit Tests
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.4.0' testImplementation 'org.mockito:mockito-core:5.12.0'
testImplementation 'org.mockito:mockito-inline:5.2.0' testImplementation 'org.mockito:mockito-inline:5.2.0'
testImplementation 'org.mockito.kotlin:mockito-kotlin:5.4.0' testImplementation 'org.mockito.kotlin:mockito-kotlin:5.4.0'

@ -371,16 +371,27 @@ open class UninitializedApp : Application() {
fun startVPN() { fun startVPN() {
val intent = Intent(this, IPNService::class.java).apply { action = IPNService.ACTION_START_VPN } val intent = Intent(this, IPNService::class.java).apply { action = IPNService.ACTION_START_VPN }
// FLAG_UPDATE_CURRENT ensures that if the intent is already pending, the existing intent will
// be updated rather than creating multiple redundant instances.
val pendingIntent =
PendingIntent.getService(
this,
0,
intent,
PendingIntent.FLAG_UPDATE_CURRENT or
PendingIntent.FLAG_IMMUTABLE // FLAG_IMMUTABLE for Android 12+
)
try { try {
startForegroundService(intent) pendingIntent.send()
} catch (foregroundServiceStartException: IllegalStateException) { } catch (foregroundServiceStartException: IllegalStateException) {
TSLog.e( TSLog.e(
TAG, TAG,
"startVPN hit ForegroundServiceStartNotAllowedException in startForegroundService(): $foregroundServiceStartException") "startVPN hit ForegroundServiceStartNotAllowedException: $foregroundServiceStartException")
} catch (securityException: SecurityException) { } catch (securityException: SecurityException) {
TSLog.e(TAG, "startVPN hit SecurityException in startForegroundService(): $securityException") TSLog.e(TAG, "startVPN hit SecurityException: $securityException")
} catch (e: Exception) { } catch (e: Exception) {
TSLog.e(TAG, "startVPN hit exception in startForegroundService(): $e") TSLog.e(TAG, "startVPN hit exception: $e")
} }
} }

@ -13,9 +13,9 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Person import androidx.compose.material.icons.filled.Person
import androidx.compose.material.ripple.rememberRipple
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ripple
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember import androidx.compose.runtime.remember
@ -55,7 +55,7 @@ fun Avatar(profile: IpnLocal.LoginProfile?, size: Int = 50, action: (() -> Unit)
.focusable() // Make this outer Box focusable (after onFocusChanged) .focusable() // Make this outer Box focusable (after onFocusChanged)
.clickable( .clickable(
interactionSource = remember { MutableInteractionSource() }, interactionSource = remember { MutableInteractionSource() },
indication = rememberRipple(bounded = true), // Apply ripple effect inside circular bounds indication = ripple(bounded = true), // Apply ripple effect inside circular bounds
onClick = { onClick = {
action?.invoke() action?.invoke()
focusManager.clearFocus() // Clear focus after clicking the avatar focusManager.clearFocus() // Clear focus after clicking the avatar

@ -13,7 +13,6 @@ import androidx.compose.foundation.layout.width
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.CheckCircle import androidx.compose.material.icons.filled.CheckCircle
import androidx.compose.material.ripple.rememberRipple
import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
@ -21,6 +20,7 @@ import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar import androidx.compose.material3.TopAppBar
import androidx.compose.material3.ripple
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.remember import androidx.compose.runtime.remember
@ -76,7 +76,7 @@ fun BackArrow(action: () -> Unit, focusRequester: FocusRequester) {
Modifier.focusRequester(focusRequester) Modifier.focusRequester(focusRequester)
.clickable( .clickable(
interactionSource = remember { MutableInteractionSource() }, interactionSource = remember { MutableInteractionSource() },
indication = rememberRipple(bounded = false), indication = ripple(bounded = false),
onClick = { action() })) onClick = { action() }))
} }
} }

@ -6,7 +6,7 @@ require (
github.com/tailscale/wireguard-go v0.0.0-20240905161824-799c1978fafc github.com/tailscale/wireguard-go v0.0.0-20240905161824-799c1978fafc
golang.org/x/mobile v0.0.0-20240806205939-81131f6468ab golang.org/x/mobile v0.0.0-20240806205939-81131f6468ab
inet.af/netaddr v0.0.0-20220617031823-097006376321 inet.af/netaddr v0.0.0-20220617031823-097006376321
tailscale.com v1.75.0-pre.0.20241004185700-4ad3f0122574 tailscale.com v1.75.0-pre.0.20241014151013-a8f9c0d6e40a
) )
require ( require (

@ -256,5 +256,5 @@ inet.af/netaddr v0.0.0-20220617031823-097006376321 h1:B4dC8ySKTQXasnjDTMsoCMf1sQ
inet.af/netaddr v0.0.0-20220617031823-097006376321/go.mod h1:OIezDfdzOgFhuw4HuWapWq2e9l0H9tK4F1j+ETRtF3k= inet.af/netaddr v0.0.0-20220617031823-097006376321/go.mod h1:OIezDfdzOgFhuw4HuWapWq2e9l0H9tK4F1j+ETRtF3k=
software.sslmate.com/src/go-pkcs12 v0.4.0 h1:H2g08FrTvSFKUj+D309j1DPfk5APnIdAQAB8aEykJ5k= software.sslmate.com/src/go-pkcs12 v0.4.0 h1:H2g08FrTvSFKUj+D309j1DPfk5APnIdAQAB8aEykJ5k=
software.sslmate.com/src/go-pkcs12 v0.4.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= software.sslmate.com/src/go-pkcs12 v0.4.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI=
tailscale.com v1.75.0-pre.0.20241004185700-4ad3f0122574 h1:Ql1Ojbp3j2u1bekVmDqo0fhBkM0jXA1trjtJi/zbuaw= tailscale.com v1.75.0-pre.0.20241014151013-a8f9c0d6e40a h1:nGLKfmPOA8dmMqGUjBDIaUD4RkXo+QpP3TXoAKVwvHU=
tailscale.com v1.75.0-pre.0.20241004185700-4ad3f0122574/go.mod h1:myCwmhYBvMCF/5OgBYuIW42zscuEo30bAml7wABVZLk= tailscale.com v1.75.0-pre.0.20241014151013-a8f9c0d6e40a/go.mod h1:myCwmhYBvMCF/5OgBYuIW42zscuEo30bAml7wABVZLk=

Loading…
Cancel
Save