Skip to content

Commit

Permalink
android: don't show permissions for TV
Browse files Browse the repository at this point in the history
Android TV has limited support for notifications compared to mobile - notifications are not show in the system UI to provide a leanback experience. Remove 'Permissions' from Settings menu.

Fixes tailscale/corp/#21034

Signed-off-by: kari-ts <[email protected]>
  • Loading branch information
kari-ts committed Oct 24, 2024
1 parent 2e9f6b7 commit 88d7ef3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import com.tailscale.ipn.ui.viewModel.SettingsNav
import com.tailscale.ipn.ui.viewModel.SettingsViewModel
import com.tailscale.ipn.ui.viewModel.VpnViewModel
import com.tailscale.ipn.ui.notifier.Notifier
import com.tailscale.ipn.ui.util.AndroidTVUtil
import com.tailscale.ipn.ui.util.AppVersion

@Composable
Expand Down Expand Up @@ -96,9 +97,10 @@ fun SettingsView(settingsNav: SettingsNav, viewModel: SettingsViewModel = viewMo
},
onClick = settingsNav.onNavigateToTailnetLock)
}

Lists.ItemDivider()
Setting.Text(R.string.permissions, onClick = settingsNav.onNavigateToPermissions)
if (!AndroidTVUtil.isAndroidTV()){
Lists.ItemDivider()
Setting.Text(R.string.permissions, onClick = settingsNav.onNavigateToPermissions)
}

managedByOrganization.value?.let {
Lists.ItemDivider()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class LoginQRViewModel : IpnViewModel() {
val numCode: StateFlow<String?> = MutableStateFlow(null)
val qrCode: StateFlow<ImageBitmap?> = MutableStateFlow(null)
// Remove this once changes to admin console allowing input code to be entered are made.
val codeEnabled = false
val codeEnabled = true

init {
viewModelScope.launch {
Expand Down

0 comments on commit 88d7ef3

Please sign in to comment.