Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8990cafb authored by Junichiro's avatar Junichiro Committed by David Zhao
Browse files

TvProvider API standardization for DVB TvProvider

API standardization and customization for Digital Tuner TV
Input support. (Channels. COLUMN_BROADCAST_VISIBILITY_TYPE)

Bug: 222402395
Test: CTS
(cherry picked from https://android-review.googlesource.com/q/commit:f9583889fdac109cfc0f7a9734075c0628171303)
Merged-In: I7c4e0d62cfa785e8d7ecb695eaa24ced0e4924c4
Change-Id: I7c4e0d62cfa785e8d7ecb695eaa24ced0e4924c4

NOTE FOR REVIEWERS - original patch and result patch are not identical.
PLEASE REVIEW CAREFULLY.
Diffs between the patches:
     method @Deprecated public java.net.InetAddress resolve(String) throws java.io.IOException;
-  }
-
-  @Deprecated public interface LayeredSocketFactory extends org.apache.http.conn.scheme.SocketFactory {
-    method @Deprecated public java.net.Socket createSocket(java.net.Socket, String, int, boolean) throws java.io.IOException, java.net.UnknownHostException;
-  }
-
-  @Deprecated public interface SocketFactory {
-    method @Deprecated public java.net.Socket connectSocket(java.net.Socket, String, int, java.net.InetAddress, int, org.apache.http.params.HttpParams) throws org.apache.http.conn.ConnectTimeoutException, java.io.IOException, java.net.UnknownHostException;
-    method @Deprecated public java.net.Socket createSocket() throws java.io.IOException;
-    method @Deprecated public boolean isSecure(java.net.Socket) throws java.lang.IllegalArgumentException;
-  }
-
-}
-
-package org.apache.http.conn.ssl {
-
-  @Deprecated public abstract class AbstractVerifier implements org.apache.http.conn.ssl.X509HostnameVerifier {
-    ctor @Deprecated public AbstractVerifier();
-    method @Deprecated public static boolean acceptableCountryWildcard(String);
-    method @Deprecated public static int countDots(String);
-    method @Deprecated public static String[] getCNs(java.security.cert.X509Certificate);
-    method @Deprecated public static String[] getDNSSubjectAlts(java.security.cert.X509Certificate);
-    method @Deprecated public final void verify(String, javax.net.ssl.SSLSocket) throws java.io.IOException;
-    method @Deprecated public final boolean verify(String, javax.net.ssl.SSLSession);
-    method @Deprecated public final void verify(String, java.security.cert.X509Certificate) throws javax.net.ssl.SSLException;
-    method @Deprecated public final void verify(String, String[], String[], boolean) throws javax.net.ssl.SSLException;
-  }
-
-  @Deprecated public class AllowAllHostnameVerifier extends org.apache.http.conn.ssl.AbstractVerifier {
-    ctor @Deprecated public AllowAllHostnameVerifier();
-    method @Deprecated public final String toString();
-    method @Deprecated public final void verify(String, String[], String[]);
-  }
-
-  @Deprecated public class BrowserCompatHostnameVerifier extends org.apache.http.conn.ssl.AbstractVerifier {
-    ctor @Deprecated public BrowserCompatHostnameVerifier();
-    method @Deprecated public final String toString();
-    method @Deprecated public final void verify(String, String[], String[]) throws javax.net.ssl.SSLException;
-  }
-
-  @Deprecated public class SSLSocketFactory implements org.apache.http.conn.scheme.LayeredSocketFactory {
-    ctor @Deprecated public SSLSocketFactory(String, java.security.KeyStore, String, java.security.KeyStore, java.security.SecureRandom, org.apache.http.conn.scheme.HostNameResolver) throws java.security.KeyManagementException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
-    ctor @Deprecated public SSLSocketFactory(java.security.KeyStore, String, java.security.KeyStore) throws java.security.KeyManagementException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
-    ctor @Deprecated public SSLSocketFactory(java.security.KeyStore, String) throws java.security.KeyManagementException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
-    ctor @Deprecated public SSLSocketFactory(java.security.KeyStore) throws java.security.KeyManagementException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
-    method @Deprecated public java.net.Socket connectSocket(java.net.Socket, String, int, java.net.InetAddress, int, org.apache.http.params.HttpParams) throws java.io.IOException;
-    method @Deprecated public java.net.Socket createSocket() throws java.io.IOException;
-    method @Deprecated public java.net.Socket createSocket(java.net.Socket, String, int, boolean) throws java.io.IOException, java.net.UnknownHostException;
-    method @Deprecated public org.apache.http.conn.ssl.X509HostnameVerifier getHostnameVerifier();
-    method @Deprecated public static org.apache.http.conn.ssl.SSLSocketFactory getSocketFactory();
-    method @Deprecated public boolean isSecure(java.net.Socket) throws java.lang.IllegalArgumentException;
-    method @Deprecated public void setHostnameVerifier(org.apache.http.conn.ssl.X509HostnameVerifier);
-    field @Deprecated public static final org.apache.http.conn.ssl.X509HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER;
-    field @Deprecated public static final org.apache.http.conn.ssl.X509HostnameVerifier BROWSER_COMPATIBLE_HOSTNAME_VERIFIER;
-    field @Deprecated public static final String SSL = "SSL";
-    field @Deprecated public static final String SSLV2 = "SSLv2";
-    field @Deprecated public static final org.apache.http.conn.ssl.X509HostnameVerifier STRICT_HOSTNAME_VERIFIER;
-    field @Deprecated public static final String TLS = "TLS";
-  }
-
-  @Deprecated public class StrictHostnameVerifier extends org.apache.http.conn.ssl.AbstractVerifier {
-    ctor @Deprecated public StrictHostnameVerifier();
-    method @Deprecated public final String toString();
-    method @Deprecated public final void verify(String, String[], String[]) throws javax.net.ssl.SSLException;
-  }
-
-  @Deprecated public interface X509HostnameVerifier extends javax.net.ssl.HostnameVerifier {
-    method @Deprecated public void verify(String, javax.net.ssl.SSLSocket) throws java.io.IOException;
-    method @Deprecated public void verify(String, java.security.cert.X509Certificate) throws javax.net.ssl.SSLException;
-    method @Deprecated public void verify(String, String[], String[]) throws javax.net.ssl.SSLException;
-  }
-
-}
-
-package org.apache.http.params {
-
-  @Deprecated public interface CoreConnectionPNames {
-    field @Deprecated public static final String CONNECTION_TIMEOUT = "http.connection.timeout";
-    field @Deprecated public static final String MAX_HEADER_COUNT = "http.connection.max-header-count";
-    field @Deprecated public static final String MAX_LINE_LENGTH = "http.connection.max-line-length";
-    field @Deprecated public static final String SOCKET_BUFFER_SIZE = "http.socket.buffer-size";
-    field @Deprecated public static final String SO_LINGER = "http.socket.linger";
-    field @Deprecated public static final String SO_TIMEOUT = "http.socket.timeout";
-    field @Deprecated public static final String STALE_CONNECTION_CHECK = "http.connection.stalecheck";
-    field @Deprecated public static final String TCP_NODELAY = "http.tcp.nodelay";
-  }
-
-  @Deprecated public final class HttpConnectionParams implements org.apache.http.params.CoreConnectionPNames {
-    method @Deprecated public static int getConnectionTimeout(org.apache.http.params.HttpParams);
-    method @Deprecated public static int getLinger(org.apache.http.params.HttpParams);
-    method @Deprecated public static int getSoTimeout(org.apache.http.params.HttpParams);
-    method @Deprecated public static int getSocketBufferSize(org.apache.http.params.HttpParams);
-    method @Deprecated public static boolean getTcpNoDelay(org.apache.http.params.HttpParams);
-    method @Deprecated public static boolean isStaleCheckingEnabled(org.apache.http.params.HttpParams);
-    method @Deprecated public static void setConnectionTimeout(org.apache.http.params.HttpParams, int);
-    method @Deprecated public static void setLinger(org.apache.http.params.HttpParams, int);
-    method @Deprecated public static void setSoTimeout(org.apache.http.params.HttpParams, int);
-    method @Deprecated public static void setSocketBufferSize(org.apache.http.params.HttpParams, int);
-    method @Deprecated public static void setStaleCheckingEnabled(org.apache.http.params.HttpParams, boolean);
-    method @Deprecated public static void setTcpNoDelay(org.apache.http.params.HttpParams, boolean);
-  }
-
-  @Deprecated public interface HttpParams {
-    method @Deprecated public org.apache.http.params.HttpParams copy();
-    method @Deprecated public boolean getBooleanParameter(String, boolean);
-    method @Deprecated public double getDoubleParameter(String, double);
-    method @Deprecated public int getIntParameter(String, int);
-    method @Deprecated public long getLongParameter(String, long);
-    method @Deprecated public Object getParameter(String);
-    method @Deprecated public boolean isParameterFalse(String);
-    method @Deprecated public boolean isParameterTrue(String);
-    method @Deprecated public boolean removeParameter(String);
-    method @Deprecated public org.apache.http.params.HttpParams setBooleanParameter(String, boolean);
-    method @Deprecated public org.apache.http.params.HttpParams setDoubleParameter(String, double);
-    method @Deprecated public org.apache.http.params.HttpParams setIntParameter(String, int);
-    method @Deprecated public org.apache.http.params.HttpParams setLongParameter(String, long);
-    method @Deprecated public org.apache.http.params.HttpParams setParameter(String, Object);
-  }
-
-}
-

Change-Id: Ibde40a2faeeae994a4fea76d622015e2c703dc15
--- media/java/android/media/tv/TvContract.java
+++ media/java/android/media/tv/TvContract.java
+        /**
+         * The broadcast visibility type of this TV channel.
+         *
+         * <p>This is used to indicate the broadcast visibility type defined in the underlying
+         * broadcast standard or country/operator profile, if applicable. For example,
+         * {@code visible_service_flag} and {@code numeric_selection_flag} of
+         * {@code service_attribute_descriptor} in D-Book, {@code visible_service_flag} and
+         * {@code selectable_service_flag} of {@code ciplus_service_descriptor} in CI Plus 1.3
+         * specification.
+         *
+         * <p>The value should match one of the followings:
+         * {@link #BROADCAST_VISIBILITY_TYPE_VISIBLE},
+         * {@link #BROADCAST_VISIBILITY_TYPE_NUMERIC_SELECTABLE_ONLY}, and
+         * {@link #BROADCAST_VISIBILITY_TYPE_INVISIBLE}.
+         *
+         * <p>If not specified, this value is set to {@link #BROADCAST_VISIBILITY_TYPE_VISIBLE}
+         * by default.
+         *
+         * <p>Type: INTEGER
+         */
+        public static final String COLUMN_BROADCAST_VISIBILITY_TYPE = "broadcast_visibility_type";
+
+        /** @hide */
+        @IntDef(prefix = { "BROADCAST_VISIBILITY_TYPE_" }, value = {
+                BROADCAST_VISIBILITY_TYPE_VISIBLE,
+                BROADCAST_VISIBILITY_TYPE_NUMERIC_SELECTABLE_ONLY,
+                BROADCAST_VISIBILITY_TYPE_INVISIBLE,
+        })
+        @Retention(RetentionPolicy.SOURCE)
+        public @interface BroadcastVisibilityType {}
+
+        /**
+         * The broadcast visibility type for visible services. Use this type when the service is
+         * visible from users and selectable by users via normal service navigation mechanisms.
+         *
+         * @see #COLUMN_BROADCAST_VISIBILITY_TYPE
+         */
+        public static final int BROADCAST_VISIBILITY_TYPE_VISIBLE = 0;
+
+        /**
+         * The broadcast visibility type for numeric selectable only services. Use this type when
+         * the service is invisible from users but selectable by users only via direct entry of
+         * the logical channel number.
+         *
+         * @see #COLUMN_BROADCAST_VISIBILITY_TYPE
+         */
+        public static final int BROADCAST_VISIBILITY_TYPE_NUMERIC_SELECTABLE_ONLY = 1;
+
+        /*
+         * The broadcast visibility type for invisible services. Use this type when the service
+         * is invisible from users and unselectable by users via any of normal service navigation
+         * mechanisms.
+         *
+         * @see #COLUMN_BROADCAST_VISIBILITY_TYPE
+         */
+        public static final int BROADCAST_VISIBILITY_TYPE_INVISIBLE = 2;
+

Original patch:
 From f9583889fdac109cfc0f7a9734075c0628171303 Mon Sep 17 00:00:00 2001
From: Junichiro <Junichiro.Homma@sony.com>
Date: Fri, 25 Aug 2023 11:01:26 +0900
Subject: [PATCH] TvProvider API standardization for DVB TvProvider

API standardization and customization for Digital Tuner TV
Input support. (Channels. COLUMN_BROADCAST_VISIBILITY_TYPE)

Bug: 222402395
Test: CTS
Change-Id: I7c4e0d62cfa785e8d7ecb695eaa24ced0e4924c4
---
parent c16ddbe4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment