Merge "Add poster art uri and thumbnail to program projection map" into lmp-preview-dev
diff --git a/.classpath b/.classpath
deleted file mode 100644
index 3793042..0000000
--- a/.classpath
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="gen"/>
- <classpathentry combineaccessrules="false" kind="src" path="/android-frameworks-base-core-java"/>
- <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
- <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
- <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
- <classpathentry kind="output" path="bin/classes"/>
-</classpath>
diff --git a/.project b/.project
deleted file mode 100644
index 940e13f..0000000
--- a/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>TvProvider</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ApkBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index b080d2d..0000000
--- a/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/bin/AndroidManifest.xml b/bin/AndroidManifest.xml
deleted file mode 100644
index 0549403..0000000
--- a/bin/AndroidManifest.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.providers.tv" >
-
- <!-- Allows an application to read (but not write) the TV channel/program
- data. -->
- <permission android:name="android.permission.READ_EPG_DATA"
- android:protectionLevel="dangerous"
- android:label="@string/permlab_readEpgData"
- android:description="@string/permdesc_readEpgData" />
-
- <!-- Allows an application to write (but not read) the TV channel/program
- data. -->
- <permission android:name="android.permission.WRITE_EPG_DATA"
- android:protectionLevel="dangerous"
- android:label="@string/permlab_writeEpgData"
- android:description="@string/permdesc_writeEpgData" />
-
- <!-- Allows an application to read and write all TV channel/program data.
- @hide -->
- <permission android:name="android.permission.ALL_EPG_DATA"
- android:protectionLevel="signatureOrSystem"
- android:label="@string/permlab_allEpgData"
- android:description="@string/permdesc_allEpgData" />
-
- <!-- Allows an application to read and write the user's TV watch log.
- @hide -->
- <permission android:name="android.permission.TV_WATCH_LOG"
- android:protectionLevel="signature"
- android:label="@string/permlab_tvWatchLog"
- android:description="@string/permdesc_tvWatchLog" />
-
- <application android:label="@string/app_label">
- <provider
- android:name="TvProvider"
- android:authorities="com.android.tv"
- android:exported="true"
- android:syncable="true"
- android:readPermission="android.permission.READ_EPG_DATA"
- android:writePermission="android.permission.WRITE_EPG_DATA">
- <path-permission
- android:pathPrefix="/watched_program"
- android:permission="android.permission.TV_WATCH_LOG" />
- </provider>
- </application>
-</manifest>
diff --git a/bin/classes/.gitignore b/bin/classes/.gitignore
deleted file mode 100644
index c2d9872..0000000
--- a/bin/classes/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/com/
diff --git a/project.properties b/project.properties
deleted file mode 100644
index a3ee5ab..0000000
--- a/project.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system edit
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-#
-# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
-#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
-
-# Project target.
-target=android-17
diff --git a/src/com/android/providers/tv/TvProvider.java b/src/com/android/providers/tv/TvProvider.java
index d01feb0..3016d25 100644
--- a/src/com/android/providers/tv/TvProvider.java
+++ b/src/com/android/providers/tv/TvProvider.java
@@ -108,6 +108,7 @@
sChannelProjectionMap.put(Channels.COLUMN_DISPLAY_NAME, Channels.COLUMN_DISPLAY_NAME);
sChannelProjectionMap.put(Channels.COLUMN_DESCRIPTION, Channels.COLUMN_DESCRIPTION);
sChannelProjectionMap.put(Channels.COLUMN_BROWSABLE, Channels.COLUMN_BROWSABLE);
+ sChannelProjectionMap.put(Channels.COLUMN_SEARCHABLE, Channels.COLUMN_SEARCHABLE);
sChannelProjectionMap.put(Channels.COLUMN_INTERNAL_PROVIDER_DATA,
Channels.COLUMN_INTERNAL_PROVIDER_DATA);
sChannelProjectionMap.put(Channels.COLUMN_VERSION_NUMBER, Channels.COLUMN_VERSION_NUMBER);
@@ -151,7 +152,7 @@
WatchedPrograms.COLUMN_DESCRIPTION);
}
- private static final int DATABASE_VERSION = 3;
+ private static final int DATABASE_VERSION = 4;
private static final String DATABASE_NAME = "tv.db";
private static final String CHANNELS_TABLE = "channels";
private static final String PROGRAMS_TABLE = "programs";
@@ -189,6 +190,7 @@
+ Channels.COLUMN_DISPLAY_NAME + " TEXT,"
+ Channels.COLUMN_DESCRIPTION + " TEXT,"
+ Channels.COLUMN_BROWSABLE + " INTEGER NOT NULL DEFAULT 1,"
+ + Channels.COLUMN_SEARCHABLE + " INTEGER NOT NULL DEFAULT 1,"
+ Channels.COLUMN_INTERNAL_PROVIDER_DATA + " BLOB,"
+ Channels.COLUMN_VERSION_NUMBER + " INTEGER"
+ ");");
@@ -307,6 +309,11 @@
case MATCH_CHANNEL_ID_PROGRAM:
queryBuilder.setTables(PROGRAMS_TABLE);
queryBuilder.setProjectionMap(sProgramProjectionMap);
+ selection = DatabaseUtils.concatenateWhere(selection,
+ Programs.COLUMN_CHANNEL_ID + "=?");
+ selectionArgs = DatabaseUtils.appendSelectionArgs(selectionArgs, new String[] {
+ TvContract.getChannelId(uri)
+ });
String paramStartTime = uri.getQueryParameter(TvContract.PARAM_START_TIME);
String paramEndTime = uri.getQueryParameter(TvContract.PARAM_END_TIME);
if (paramStartTime != null && paramEndTime != null) {
@@ -317,12 +324,6 @@
selectionArgs = DatabaseUtils.appendSelectionArgs(selectionArgs, new String[] {
TvContract.getChannelId(uri), endTime, startTime
});
- } else {
- selection = DatabaseUtils.concatenateWhere(selection,
- Programs.COLUMN_CHANNEL_ID + "=?");
- selectionArgs = DatabaseUtils.appendSelectionArgs(selectionArgs, new String[] {
- TvContract.getChannelId(uri)
- });
}
orderBy = DEFAULT_PROGRAMS_SORT_ORDER;
break;