diff --git a/app/src/main/java/io/homeassistant/companion/android/settings/SettingsFragment.kt b/app/src/main/java/io/homeassistant/companion/android/settings/SettingsFragment.kt index a2e0ac6efe4..a0e0780efab 100644 --- a/app/src/main/java/io/homeassistant/companion/android/settings/SettingsFragment.kt +++ b/app/src/main/java/io/homeassistant/companion/android/settings/SettingsFragment.kt @@ -176,6 +176,8 @@ class SettingsFragment( val isAutomotive = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && requireContext().packageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE) + findPreference("assist")?.isVisible = !isAutomotive + findPreference("widgets")?.isVisible = Build.MODEL != "Quest" && !isAutomotive findPreference("manage_widgets")?.setOnPreferenceClickListener { parentFragmentManager.commit { diff --git a/app/src/main/java/io/homeassistant/companion/android/settings/SettingsPresenterImpl.kt b/app/src/main/java/io/homeassistant/companion/android/settings/SettingsPresenterImpl.kt index 5e8887fe0e6..f6967098ff8 100644 --- a/app/src/main/java/io/homeassistant/companion/android/settings/SettingsPresenterImpl.kt +++ b/app/src/main/java/io/homeassistant/companion/android/settings/SettingsPresenterImpl.kt @@ -257,7 +257,13 @@ class SettingsPresenterImpl @Inject constructor( // Assist var assistantSuggestion = serverManager.defaultServers.any { it.version?.isAtLeast(2023, 5) == true } - assistantSuggestion = if (assistantSuggestion && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + assistantSuggestion = if ( + assistantSuggestion && + Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && + context.packageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE) + ) { + false + } else if (assistantSuggestion && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { val roleManager = context.getSystemService() roleManager?.isRoleAvailable(RoleManager.ROLE_ASSISTANT) == true && !roleManager.isRoleHeld(RoleManager.ROLE_ASSISTANT) } else if (assistantSuggestion && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { diff --git a/automotive/src/main/AndroidManifest.xml b/automotive/src/main/AndroidManifest.xml index 24cb671d1a8..072720277e8 100644 --- a/automotive/src/main/AndroidManifest.xml +++ b/automotive/src/main/AndroidManifest.xml @@ -423,20 +423,7 @@ android:autoRemoveFromRecents="true" android:showWhenLocked="true" android:theme="@style/Theme.HomeAssistant.Assist"> - - - - - - - - - -