Skip to content

Commit

Permalink
runtime detection of fire os;
Browse files Browse the repository at this point in the history
  • Loading branch information
truefedex committed Aug 21, 2020
1 parent f8e19f0 commit 32f9570
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android {
applicationId "com.phlox.tvwebbrowser"
minSdkVersion 21
targetSdkVersion 29
versionCode 39
versionCode 40
versionName "1.5.6"

javaCompileOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import androidx.core.content.ContextCompat
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import com.phlox.tvwebbrowser.BuildConfig
import com.phlox.tvwebbrowser.R
import com.phlox.tvwebbrowser.TVBro
import com.phlox.tvwebbrowser.activity.downloads.DownloadsActivity
Expand Down Expand Up @@ -118,7 +117,7 @@ class MainActivity : AppCompatActivity(), CoroutineScope by MainScope() {
}
})

if (BuildConfig.FLAVOR_appstore == "amazon") {
if (Utils.isFireTV(this)) {
ibVoiceSearch.visibility = View.GONE
ibMenu.nextFocusRightId = R.id.ibHistory
} else {
Expand Down Expand Up @@ -474,7 +473,7 @@ class MainActivity : AppCompatActivity(), CoroutineScope by MainScope() {
}
}

if (BuildConfig.FLAVOR_appstore == "amazon") {
if (Utils.isFireTV(this@MainActivity)) {
//amazon blocks some downloads, this is workaround
viewModel.logCatOutput().observe(this@MainActivity, Observer{ logMessage ->
if (logMessage.endsWith("AwContentsClientBridge: Dropping new download request.")) {
Expand Down

0 comments on commit 32f9570

Please sign in to comment.