diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefsImpl.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefsImpl.kt index c4a10f45a6..5a108666ba 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefsImpl.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefsImpl.kt @@ -8,6 +8,7 @@ import android.content.pm.PackageManager import android.provider.Settings import androidx.annotation.StringRes import androidx.appcompat.app.AppCompatActivity +import androidx.core.app.ActivityCompat import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentActivity @@ -25,6 +26,7 @@ import info.nightscout.androidaps.diaconn.events.EventDiaconnG8PumpLogReset import info.nightscout.androidaps.events.EventAppExit import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.ImportExportPrefs +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.maintenance.formats.* @@ -39,7 +41,6 @@ import info.nightscout.androidaps.utils.alertDialogs.TwoMessagesAlertDialog import info.nightscout.androidaps.utils.alertDialogs.WarningDialog import info.nightscout.androidaps.utils.buildHelper.BuildHelper import info.nightscout.androidaps.utils.protection.PasswordCheck -import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.storage.Storage import info.nightscout.androidaps.utils.userEntry.UserEntryPresentationHelper import info.nightscout.shared.logging.AAPSLogger @@ -112,7 +113,9 @@ class ImportExportPrefsImpl @Inject constructor( val n1 = Settings.System.getString(context.contentResolver, "bluetooth_name") val n2 = Settings.Secure.getString(context.contentResolver, "bluetooth_name") val n3 = try { - (context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager?)?.adapter?.name + if (ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_CONNECT) == PackageManager.PERMISSION_GRANTED) { + (context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager?)?.adapter?.name + } else null } catch (e: Exception){ null } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.kt index 5c1ffc8c27..5960f22b15 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.kt @@ -52,11 +52,11 @@ class QuickWizardListActivity : DaggerAppCompatActivityWithResult(), OnStartDrag private inner class RecyclerViewAdapter(var fragmentManager: FragmentManager) : RecyclerView.Adapter(), ItemTouchHelperAdapter { - private inner class QuickWizardEntryViewHolder(val binding: OverviewQuickwizardlistItemBinding, val fragmentManager: FragmentManager) : RecyclerView.ViewHolder(binding.root) + private inner class QuickWizardEntryViewHolder(val binding: OverviewQuickwizardlistItemBinding) : RecyclerView.ViewHolder(binding.root) override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): QuickWizardEntryViewHolder { val binding = OverviewQuickwizardlistItemBinding.inflate(LayoutInflater.from(parent.context), parent, false) - return QuickWizardEntryViewHolder(binding, fragmentManager) + return QuickWizardEntryViewHolder(binding) } @SuppressLint("ClickableViewAccessibility") @@ -174,7 +174,7 @@ class QuickWizardListActivity : DaggerAppCompatActivityWithResult(), OnStartDrag }) } - override fun onCreateOptionsMenu(menu: Menu?): Boolean { + override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.menu_actions, menu) return super.onCreateOptionsMenu(menu) } diff --git a/build.gradle b/build.gradle index 6840a215f0..42c111cf5a 100644 --- a/build.gradle +++ b/build.gradle @@ -11,31 +11,36 @@ buildscript { lifecycle_version = '2.4.1' dagger_version = '2.42' coroutines_version = '1.6.1' - activity_version = '1.3.1' - fragmentktx_version = '1.3.6' + activity_version = '1.4.0' + fragmentktx_version = '1.4.1' ormLite_version = '4.46' - nav_version = '2.3.5' + gson_version = '2.9.0' + nav_version = '2.4.2' appcompat_version = '1.4.1' - material_version = '1.4.0' - constraintlayout_version = '2.1.0' + material_version = '1.6.0' + constraintlayout_version = '2.1.4' preferencektx_version = '1.2.0' commonslang3_version = '3.12.0' commonscodec_version = '1.15' jodatime_version = '2.10.14' - work_version = '2.5.0' + work_version = '2.7.1' tink_version = '1.5.0' json_version = '20220320' joga_version = '2.10.14' junit_version = '4.13.2' mockito_version = '4.4.0' - dexmaker_version = "1.2" + dexmaker_version = '1.2' retrofit2_version = '2.9.0' okhttp3_version = '4.9.0' byteBuddy_version = '1.12.8' - androidx_junit_version = '1.1.2' + androidx_junit_version = '1.1.3' androidx_rules_version = '1.4.0' + + wearable_version = '2.9.0' + play_services_wearable_version = '17.1.0' + play_services_location_version = '19.0.1' } repositories { google() diff --git a/core/core_dependencies.gradle b/core/core_dependencies.gradle index c88b6f4d48..8eaf9f1edc 100644 --- a/core/core_dependencies.gradle +++ b/core/core_dependencies.gradle @@ -13,8 +13,8 @@ dependencies { api "androidx.appcompat:appcompat:$appcompat_version" api "androidx.preference:preference-ktx:$preferencektx_version" api 'androidx.biometric:biometric:1.1.0' - api "androidx.browser:browser:1.3.0" - api "androidx.activity:activity-ktx:${activity_version}" + api "androidx.browser:browser:1.4.0" + api "androidx.activity:activity-ktx:$activity_version" api "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version" api "androidx.lifecycle:lifecycle-process:$lifecycle_version" api 'androidx.cardview:cardview:1.0.0' @@ -50,11 +50,11 @@ dependencies { api "com.jjoe64:graphview:4.0.1" //db - api "com.j256.ormlite:ormlite-core:${ormLite_version}" - api "com.j256.ormlite:ormlite-android:${ormLite_version}" + api "com.j256.ormlite:ormlite-core:$ormLite_version" + api "com.j256.ormlite:ormlite-android:$ormLite_version" // pumpCommon - api "com.google.code.gson:gson:2.8.7" + api "com.google.code.gson:gson:$gson_version" // don't kill my app api('dev.doubledot.doki:library:0.0.1@aar') { @@ -82,8 +82,8 @@ dependencies { api "androidx.navigation:navigation-fragment-ktx:$nav_version" api "androidx.navigation:navigation-ui-ktx:$nav_version" - api 'com.google.android.gms:play-services-wearable:17.0.0' - api 'com.google.android.gms:play-services-location:17.1.0' + api "com.google.android.gms:play-services-wearable:$play_services_wearable_version" + api "com.google.android.gms:play-services-location:$play_services_location_version" api 'com.google.android.flexbox:flexbox:3.0.0' api("io.socket:socket.io-client:1.0.0") { diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/PrefsFileContract.kt b/core/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/PrefsFileContract.kt index 69eae2dd21..a56296aace 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/PrefsFileContract.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/PrefsFileContract.kt @@ -6,7 +6,7 @@ import androidx.activity.result.contract.ActivityResultContract import androidx.fragment.app.FragmentActivity import info.nightscout.androidaps.plugins.general.maintenance.activities.PrefImportListActivity -class PrefsFileContract : ActivityResultContract() { +class PrefsFileContract : ActivityResultContract() { companion object { diff --git a/core/src/main/java/info/nightscout/androidaps/utils/permissions/OptimizationPermissionContract.kt b/core/src/main/java/info/nightscout/androidaps/utils/permissions/OptimizationPermissionContract.kt index 34d6a1a36d..5bb020df21 100644 --- a/core/src/main/java/info/nightscout/androidaps/utils/permissions/OptimizationPermissionContract.kt +++ b/core/src/main/java/info/nightscout/androidaps/utils/permissions/OptimizationPermissionContract.kt @@ -6,7 +6,7 @@ import android.net.Uri import android.provider.Settings import androidx.activity.result.contract.ActivityResultContract -class OptimizationPermissionContract : ActivityResultContract() { +class OptimizationPermissionContract : ActivityResultContract() { override fun parseResult(resultCode: Int, intent: Intent?): Unit? = null diff --git a/database/build.gradle b/database/build.gradle index d5bb7026e9..b990da9e89 100644 --- a/database/build.gradle +++ b/database/build.gradle @@ -26,9 +26,9 @@ dependencies { api "io.reactivex.rxjava3:rxjava:$rxjava_version" api "io.reactivex.rxjava3:rxandroid:$rxandroid_version" - api("io.reactivex.rxjava3:rxkotlin:$rxkotlin_version") + api "io.reactivex.rxjava3:rxkotlin:$rxkotlin_version" - api "com.google.code.gson:gson:2.9.0" + api "com.google.code.gson:gson:$gson_version" api "androidx.room:room-runtime:$room_version" kapt "androidx.room:room-compiler:$room_version" diff --git a/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/PodActivationWizardActivity.kt b/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/PodActivationWizardActivity.kt index 8d187febfa..f94ed3e0b0 100644 --- a/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/PodActivationWizardActivity.kt +++ b/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/PodActivationWizardActivity.kt @@ -40,7 +40,7 @@ abstract class PodActivationWizardActivity : OmnipodWizardActivityBase() { val navController = getNavController() val navInflater = navController.navInflater val graph = navInflater.inflate(R.navigation.omnipod_common_pod_activation_wizard_navigation_graph) - graph.startDestination = startDestination + graph.setStartDestination(startDestination) navController.graph = graph } diff --git a/wear/build.gradle b/wear/build.gradle index b05c01ffb9..9bfdcf3e1f 100644 --- a/wear/build.gradle +++ b/wear/build.gradle @@ -21,11 +21,6 @@ apply from: "${project.rootDir}/core/android_dependencies.gradle" apply from: "${project.rootDir}/core/jacoco_global.gradle" -ext { - wearableVersion = "2.9.0" - playServicesWearable = "17.1.0" -} - def generateGitBuild = { -> StringBuilder stringBuilder = new StringBuilder() @@ -103,9 +98,9 @@ dependencies { implementation 'androidx.wear:wear:1.2.0' implementation "androidx.wear.tiles:tiles:1.0.1" - compileOnly "com.google.android.wearable:wearable:${wearableVersion}" - implementation "com.google.android.support:wearable:${wearableVersion}" - implementation "com.google.android.gms:play-services-wearable:${playServicesWearable}" + compileOnly "com.google.android.wearable:wearable:$wearable_version" + implementation "com.google.android.support:wearable:$wearable_version" + implementation "com.google.android.gms:play-services-wearable:$play_services_wearable_version" implementation(files('libs/ustwo-clockwise-debug.aar')) implementation(files('libs/wearpreferenceactivity-0.5.0.aar')) implementation('com.github.lecho:hellocharts-library:1.5.8@aar')