Skip to content

Commit

Permalink
update target SDK to 34
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Jan 19, 2024
1 parent 5a10496 commit 6c36f23
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
10 changes: 5 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ android {
}
}

compileSdk = 33
compileSdk = 34
testOptions {
unitTests {
isReturnDefaultValues = true
Expand All @@ -33,7 +33,7 @@ android {
defaultConfig {
applicationId = "de.westnordost.streetcomplete"
minSdk = 21
targetSdk = 33
targetSdk = 34
versionCode = 5601
versionName = "56.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -129,8 +129,8 @@ dependencies {
implementation("io.insert-koin:koin-androidx-workmanager:3.4.1")

// Android stuff
implementation("com.google.android.material:material:1.6.1")
implementation("androidx.core:core-ktx:1.10.1")
implementation("com.google.android.material:material:1.11.0")
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.annotation:annotation:1.7.1")
Expand All @@ -151,7 +151,7 @@ dependencies {
api("org.jetbrains.kotlinx:kotlinx-datetime:0.5.0")

// scheduling background jobs
implementation("androidx.work:work-runtime:2.8.1")
implementation("androidx.work:work-runtime:2.9.0")

// finding in which country we are for country-specific logic
implementation("de.westnordost:countryboundaries:2.1")
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WAKE_LOCK" android:maxSdkVersion="22" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" android:minSdkVersion="34"/>

<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-feature android:name="android.hardware.screen.portrait" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,11 @@ class PointerPinView @JvmOverloads constructor(
}
}

override fun onDraw(canvas: Canvas?) {
val c = canvas ?: return

override fun onDraw(canvas: Canvas) {
val size = min(width, height)
val r = pinRotation

c.withRotation(r, width / 2f, height / 2f) {
canvas.withRotation(r, width / 2f, height / 2f) {
pointerPinBitmap?.let { canvas.drawBitmap(it, 0f, 0f, antiAliasPaint) }
}

Expand All @@ -134,7 +132,7 @@ class PointerPinView @JvmOverloads constructor(
width / 2 + iconSize / 2 + x,
height / 2 + iconSize / 2 + y
)
icon.draw(c)
icon.draw(canvas)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class BallPitView @JvmOverloads constructor(
return true
}

override fun onFling(e1: MotionEvent, e2: MotionEvent, velocityX: Float, velocityY: Float): Boolean {
override fun onFling(e1: MotionEvent?, e2: MotionEvent, velocityX: Float, velocityY: Float): Boolean {
val a = view.rotation / 180.0 * PI
val vx = (cos(a) * velocityX - sin(a) * velocityY).toFloat()
val vy = (cos(a) * velocityY + sin(a) * velocityX).toFloat()
Expand Down

0 comments on commit 6c36f23

Please sign in to comment.