Merge "TIF: Address API review comments" into nyc-dev

am: b0df08598c

* commit 'b0df08598c9005938a8315a76c148967e6e06fc4':
  TIF: Address API review comments

Change-Id: I9e493f4bbee4cf6cd6382fb0539c357083c23617
This commit is contained in:
Dongwon Kang
2016-04-22 18:00:41 +00:00
committed by android-build-merger
6 changed files with 20 additions and 34 deletions

View File

@@ -23025,6 +23025,7 @@ package android.media.tv {
method public boolean isRatingBlocked(android.media.tv.TvContentRating);
method public void registerCallback(android.media.tv.TvInputManager.TvInputCallback, android.os.Handler);
method public void unregisterCallback(android.media.tv.TvInputManager.TvInputCallback);
method public void updateTvInputInfo(android.media.tv.TvInputInfo);
field public static final java.lang.String ACTION_BLOCKED_RATINGS_CHANGED = "android.media.tv.action.BLOCKED_RATINGS_CHANGED";
field public static final java.lang.String ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED = "android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED";
field public static final java.lang.String ACTION_QUERY_CONTENT_RATING_SYSTEMS = "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS";
@@ -23062,7 +23063,6 @@ package android.media.tv {
method public final android.os.IBinder onBind(android.content.Intent);
method public android.media.tv.TvInputService.RecordingSession onCreateRecordingSession(java.lang.String);
method public abstract android.media.tv.TvInputService.Session onCreateSession(java.lang.String);
method public static final void updateTvInputInfo(android.content.Context, android.media.tv.TvInputInfo);
field public static final java.lang.String SERVICE_INTERFACE = "android.media.tv.TvInputService";
field public static final java.lang.String SERVICE_META_DATA = "android.media.tv.input";
}

View File

@@ -24711,6 +24711,7 @@ package android.media.tv {
method public void removeBlockedRating(android.media.tv.TvContentRating);
method public void setParentalControlsEnabled(boolean);
method public void unregisterCallback(android.media.tv.TvInputManager.TvInputCallback);
method public void updateTvInputInfo(android.media.tv.TvInputInfo);
field public static final java.lang.String ACTION_BLOCKED_RATINGS_CHANGED = "android.media.tv.action.BLOCKED_RATINGS_CHANGED";
field public static final java.lang.String ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED = "android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED";
field public static final java.lang.String ACTION_QUERY_CONTENT_RATING_SYSTEMS = "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS";
@@ -24765,7 +24766,6 @@ package android.media.tv {
method public java.lang.String onHardwareRemoved(android.media.tv.TvInputHardwareInfo);
method public android.media.tv.TvInputInfo onHdmiDeviceAdded(android.hardware.hdmi.HdmiDeviceInfo);
method public java.lang.String onHdmiDeviceRemoved(android.hardware.hdmi.HdmiDeviceInfo);
method public static final void updateTvInputInfo(android.content.Context, android.media.tv.TvInputInfo);
field public static final java.lang.String SERVICE_INTERFACE = "android.media.tv.TvInputService";
field public static final java.lang.String SERVICE_META_DATA = "android.media.tv.input";
}

View File

@@ -23093,6 +23093,7 @@ package android.media.tv {
method public boolean isRatingBlocked(android.media.tv.TvContentRating);
method public void registerCallback(android.media.tv.TvInputManager.TvInputCallback, android.os.Handler);
method public void unregisterCallback(android.media.tv.TvInputManager.TvInputCallback);
method public void updateTvInputInfo(android.media.tv.TvInputInfo);
field public static final java.lang.String ACTION_BLOCKED_RATINGS_CHANGED = "android.media.tv.action.BLOCKED_RATINGS_CHANGED";
field public static final java.lang.String ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED = "android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED";
field public static final java.lang.String ACTION_QUERY_CONTENT_RATING_SYSTEMS = "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS";
@@ -23130,7 +23131,6 @@ package android.media.tv {
method public final android.os.IBinder onBind(android.content.Intent);
method public android.media.tv.TvInputService.RecordingSession onCreateRecordingSession(java.lang.String);
method public abstract android.media.tv.TvInputService.Session onCreateSession(java.lang.String);
method public static final void updateTvInputInfo(android.content.Context, android.media.tv.TvInputInfo);
field public static final java.lang.String SERVICE_INTERFACE = "android.media.tv.TvInputService";
field public static final java.lang.String SERVICE_META_DATA = "android.media.tv.input";
}

View File

@@ -8083,11 +8083,11 @@ i
<attr name="settingsActivity" />
<!-- Attribute whether the TV input service can record programs. This value can be changed
at runtime by calling
{@link android.media.tv.TvInputService#updateTvInputInfo(android.content.Context, android.media.tv.TvInputInfo)}. -->
{@link android.media.tv.TvInputManager#updateTvInputInfo(android.media.tv.TvInputInfo)}. -->
<attr name="canRecord" format="boolean" />
<!-- The number of tuners that the TV input service is associated with. This value can be
changed at runtime by calling
{@link android.media.tv.TvInputService#updateTvInputInfo(android.content.Context, android.media.tv.TvInputInfo)}. -->
{@link android.media.tv.TvInputManager#updateTvInputInfo(android.media.tv.TvInputInfo)}. -->
<attr name="tunerCount" format="integer" />
</declare-styleable>

View File

@@ -191,7 +191,9 @@ public final class TvInputManager {
/**
* Error for {@link TvInputService.RecordingSession#notifyError(int)} and
* {@link TvRecordingClient.RecordingCallback#onError(int)}: The requested operation cannot be
* completed due to a problem that does not fit under any other error codes.
* completed due to a problem that does not fit under any other error codes, or the error code
* for the problem is defined on the higher version than application's
* <code>android:targetSdkVersion</code>.
*/
public static final int RECORDING_ERROR_UNKNOWN = 0;
@@ -1181,14 +1183,23 @@ public final class TvInputManager {
}
/**
* Updates information about an existing TV input.
* Updates the <code>TvInputInfo</code> for an existing TV input. A TV input service
* implementation may call this method to pass the application and system an up-to-date
* <code>TvInputInfo</code> object that describes itself.
*
* <p>This is called internally only by {@link TvInputService}.
* <p>The system automatically creates a <code>TvInputInfo</code> object for each TV input,
* based on the information collected from the <code>AndroidManifest.xml</code>, thus it is not
* necessary to call this method unless such information has changed dynamically.
* Use {@link TvInputInfo.Builder} to build a new <code>TvInputInfo</code> object.
*
* <p>Attempting to change information about a TV input that the calling package does not own
* does nothing.
*
* @param inputInfo The <code>TvInputInfo</code> object that contains new information.
* @throws IllegalArgumentException if the argument is {@code null}.
* @see TvInputCallback#onTvInputInfoUpdated(TvInputInfo)
*/
void updateTvInputInfo(@NonNull TvInputInfo inputInfo) {
public void updateTvInputInfo(@NonNull TvInputInfo inputInfo) {
Preconditions.checkNotNull(inputInfo);
try {
mService.updateTvInputInfo(inputInfo, mUserId);

View File

@@ -256,31 +256,6 @@ public abstract class TvInputService extends Service {
return null;
}
/**
* Updates the <code>TvInputInfo</code> for an existing TV input. A TV input service
* implementation may call this method to pass the application and system an up-to-date
* <code>TvInputInfo</code> object that describes itself.
*
* <p>The system automatically creates a <code>TvInputInfo</code> object for each TV input,
* based on the information collected from the <code>AndroidManifest.xml</code>, thus it is not
* necessary to call this method unless such information has changed dynamically.
* Use {@link TvInputInfo.Builder} to build a new <code>TvInputInfo</code> object.
*
* <p>Attempting to change information about a TV input that the calling package does not own
* does nothing.
*
* @param context The application context.
* @param inputInfo The <code>TvInputInfo</code> object that contains new information.
* @see TvInputManager.TvInputCallback#onTvInputInfoUpdated(TvInputInfo)
*/
public static final void updateTvInputInfo(Context context, TvInputInfo inputInfo) {
TvInputManager manager = (TvInputManager) context.getSystemService(
Context.TV_INPUT_SERVICE);
if (manager != null) {
manager.updateTvInputInfo(inputInfo);
}
}
private boolean isPassthroughInput(String inputId) {
if (mTvInputManager == null) {
mTvInputManager = (TvInputManager) getSystemService(Context.TV_INPUT_SERVICE);