diff --git a/app/build.gradle b/app/build.gradle index 1d640dc..1dc5f58 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,11 +12,11 @@ plugins { apply plugin: 'com.google.android.gms.oss-licenses-plugin' -String DEFAULT_MANIFEST = "268:https://storage.googleapis.com/music-iq-db/updatable_ytm_db/20240218-030037/manifest.json" -String DEFAULT_MANIFEST_V3 = "3076:https://storage.googleapis.com/music-iq-db/updatable_db_v3/20240218-030037/manifest.json" +String DEFAULT_MANIFEST = "271:https://storage.googleapis.com/music-iq-db/updatable_ytm_db/20240331-030011/manifest.json" +String DEFAULT_MANIFEST_V3 = "3079:https://storage.googleapis.com/music-iq-db/updatable_db_v3/20240324-040013/manifest.json" -def tagName = '2.3.4' -def version = 234 +def tagName = '2.3.5' +def version = 235 def getKeystoreProperties() { def properties = new Properties() @@ -126,13 +126,13 @@ dependencies { implementation "androidx.security:security-crypto:1.1.0-alpha06" //Material UI - implementation 'com.google.android.material:material:1.11.0' + implementation 'com.google.android.material:material:1.12.0-rc01' //MonetCompat for colours on < S implementation 'com.github.KieronQuinn:MonetCompat:0.4.1' //Dependency Injection - implementation "io.insert-koin:koin-android:3.5.0" + implementation "io.insert-koin:koin-android:3.5.3" //Protobuf is used in reading data from ASI implementation "com.google.protobuf:protobuf-javalite:3.25.2" diff --git a/app/release/baselineProfiles/0/app-release.dm b/app/release/baselineProfiles/0/app-release.dm new file mode 100644 index 0000000..d2647e0 Binary files /dev/null and b/app/release/baselineProfiles/0/app-release.dm differ diff --git a/app/release/baselineProfiles/1/app-release.dm b/app/release/baselineProfiles/1/app-release.dm new file mode 100644 index 0000000..dce1c20 Binary files /dev/null and b/app/release/baselineProfiles/1/app-release.dm differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index 0d2f388..a9cc8c1 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -11,10 +11,27 @@ "type": "SINGLE", "filters": [], "attributes": [], - "versionCode": 234, - "versionName": "2.3.4", + "versionCode": 235, + "versionName": "2.3.5", "outputFile": "app-release.apk" } ], - "elementType": "File" + "elementType": "File", + "baselineProfiles": [ + { + "minApi": 28, + "maxApi": 30, + "baselineProfiles": [ + "baselineProfiles/1/app-release.dm" + ] + }, + { + "minApi": 31, + "maxApi": 2147483647, + "baselineProfiles": [ + "baselineProfiles/0/app-release.dm" + ] + } + ], + "minSdkVersionForDexing": 28 } \ No newline at end of file diff --git a/app/src/main/java/com/kieronquinn/app/ambientmusicmod/repositories/WidgetRepository.kt b/app/src/main/java/com/kieronquinn/app/ambientmusicmod/repositories/WidgetRepository.kt index c422fab..6dda3b5 100644 --- a/app/src/main/java/com/kieronquinn/app/ambientmusicmod/repositories/WidgetRepository.kt +++ b/app/src/main/java/com/kieronquinn/app/ambientmusicmod/repositories/WidgetRepository.kt @@ -8,7 +8,6 @@ import android.content.Context import android.content.Intent import android.content.pm.PackageManager import android.os.Build -import android.os.TransactionTooLargeException import android.util.SizeF import android.view.LayoutInflater import android.view.View @@ -30,7 +29,11 @@ import com.kieronquinn.app.pixelambientmusic.model.RecognitionMetadata import com.kieronquinn.app.pixelambientmusic.model.RecognitionSource import kotlinx.coroutines.Job import kotlinx.coroutines.MainScope -import kotlinx.coroutines.flow.* +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.launch interface WidgetRepository { @@ -159,7 +162,6 @@ class WidgetRepositoryImpl( }.flatMap { it.second.map { id -> val options = appWidgetManager.getAppWidgetOptions(id) - val width = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH) AppWidget(id, it.first) } } @@ -202,7 +204,7 @@ class WidgetRepositoryImpl( ) = forEach { try { appWidgetManager.updateAppWidget(it.id, it.getRemoteViews(state, onDemandEnabled)) - }catch (e: TransactionTooLargeException) { + }catch (e: Throwable) { //Suppress, shouldn't happen unless system has lagged } } diff --git a/app/src/main/java/com/kieronquinn/app/ambientmusicmod/service/AmbientMusicModForegroundService.kt b/app/src/main/java/com/kieronquinn/app/ambientmusicmod/service/AmbientMusicModForegroundService.kt index 83eabeb..c3e015f 100644 --- a/app/src/main/java/com/kieronquinn/app/ambientmusicmod/service/AmbientMusicModForegroundService.kt +++ b/app/src/main/java/com/kieronquinn/app/ambientmusicmod/service/AmbientMusicModForegroundService.kt @@ -104,7 +104,7 @@ class AmbientMusicModForegroundService: LifecycleService() { if (restart) { context.stopService(intent) } - context.startForegroundService(intent) + context.startService(intent) } fun sendManualRecognition(state: RecognitionState.Recognised){ diff --git a/build.gradle b/build.gradle index 9b70cd1..ae4e695 100644 --- a/build.gradle +++ b/build.gradle @@ -16,8 +16,8 @@ buildscript { } plugins { - id 'com.android.application' version '8.2.2' apply false - id 'com.android.library' version '8.2.2' apply false + id 'com.android.application' version '8.3.1' apply false + id 'com.android.library' version '8.3.1' apply false id 'org.jetbrains.kotlin.android' version '1.9.22' apply false id 'com.google.dagger.hilt.android' version '2.41' apply false id 'dev.rikka.tools.refine' version '4.1.0' apply false