Loading api/system-current.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -5077,6 +5077,7 @@ package android.media.tv.tuner.filter { field public static final int TYPE_MMTP = 2; // 0x2 field public static final int TYPE_MMTP = 2; // 0x2 field public static final int TYPE_TLV = 8; // 0x8 field public static final int TYPE_TLV = 8; // 0x8 field public static final int TYPE_TS = 1; // 0x1 field public static final int TYPE_TS = 1; // 0x1 field public static final int TYPE_UNDEFINED = 0; // 0x0 } } public interface FilterCallback { public interface FilterCallback { Loading media/java/android/media/tv/tuner/filter/Filter.java +9 −3 Original line number Original line Diff line number Diff line Loading @@ -44,6 +44,10 @@ public class Filter implements AutoCloseable { @Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE) public @interface Type {} public @interface Type {} /** * Undefined filter type. */ public static final int TYPE_UNDEFINED = 0; /** /** * TS filter type. * TS filter type. */ */ Loading Loading @@ -248,7 +252,6 @@ public class Filter implements AutoCloseable { /** /** * Gets the filter Id. * Gets the filter Id. */ */ @Result public int getId() { public int getId() { return nativeGetId(); return nativeGetId(); } } Loading @@ -273,6 +276,8 @@ public class Filter implements AutoCloseable { /** /** * Starts filtering data. * Starts filtering data. * * * <p>Does nothing if the filter is already started. * * @return result status of the operation. * @return result status of the operation. */ */ @Result @Result Loading @@ -284,6 +289,8 @@ public class Filter implements AutoCloseable { /** /** * Stops filtering data. * Stops filtering data. * * * <p>Does nothing if the filter is stopped or not started. * * @return result status of the operation. * @return result status of the operation. */ */ @Result @Result Loading Loading @@ -312,14 +319,13 @@ public class Filter implements AutoCloseable { * @param size the maximum number of bytes to read. * @param size the maximum number of bytes to read. * @return the number of bytes read. * @return the number of bytes read. */ */ @Result public int read(@NonNull byte[] buffer, @BytesLong long offset, @BytesLong long size) { public int read(@NonNull byte[] buffer, @BytesLong long offset, @BytesLong long size) { size = Math.min(size, buffer.length - offset); size = Math.min(size, buffer.length - offset); return nativeRead(buffer, offset, size); return nativeRead(buffer, offset, size); } } /** /** * Releases the Filter instance. * Stops filtering data and releases the Filter instance. */ */ @Override @Override public void close() { public void close() { Loading Loading
api/system-current.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -5077,6 +5077,7 @@ package android.media.tv.tuner.filter { field public static final int TYPE_MMTP = 2; // 0x2 field public static final int TYPE_MMTP = 2; // 0x2 field public static final int TYPE_TLV = 8; // 0x8 field public static final int TYPE_TLV = 8; // 0x8 field public static final int TYPE_TS = 1; // 0x1 field public static final int TYPE_TS = 1; // 0x1 field public static final int TYPE_UNDEFINED = 0; // 0x0 } } public interface FilterCallback { public interface FilterCallback { Loading
media/java/android/media/tv/tuner/filter/Filter.java +9 −3 Original line number Original line Diff line number Diff line Loading @@ -44,6 +44,10 @@ public class Filter implements AutoCloseable { @Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE) public @interface Type {} public @interface Type {} /** * Undefined filter type. */ public static final int TYPE_UNDEFINED = 0; /** /** * TS filter type. * TS filter type. */ */ Loading Loading @@ -248,7 +252,6 @@ public class Filter implements AutoCloseable { /** /** * Gets the filter Id. * Gets the filter Id. */ */ @Result public int getId() { public int getId() { return nativeGetId(); return nativeGetId(); } } Loading @@ -273,6 +276,8 @@ public class Filter implements AutoCloseable { /** /** * Starts filtering data. * Starts filtering data. * * * <p>Does nothing if the filter is already started. * * @return result status of the operation. * @return result status of the operation. */ */ @Result @Result Loading @@ -284,6 +289,8 @@ public class Filter implements AutoCloseable { /** /** * Stops filtering data. * Stops filtering data. * * * <p>Does nothing if the filter is stopped or not started. * * @return result status of the operation. * @return result status of the operation. */ */ @Result @Result Loading Loading @@ -312,14 +319,13 @@ public class Filter implements AutoCloseable { * @param size the maximum number of bytes to read. * @param size the maximum number of bytes to read. * @return the number of bytes read. * @return the number of bytes read. */ */ @Result public int read(@NonNull byte[] buffer, @BytesLong long offset, @BytesLong long size) { public int read(@NonNull byte[] buffer, @BytesLong long offset, @BytesLong long size) { size = Math.min(size, buffer.length - offset); size = Math.min(size, buffer.length - offset); return nativeRead(buffer, offset, size); return nativeRead(buffer, offset, size); } } /** /** * Releases the Filter instance. * Stops filtering data and releases the Filter instance. */ */ @Override @Override public void close() { public void close() { Loading