Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76091655 authored by Chaohui Wang's avatar Chaohui Wang Committed by Android (Google) Code Review
Browse files

Merge "Add lifecycle-livedata-ktx for SpaLib"

parents 931c8c70 409c5667
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@
    },
    {
      "name": "SpaPrivilegedLibTests"
    },
    {
      "name": "SettingsSpaUnitTests"
    }
  ]
}
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ android_library {
        "androidx.compose.runtime_runtime",
        "androidx.compose.runtime_runtime-livedata",
        "androidx.compose.ui_ui-tooling-preview",
        "androidx.lifecycle_lifecycle-livedata-ktx",
        "androidx.navigation_navigation-compose",
        "com.google.android.material_material",
        "lottie_compose",
+5 −4
Original line number Diff line number Diff line
@@ -59,13 +59,14 @@ android {
}

dependencies {
    api "androidx.appcompat:appcompat:1.6.0-rc01"
    api "androidx.appcompat:appcompat:1.7.0-alpha01"
    api "androidx.compose.material3:material3:$jetpack_compose_material3_version"
    api "androidx.compose.material:material-icons-extended:$jetpack_compose_version"
    api "androidx.compose.runtime:runtime-livedata:$jetpack_compose_version"
    api "androidx.compose.ui:ui-tooling-preview:$jetpack_compose_version"
    api 'androidx.navigation:navigation-compose:2.5.0'
    api 'com.google.android.material:material:1.6.1'
    api "androidx.lifecycle:lifecycle-livedata-ktx:2.6.0-alpha02"
    api "androidx.navigation:navigation-compose:2.5.0"
    api "com.google.android.material:material:1.6.1"
    debugApi "androidx.compose.ui:ui-tooling:$jetpack_compose_version"
    implementation 'com.airbnb.android:lottie-compose:5.2.0'
    implementation "com.airbnb.android:lottie-compose:5.2.0"
}
+10 −0
Original line number Diff line number Diff line
{
  "presubmit": [
    {
      "name": "SpaPrivilegedLibTests"
    },
    {
      "name": "SettingsSpaUnitTests"
    }
  ]
}
+2 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ import android.content.Context
import android.content.pm.ApplicationInfo
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import androidx.lifecycle.map

class AppOpsController(
    context: Context,
@@ -36,7 +36,7 @@ class AppOpsController(
    val mode: LiveData<Int>
        get() = _mode
    val isAllowed: LiveData<Boolean>
        get() = Transformations.map(_mode) { it == MODE_ALLOWED }
        get() = _mode.map { it == MODE_ALLOWED }

    fun setAllowed(allowed: Boolean) {
        val mode = if (allowed) MODE_ALLOWED else MODE_ERRORED
Loading