Merge "TIAF API review: rename onCreateBiInteractiveApp" into tm-dev am: 6c1f109937
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17078261 Change-Id: I69293b8b295b9747047784587a19332665572cf8
This commit is contained in:
@@ -26221,12 +26221,12 @@ package android.media.tv.interactive {
|
|||||||
method public void onBroadcastInfoResponse(@NonNull android.media.tv.BroadcastInfoResponse);
|
method public void onBroadcastInfoResponse(@NonNull android.media.tv.BroadcastInfoResponse);
|
||||||
method public void onContentAllowed();
|
method public void onContentAllowed();
|
||||||
method public void onContentBlocked(@NonNull android.media.tv.TvContentRating);
|
method public void onContentBlocked(@NonNull android.media.tv.TvContentRating);
|
||||||
method public void onCreateBiInteractiveApp(@NonNull android.net.Uri, @Nullable android.os.Bundle);
|
method public void onCreateBiInteractiveAppRequest(@NonNull android.net.Uri, @Nullable android.os.Bundle);
|
||||||
method @Nullable public android.view.View onCreateMediaView();
|
method @Nullable public android.view.View onCreateMediaView();
|
||||||
method public void onCurrentChannelLcn(int);
|
method public void onCurrentChannelLcn(int);
|
||||||
method public void onCurrentChannelUri(@Nullable android.net.Uri);
|
method public void onCurrentChannelUri(@Nullable android.net.Uri);
|
||||||
method public void onCurrentTvInputId(@Nullable String);
|
method public void onCurrentTvInputId(@Nullable String);
|
||||||
method public void onDestroyBiInteractiveApp(@NonNull String);
|
method public void onDestroyBiInteractiveAppRequest(@NonNull String);
|
||||||
method public boolean onGenericMotionEvent(@NonNull android.view.MotionEvent);
|
method public boolean onGenericMotionEvent(@NonNull android.view.MotionEvent);
|
||||||
method public boolean onKeyDown(int, @NonNull android.view.KeyEvent);
|
method public boolean onKeyDown(int, @NonNull android.view.KeyEvent);
|
||||||
method public boolean onKeyLongPress(int, @NonNull android.view.KeyEvent);
|
method public boolean onKeyLongPress(int, @NonNull android.view.KeyEvent);
|
||||||
@@ -26311,6 +26311,8 @@ package android.media.tv.interactive {
|
|||||||
method public void stopInteractiveApp();
|
method public void stopInteractiveApp();
|
||||||
field public static final String BI_INTERACTIVE_APP_KEY_ALIAS = "alias";
|
field public static final String BI_INTERACTIVE_APP_KEY_ALIAS = "alias";
|
||||||
field public static final String BI_INTERACTIVE_APP_KEY_CERTIFICATE = "certificate";
|
field public static final String BI_INTERACTIVE_APP_KEY_CERTIFICATE = "certificate";
|
||||||
|
field public static final String BI_INTERACTIVE_APP_KEY_HTTP_ADDITIONAL_HEADERS = "http_additional_headers";
|
||||||
|
field public static final String BI_INTERACTIVE_APP_KEY_HTTP_USER_AGENT = "http_user_agent";
|
||||||
field public static final String BI_INTERACTIVE_APP_KEY_PRIVATE_KEY = "private_key";
|
field public static final String BI_INTERACTIVE_APP_KEY_PRIVATE_KEY = "private_key";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -163,7 +163,11 @@ public final class AdRequest implements Parcelable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the metadata of the media file.
|
* Gets the metadata of the media file.
|
||||||
* <p>This includes additional information the TV input needs to play the AD media.
|
*
|
||||||
|
* <p>This includes additional information the TV input needs to play the AD media. This may
|
||||||
|
* include fields in {@link android.media.MediaFormat} like
|
||||||
|
* {@link android.media.MediaFormat#KEY_SAMPLE_RATE}, or integrity information like SHA. What
|
||||||
|
* data is included depends on the format of the media file.
|
||||||
*
|
*
|
||||||
* @return The metadata of the media file. Can be an empty bundle for
|
* @return The metadata of the media file. Can be an empty bundle for
|
||||||
* {@link #REQUEST_TYPE_STOP}.
|
* {@link #REQUEST_TYPE_STOP}.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 The Android Open Source Project
|
* Copyright 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 The Android Open Source Project
|
* Copyright 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 The Android Open Source Project
|
* Copyright 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 The Android Open Source Project
|
* Copyright 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 The Android Open Source Project
|
* Copyright 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 The Android Open Source Project
|
* Copyright 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 The Android Open Source Project
|
* Copyright 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 The Android Open Source Project
|
* Copyright 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 The Android Open Source Project
|
* Copyright 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 The Android Open Source Project
|
* Copyright 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 The Android Open Source Project
|
* Copyright 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -407,9 +407,10 @@ public abstract class TvInteractiveAppService extends Service {
|
|||||||
* no matter if it's created successfully or not.
|
* no matter if it's created successfully or not.
|
||||||
*
|
*
|
||||||
* @see #notifyBiInteractiveAppCreated(Uri, String)
|
* @see #notifyBiInteractiveAppCreated(Uri, String)
|
||||||
* @see #onDestroyBiInteractiveApp(String)
|
* @see #onDestroyBiInteractiveAppRequest(String)
|
||||||
*/
|
*/
|
||||||
public void onCreateBiInteractiveApp(@NonNull Uri biIAppUri, @Nullable Bundle params) {
|
public void onCreateBiInteractiveAppRequest(
|
||||||
|
@NonNull Uri biIAppUri, @Nullable Bundle params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -417,11 +418,11 @@ public abstract class TvInteractiveAppService extends Service {
|
|||||||
* Destroys broadcast-independent(BI) interactive application.
|
* Destroys broadcast-independent(BI) interactive application.
|
||||||
*
|
*
|
||||||
* @param biIAppId the BI interactive app ID from
|
* @param biIAppId the BI interactive app ID from
|
||||||
* {@link #onCreateBiInteractiveApp(Uri, Bundle)}}
|
* {@link #onCreateBiInteractiveAppRequest(Uri, Bundle)}
|
||||||
*
|
*
|
||||||
* @see #onCreateBiInteractiveApp(Uri, Bundle)
|
* @see #onCreateBiInteractiveAppRequest(Uri, Bundle)
|
||||||
*/
|
*/
|
||||||
public void onDestroyBiInteractiveApp(@NonNull String biIAppId) {
|
public void onDestroyBiInteractiveAppRequest(@NonNull String biIAppId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -978,11 +979,11 @@ public abstract class TvInteractiveAppService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void createBiInteractiveApp(@NonNull Uri biIAppUri, @Nullable Bundle params) {
|
void createBiInteractiveApp(@NonNull Uri biIAppUri, @Nullable Bundle params) {
|
||||||
onCreateBiInteractiveApp(biIAppUri, params);
|
onCreateBiInteractiveAppRequest(biIAppUri, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
void destroyBiInteractiveApp(@NonNull String biIAppId) {
|
void destroyBiInteractiveApp(@NonNull String biIAppId) {
|
||||||
onDestroyBiInteractiveApp(biIAppId);
|
onDestroyBiInteractiveAppRequest(biIAppId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setTeletextAppEnabled(boolean enable) {
|
void setTeletextAppEnabled(boolean enable) {
|
||||||
@@ -1142,7 +1143,7 @@ public abstract class TvInteractiveAppService extends Service {
|
|||||||
* @param biIAppId BI interactive app ID, which can be used to destroy the BI interactive
|
* @param biIAppId BI interactive app ID, which can be used to destroy the BI interactive
|
||||||
* app. {@code null} if it's not created successfully.
|
* app. {@code null} if it's not created successfully.
|
||||||
*
|
*
|
||||||
* @see #onCreateBiInteractiveApp(Uri, Bundle)
|
* @see #onCreateBiInteractiveAppRequest(Uri, Bundle)
|
||||||
*/
|
*/
|
||||||
@CallSuper
|
@CallSuper
|
||||||
public final void notifyBiInteractiveAppCreated(
|
public final void notifyBiInteractiveAppCreated(
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 The Android Open Source Project
|
* Copyright 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 The Android Open Source Project
|
* Copyright 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 The Android Open Source Project
|
* Copyright 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -83,6 +83,19 @@ public class TvInteractiveAppView extends ViewGroup {
|
|||||||
* @see java.security.PrivateKey
|
* @see java.security.PrivateKey
|
||||||
*/
|
*/
|
||||||
public static final String BI_INTERACTIVE_APP_KEY_PRIVATE_KEY = "private_key";
|
public static final String BI_INTERACTIVE_APP_KEY_PRIVATE_KEY = "private_key";
|
||||||
|
/**
|
||||||
|
* Additional HTTP headers to be used by {@link TvInteractiveAppService} to load the
|
||||||
|
* broadcast-independent interactive application.
|
||||||
|
* @see #createBiInteractiveApp(Uri, Bundle)
|
||||||
|
*/
|
||||||
|
public static final String BI_INTERACTIVE_APP_KEY_HTTP_ADDITIONAL_HEADERS =
|
||||||
|
"http_additional_headers";
|
||||||
|
/**
|
||||||
|
* HTTP user agent to be used by {@link TvInteractiveAppService} for broadcast-independent
|
||||||
|
* interactive application.
|
||||||
|
* @see #createBiInteractiveApp(Uri, Bundle)
|
||||||
|
*/
|
||||||
|
public static final String BI_INTERACTIVE_APP_KEY_HTTP_USER_AGENT = "http_user_agent";
|
||||||
|
|
||||||
private final TvInteractiveAppManager mTvInteractiveAppManager;
|
private final TvInteractiveAppManager mTvInteractiveAppManager;
|
||||||
private final Handler mHandler = new Handler();
|
private final Handler mHandler = new Handler();
|
||||||
@@ -595,7 +608,14 @@ public class TvInteractiveAppView extends ViewGroup {
|
|||||||
* <p>{@link TvInteractiveAppCallback#onBiInteractiveAppCreated(String, Uri, String)} will be
|
* <p>{@link TvInteractiveAppCallback#onBiInteractiveAppCreated(String, Uri, String)} will be
|
||||||
* called for the result.
|
* called for the result.
|
||||||
*
|
*
|
||||||
|
* @param biIAppUri URI associated this BI interactive app.
|
||||||
|
* @param params optional parameters for broadcast-independent interactive application, such as
|
||||||
|
* {@link #BI_INTERACTIVE_APP_KEY_CERTIFICATE}.
|
||||||
|
*
|
||||||
* @see TvInteractiveAppCallback#onBiInteractiveAppCreated(String, Uri, String)
|
* @see TvInteractiveAppCallback#onBiInteractiveAppCreated(String, Uri, String)
|
||||||
|
* @see #BI_INTERACTIVE_APP_KEY_CERTIFICATE
|
||||||
|
* @see #BI_INTERACTIVE_APP_KEY_HTTP_ADDITIONAL_HEADERS
|
||||||
|
* @see #BI_INTERACTIVE_APP_KEY_HTTP_USER_AGENT
|
||||||
*/
|
*/
|
||||||
public void createBiInteractiveApp(@NonNull Uri biIAppUri, @Nullable Bundle params) {
|
public void createBiInteractiveApp(@NonNull Uri biIAppUri, @Nullable Bundle params) {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
|
|||||||
Reference in New Issue
Block a user