diff options
author | Nick Chalko <nchalko@google.com> | 2019-09-13 15:32:31 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2019-09-13 16:25:24 -0700 |
commit | 5f6346e53981c847909d238d330805836052c4bc (patch) | |
tree | 11d7a8c1412a7dbac9933911867c8af0340fc2a3 /src/com/android/tv/MainActivity.java | |
parent | 50b065b68a685d85b098527eb94184f7c4568c6e (diff) | |
download | TV-5f6346e53981c847909d238d330805836052c4bc.tar.gz |
Allow testing when we are not a system app
PiperOrigin-RevId: 268993976
Change-Id: Ic42778806a9ff18664b8273afa30000908b02e18
Diffstat (limited to 'src/com/android/tv/MainActivity.java')
-rw-r--r-- | src/com/android/tv/MainActivity.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/tv/MainActivity.java b/src/com/android/tv/MainActivity.java index 141ce822..7a591500 100644 --- a/src/com/android/tv/MainActivity.java +++ b/src/com/android/tv/MainActivity.java @@ -16,6 +16,8 @@ package com.android.tv; +import static com.android.tv.common.feature.SystemAppFeature.SYSTEM_APP_FEATURE; + import android.app.Activity; import android.app.PendingIntent; import android.app.SearchManager; @@ -2740,7 +2742,10 @@ public class MainActivity extends Activity return; } - Utils.enableAllChannels(this); + // Only try to set the channels browseable if we are a system app. + if (SYSTEM_APP_FEATURE.isEnabled(getApplicationContext())) { + Utils.enableAllChannels(this); + } } // Lazy initialization |