kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
Merge branch 'meshtastic:master' into osmdroid-phase2
commit
ec61d0c66e
|
@ -24,17 +24,14 @@ jobs:
|
|||
cp ./app/special/curfirmwareversion.xml ./app/src/main/res/values/
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: 'adopt'
|
||||
java-version: '11'
|
||||
distribution: 'temurin'
|
||||
cache: gradle
|
||||
|
||||
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Integration test
|
||||
run: ./gradlew test --stacktrace
|
||||
|
||||
- name: Build debug APK
|
||||
run: ./gradlew assembleDebug
|
||||
|
|
|
@ -30,10 +30,10 @@ jobs:
|
|||
KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }}
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: 'adopt'
|
||||
java-version: '11'
|
||||
distribution: 'temurin'
|
||||
# Note: we don't use caches on release builds because we don't want to accidentally not have a virgin build machine
|
||||
|
||||
- name: Find firmware release tag
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-parcelize'
|
||||
apply plugin: 'kotlinx-serialization'
|
||||
apply plugin: 'dagger.hilt.android.plugin'
|
||||
apply plugin: 'com.github.triplet.play'
|
||||
apply plugin: 'de.mobilej.unmock'
|
||||
// apply plugin: "app.brant.amazonappstorepublisher"
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'kotlin-kapt'
|
||||
id 'kotlin-parcelize'
|
||||
id 'kotlinx-serialization'
|
||||
id 'dagger.hilt.android.plugin'
|
||||
id 'com.github.triplet.play'
|
||||
id 'de.mobilej.unmock'
|
||||
// id "app.brant.amazonappstorepublisher"
|
||||
|
||||
// Firebase Crashlytics
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
// protobufs
|
||||
id 'com.google.protobuf'
|
||||
|
||||
// protobuf
|
||||
apply plugin: 'com.google.protobuf'
|
||||
|
||||
apply plugin: 'kotlin-kapt'
|
||||
// Firebase Crashlytics
|
||||
id 'com.google.gms.google-services'
|
||||
id 'com.google.firebase.crashlytics'
|
||||
}
|
||||
|
||||
unMock {
|
||||
keep "android.net.Uri"
|
||||
|
@ -42,8 +43,8 @@ android {
|
|||
applicationId "com.geeksville.mesh"
|
||||
minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works)
|
||||
targetSdkVersion 30
|
||||
versionCode 20341 // format is Mmmss (where M is 1+the numeric major number
|
||||
versionName "1.3.41"
|
||||
versionCode 20342 // format is Mmmss (where M is 1+the numeric major number
|
||||
versionName "1.3.42"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
// per https://developer.android.com/studio/write/vector-asset-studio
|
||||
|
|
|
@ -9,11 +9,8 @@ import com.geeksville.mesh.util.Exceptions
|
|||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
|
||||
// NOTE: This is a workaround since the Hilt Gradle plugin doesn't support constructors with default parameters
|
||||
open class GeeksvilleApplicationWrapper : GeeksvilleApplication()
|
||||
|
||||
@HiltAndroidApp
|
||||
class MeshUtilApplication : GeeksvilleApplicationWrapper() {
|
||||
class MeshUtilApplication : GeeksvilleApplication() {
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
|
|
@ -4,7 +4,6 @@ import android.app.Activity
|
|||
import android.app.Application
|
||||
import android.content.Context
|
||||
import android.content.SharedPreferences
|
||||
import android.net.ConnectivityManager
|
||||
import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import androidx.core.content.edit
|
||||
|
@ -23,11 +22,7 @@ fun isGooglePlayAvailable(context: Context): Boolean {
|
|||
* Created by kevinh on 1/4/15.
|
||||
*/
|
||||
|
||||
open class GeeksvilleApplication(
|
||||
val splunkKey: String? = null,
|
||||
val mixpanelKey: String? = null,
|
||||
val pushKey: String? = null
|
||||
) : Application(), Logging {
|
||||
open class GeeksvilleApplication : Application(), Logging {
|
||||
|
||||
companion object {
|
||||
lateinit var analytics: AnalyticsProvider
|
||||
|
@ -88,7 +83,7 @@ open class GeeksvilleApplication(
|
|||
}
|
||||
|
||||
override fun onCreate() {
|
||||
super<Application>.onCreate()
|
||||
super.onCreate()
|
||||
|
||||
val googleAnalytics = com.geeksville.mesh.analytics.GoogleAnalytics(this)
|
||||
analytics = googleAnalytics
|
||||
|
@ -98,15 +93,4 @@ open class GeeksvilleApplication(
|
|||
|
||||
registerActivityLifecycleCallbacks(lifecycleCallbacks)
|
||||
}
|
||||
|
||||
fun isInternetConnected(): Boolean {
|
||||
val cm = getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
||||
|
||||
val activeNetwork = cm.getActiveNetworkInfo();
|
||||
val isConnected = activeNetwork != null &&
|
||||
activeNetwork.isConnectedOrConnecting();
|
||||
|
||||
return isConnected
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ class MeshService : Service(), Logging {
|
|||
|
||||
/** The minimmum firmware version we know how to talk to. We'll still be able to talk to 1.0 firmwares but only well enough to ask them to firmware update
|
||||
*/
|
||||
val minDeviceVersion = DeviceVersion("1.3.0")
|
||||
val minDeviceVersion = DeviceVersion("1.3.41")
|
||||
}
|
||||
|
||||
enum class ConnectionState {
|
||||
|
@ -1116,8 +1116,9 @@ class MeshService : Service(), Logging {
|
|||
}
|
||||
|
||||
private fun onRadioConnectionState(state: RadioServiceConnectionState) {
|
||||
// sleep now disabled by default on ESP32, permanent is true unless isPowerSaving enabled
|
||||
val lsEnabled = localConfig.power?.isPowerSaving ?: false
|
||||
// sleep now disabled by default on ESP32, permanent is true unless light sleep enabled
|
||||
val isRouter = localConfig.device.role == ConfigProtos.Config.DeviceConfig.Role.ROUTER
|
||||
val lsEnabled = localConfig.power.isPowerSaving || isRouter
|
||||
val connected = state.isConnected
|
||||
val permanent = state.isPermanent || !lsEnabled
|
||||
onConnectionChanged(
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0328a5269f8368f1eaa617d0e39f886d03d44c76
|
||||
Subproject commit d3375fe599da1dd48572354325d3186eccf6f449
|
12
build.gradle
12
build.gradle
|
@ -1,11 +1,13 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.6.21'
|
||||
ext.coroutines_version = '1.6.0'
|
||||
ext.room_version = '2.4.3'
|
||||
ext.hilt_version = '2.40.5'
|
||||
ext.datastore_version = '1.0.0'
|
||||
ext {
|
||||
kotlin_version = '1.6.21'
|
||||
coroutines_version = '1.6.0'
|
||||
room_version = '2.4.3'
|
||||
hilt_version = '2.40.5'
|
||||
datastore_version = '1.0.0'
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
|
|
Ładowanie…
Reference in New Issue