From 9403e2251e9da253708bf58fc93e71e8134f4ac6 Mon Sep 17 00:00:00 2001 From: Live Channels Team Date: Mon, 1 Oct 2018 19:42:11 -0700 Subject: Cherry pick and update mk file and manifest: Migrate tv_provider to androidx. Original CLs: cl/215324034, ag/5160965 Global Presubmit: https://test.corp.google.com/ui#id=OCL:211845562:BASE:214880710:1538105575588:2de754bb Test: make LiveTv; Change-Id: I0b8d92f4c4e89e4d8203b173dd57cda04197ff2d PiperOrigin-RevId: 215324034 --- src/com/android/tv/data/PreviewDataManager.java | 62 +++++++++++----------- src/com/android/tv/data/PreviewProgramContent.java | 2 +- .../android/tv/dvr/DvrStorageStatusManager.java | 2 +- .../tv/recommendation/ChannelPreviewUpdater.java | 2 +- 4 files changed, 34 insertions(+), 34 deletions(-) (limited to 'src/com/android/tv') diff --git a/src/com/android/tv/data/PreviewDataManager.java b/src/com/android/tv/data/PreviewDataManager.java index 39855bcd..df91e9a3 100644 --- a/src/com/android/tv/data/PreviewDataManager.java +++ b/src/com/android/tv/data/PreviewDataManager.java @@ -30,10 +30,10 @@ import android.os.AsyncTask; import android.os.Build; import android.support.annotation.IntDef; import android.support.annotation.MainThread; -import android.support.media.tv.ChannelLogoUtils; -import android.support.media.tv.PreviewProgram; import android.util.Log; import android.util.Pair; +import androidx.tvprovider.media.tv.ChannelLogoUtils; +import androidx.tvprovider.media.tv.PreviewProgram; import com.android.tv.R; import com.android.tv.common.util.PermissionUtils; import java.lang.annotation.Retention; @@ -221,17 +221,17 @@ public class PreviewDataManager { new Pair<>(PARAM_PREVIEW, String.valueOf(true))); String packageName = mContext.getPackageName(); if (PermissionUtils.hasAccessAllEpg(mContext)) { - try (Cursor cursor = - mContentResolver.query( - previewChannelsUri, - android.support.media.tv.Channel.PROJECTION, - mChannelSelection, - new String[] {packageName}, - null)) { + try (Cursor cursor = + mContentResolver.query( + previewChannelsUri, + androidx.tvprovider.media.tv.Channel.PROJECTION, + mChannelSelection, + new String[] {packageName}, + null)) { if (cursor != null) { while (cursor.moveToNext()) { - android.support.media.tv.Channel previewChannel = - android.support.media.tv.Channel.fromCursor(cursor); + androidx.tvprovider.media.tv.Channel previewChannel = + androidx.tvprovider.media.tv.Channel.fromCursor(cursor); Long previewChannelType = previewChannel.getInternalProviderFlag1(); if (previewChannelType != null) { previewData.addPreviewChannelId( @@ -241,17 +241,17 @@ public class PreviewDataManager { } } } else { - try (Cursor cursor = - mContentResolver.query( - previewChannelsUri, - android.support.media.tv.Channel.PROJECTION, - null, - null, - null)) { + try (Cursor cursor = + mContentResolver.query( + previewChannelsUri, + androidx.tvprovider.media.tv.Channel.PROJECTION, + null, + null, + null)) { if (cursor != null) { while (cursor.moveToNext()) { - android.support.media.tv.Channel previewChannel = - android.support.media.tv.Channel.fromCursor(cursor); + androidx.tvprovider.media.tv.Channel previewChannel = + androidx.tvprovider.media.tv.Channel.fromCursor(cursor); Long previewChannelType = previewChannel.getInternalProviderFlag1(); if (packageName.equals(previewChannel.getPackageName()) && previewChannelType != null) { @@ -552,19 +552,19 @@ public class PreviewDataManager { /** A utils class for preview data. */ public static final class PreviewDataUtils { - /** Creates a preview channel. */ - public static android.support.media.tv.Channel createPreviewChannel( - Context context, @PreviewChannelType long previewChannelType) { + /** Creates a preview channel. */ + public static androidx.tvprovider.media.tv.Channel createPreviewChannel( + Context context, @PreviewChannelType long previewChannelType) { if (previewChannelType == TYPE_RECORDED_PROGRAM_PREVIEW_CHANNEL) { return createRecordedProgramPreviewChannel(context, previewChannelType); } return createDefaultPreviewChannel(context, previewChannelType); } - private static android.support.media.tv.Channel createDefaultPreviewChannel( - Context context, @PreviewChannelType long previewChannelType) { - android.support.media.tv.Channel.Builder builder = - new android.support.media.tv.Channel.Builder(); + private static androidx.tvprovider.media.tv.Channel createDefaultPreviewChannel( + Context context, @PreviewChannelType long previewChannelType) { + androidx.tvprovider.media.tv.Channel.Builder builder = + new androidx.tvprovider.media.tv.Channel.Builder(); CharSequence appLabel = context.getApplicationInfo().loadLabel(context.getPackageManager()); CharSequence appDescription = @@ -577,10 +577,10 @@ public class PreviewDataManager { return builder.build(); } - private static android.support.media.tv.Channel createRecordedProgramPreviewChannel( - Context context, @PreviewChannelType long previewChannelType) { - android.support.media.tv.Channel.Builder builder = - new android.support.media.tv.Channel.Builder(); + private static androidx.tvprovider.media.tv.Channel createRecordedProgramPreviewChannel( + Context context, @PreviewChannelType long previewChannelType) { + androidx.tvprovider.media.tv.Channel.Builder builder = + new androidx.tvprovider.media.tv.Channel.Builder(); builder.setType(TvContract.Channels.TYPE_PREVIEW) .setDisplayName( context.getResources() diff --git a/src/com/android/tv/data/PreviewProgramContent.java b/src/com/android/tv/data/PreviewProgramContent.java index b5156408..8d4b88cf 100644 --- a/src/com/android/tv/data/PreviewProgramContent.java +++ b/src/com/android/tv/data/PreviewProgramContent.java @@ -19,9 +19,9 @@ package com.android.tv.data; import android.content.Context; import android.net.Uri; import android.support.annotation.VisibleForTesting; -import android.support.media.tv.TvContractCompat; import android.text.TextUtils; import android.util.Pair; +import androidx.tvprovider.media.tv.TvContractCompat; import com.android.tv.TvSingletons; import com.android.tv.data.api.Channel; import com.android.tv.dvr.data.RecordedProgram; diff --git a/src/com/android/tv/dvr/DvrStorageStatusManager.java b/src/com/android/tv/dvr/DvrStorageStatusManager.java index 4cf88323..dc347a9e 100644 --- a/src/com/android/tv/dvr/DvrStorageStatusManager.java +++ b/src/com/android/tv/dvr/DvrStorageStatusManager.java @@ -25,8 +25,8 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.RemoteException; import android.support.annotation.Nullable; -import android.support.media.tv.TvContractCompat; import android.util.Log; +import androidx.tvprovider.media.tv.TvContractCompat; import com.android.tv.TvSingletons; import com.android.tv.common.recording.RecordingStorageStatusManager; import com.android.tv.common.util.CommonUtils; diff --git a/src/com/android/tv/recommendation/ChannelPreviewUpdater.java b/src/com/android/tv/recommendation/ChannelPreviewUpdater.java index 935f46fa..7dea255e 100644 --- a/src/com/android/tv/recommendation/ChannelPreviewUpdater.java +++ b/src/com/android/tv/recommendation/ChannelPreviewUpdater.java @@ -25,9 +25,9 @@ import android.content.Context; import android.os.AsyncTask; import android.os.Build; import android.support.annotation.RequiresApi; -import android.support.media.tv.TvContractCompat; import android.text.TextUtils; import android.util.Log; +import androidx.tvprovider.media.tv.TvContractCompat; import com.android.tv.Starter; import com.android.tv.TvSingletons; import com.android.tv.data.PreviewDataManager; -- cgit v1.2.3