Skip to content

Commit

Permalink
Finish some sdk upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
hufman committed Feb 22, 2024
1 parent ea47ba5 commit 1ff2f96
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 20 deletions.
4 changes: 2 additions & 2 deletions androbd_gestalt/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.IDriveConnectAddons">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
Expand Down Expand Up @@ -39,7 +39,7 @@
</service>

<!-- Become discoverable in the Addons tab -->
<service android:name=".GestaltPlugin">
<service android:name=".GestaltPlugin" android:exported="true">
<intent-filter>
<action android:name="io.bimmergestalt.cardata.service" />
</intent-filter>
Expand Down
4 changes: 2 additions & 2 deletions bimmerscrobbler/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.IDriveConnectAddons">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand All @@ -20,7 +20,7 @@

<!-- Become discoverable in the Addons tab -->
<!-- Also becomes bound when the car connects -->
<service android:name=".MainService">
<service android:name=".MainService" android:exported="true">
<intent-filter>
<action android:name="io.bimmergestalt.cardata.service" />
</intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class MainService: Service() {
const val TAG = "BimmerScrobbler"
}

val scrobbleAnnouncer by lazy {ScrobbleAnnouncer(this.applicationContext)}
val multimedia = CDSLiveData(this.contentResolver, CDSProperty.ENTERTAINMENT_MULTIMEDIA)
val multimediaObserver by lazy { MultimediaObserver(scrobbleAnnouncer) }
private val scrobbleAnnouncer by lazy {ScrobbleAnnouncer(this.applicationContext)}
private val multimedia = CDSLiveData(this.contentResolver, CDSProperty.ENTERTAINMENT_MULTIMEDIA)
private val multimediaObserver by lazy { MultimediaObserver(scrobbleAnnouncer) }

override fun onCreate() {
super.onCreate()
Expand All @@ -45,12 +45,12 @@ class MainService: Service() {
}
}

class MultimediaObserver(val announcer: ScrobbleAnnouncer): Observer<Map<String, Any>> {
override fun onChanged(t: Map<String, Any>) {
val sourceId = t["source"] as? Int ?: 0
val artist = t["artist"] as? String ?: ""
val album = t["album"] as? String ?: ""
val title = t["title"] as? String ?: ""
class MultimediaObserver(private val announcer: ScrobbleAnnouncer): Observer<Map<String, Any>> {
override fun onChanged(value: Map<String, Any>) {
val sourceId = value["source"] as? Int ?: 0
val artist = value["artist"] as? String ?: ""
val album = value["album"] as? String ?: ""
val title = value["title"] as? String ?: ""
MainModel.source.value = if (sourceId > 0) sourceId.toString() else ""
MainModel.artist.value = artist
MainModel.album.value = album
Expand Down
4 changes: 2 additions & 2 deletions cds_details/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.IDriveConnectAddons">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>

<!-- Become discoverable in the Addons tab -->
<service android:name=".MainService">
<service android:name=".MainService" android:exported="true">
<intent-filter>
<action android:name="io.bimmergestalt.cardata.service" />
</intent-filter>
Expand Down
4 changes: 2 additions & 2 deletions cds_gauges/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.CDSGauges">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>

<!-- Become discoverable in the Addons tab -->
<service android:name=".MainService">
<service android:name=".MainService" android:exported="true">
<intent-filter>
<action android:name="io.bimmergestalt.cardata.service" />
</intent-filter>
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ android.useAndroidX=true
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
4 changes: 2 additions & 2 deletions screen_mirror/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.IDriveConnectAddons">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity android:name=".RequestActivity" />
<service android:name=".CarAppService">
<service android:name=".CarAppService" android:exported="true">
<intent-filter>
<action android:name="io.bimmergestalt.carconnection.service" />
</intent-filter>
Expand Down

0 comments on commit 1ff2f96

Please sign in to comment.