TV pakcage and com.google.android.tv.installed feature policy

- Change the feature name from com.google.android.tv.live_channels
  to com.google.android.tv.installed.
- Remove USE_GMS_LIVECHANNELS flag, and use USE_OEM_TV_APP flag instead.
- Do not include Live Channels app if USE_OEM_TV_APP flag is set.

Change-Id: I4223bf3ee797a0c0e65d4bb115f55a32314e8a2a
diff --git a/permissions/com.google.android.tv.live_channels.xml b/permissions/com.google.android.tv.installed.xml
similarity index 91%
rename from permissions/com.google.android.tv.live_channels.xml
rename to permissions/com.google.android.tv.installed.xml
index de0dc98..41fa21f 100644
--- a/permissions/com.google.android.tv.live_channels.xml
+++ b/permissions/com.google.android.tv.installed.xml
@@ -14,5 +14,5 @@
      limitations under the License.
 -->
 <permissions>
-    <feature name="com.google.android.tv.live_channels" />
+    <feature name="com.google.android.tv.installed" />
 </permissions>
diff --git a/products/atv_base.mk b/products/atv_base.mk
index d85c40a..cc1941d 100644
--- a/products/atv_base.mk
+++ b/products/atv_base.mk
@@ -100,11 +100,14 @@
 # Use full NotoSans font
 FONT_NOTOSANS_FULL := true
 
-# A feature com.google.android.tv.live_channels is used to whitelist
-# devices which can support Live Channels app
-ifeq ($(USE_GMS_LIVECHANNELS),true)
+# Do not include the Live Channels app if USE_OEM_TV_APP flag is set.
+# The feature com.google.android.tv.installed is used to tell whether a device
+# has the pre-installed Live Channels app. This is necessary for the Play Store
+# to identify the compatible devices that can install later updates of the app.
+ifneq ($(USE_OEM_TV_APP),true)
+    PRODUCT_PACKAGES += TV
     PRODUCT_COPY_FILES += \
-        device/google/atv/permissions/com.google.android.tv.live_channels.xml:system/etc/permissions/com.google.android.tv.live_channels.xml
+        device/google/atv/permissions/com.google.android.tv.installed.xml:system/etc/permissions/com.google.android.tv.installed.xml
 endif
 
 $(call inherit-product-if-exists, frameworks/base/data/sounds/AllAudio.mk)