History log of /frameworks/base/media/java/android/media/tv/TvView.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3496c38e50cd2a674dcd63886557f2b41c66ac0d 17-Apr-2017 Conrad Chen <conradchen@google.com> Fix overlay view not updated during scaling TvView

Includes scaleX and scaleY into calculation of view frame.

Test: build and verified by manually testing
Bug: 37302836
Change-Id: I72458cf1d5b356f0fc93200a712ff6fb4ef0c2f9
/frameworks/base/media/java/android/media/tv/TvView.java
d5c7dd6da810a6b89151b337bea79fd817e6b72a 08-Mar-2017 Robert Carr <racarr@google.com> Modify SurfaceView to use SurfaceFlinger child surfaces.

Here we have SurfaceView bypass the WindowManager and speak
directly to SurfaceFlinger using child surfaces. We also
implement some logic in the WM to handle child surfaces
in various Surface replacement scenarios.

For those following along in the revert Saga, this
also includes the follow up CLs to the original CL.
- Surface inset calculation
- Animation fixes.

The error causing the revert was an incorrect JNI signature
around deferTransactionUntilSurface. I've noted it inline.

Bug: 28858420
Bug: 31518219
Bug: 34888808
Bug: 35588318
Bug: 35396882
Test: Existing tests still pass (except for the ones that don't and will be deleted).
Change-Id: Ie56b6f7ab16f32d7fc459b8eba26594337ad55de
/frameworks/base/media/java/android/media/tv/TvView.java
5aec7b90310ba05f9816fd89030ba41ce48c568e 08-Mar-2017 Wonsik Kim <wonsik@google.com> Revert "Modify SurfaceView to use SurfaceFlinger child surfaces."

This reverts commit cd4aeef88052571365d4e193a2c41e2e6d145491.

Bug: 36027342
Bug: 36015884
Change-Id: Ifd5b69caf64d65a8cd6570b7fe1fb6abe90e30b8
/frameworks/base/media/java/android/media/tv/TvView.java
cd4aeef88052571365d4e193a2c41e2e6d145491 03-Mar-2017 Robert Carr <racarr@google.com> Modify SurfaceView to use SurfaceFlinger child surfaces.

Here we have SurfaceView bypass the WindowManager and speak
directly to SurfaceFlinger using child surfaces. We also
implement some logic in the WM to handle child surfaces
in various Surface replacement scenarios.

For those following along in the revert Saga, this
also includes the follow up CLs to the original CL.
- Surface inset calculation
- Animation fixes.

The error causing revert was a deferTransactionUntil(-1)...-1
cast to uint, defer transaction until MAX_UINT.

Bug: 28858420
Bug: 31518219
Bug: 34888808
Bug: 35588318
Bug: 35396882
Test: Existing tests still pass (except for the ones that don't and will be deleted).
Change-Id: Ib37236950a1dd3c4f9f4b58fd41ef9003c0557ef
/frameworks/base/media/java/android/media/tv/TvView.java
3896db14751f16f4053e8fa4a82c3d6803054e5b 03-Mar-2017 Jeff Tinker <jtinker@google.com> Revert "Modify SurfaceView to use SurfaceFlinger child surfaces."

This reverts commit 693f3432ae77d1fcfaaf9d168de861192aacb4c4.

P0: When playing encrypted content the Fugu displays a blank screen.

Test: with topic "surfaceview-without-wm" reverted, encrypted playback
works on ToT oc-release. See repro steps in 35917840#12.

bug:35917840

Change-Id: I37fa1e427daff3a1c18ed1c92d035421d891f67c
/frameworks/base/media/java/android/media/tv/TvView.java
693f3432ae77d1fcfaaf9d168de861192aacb4c4 19-Dec-2016 Robert Carr <racarr@google.com> Modify SurfaceView to use SurfaceFlinger child surfaces.

Here we have SurfaceView bypass the WindowManager and speak
directly to SurfaceFlinger using child surfaces. We also
implement some logic in the WM to handle child surfaces
in various Surface replacement scenarios.

Bug: 28858420
Bug: 31518219
Bug: 34888808
Bug: 35588318
Bug: 35396882
Test: Existing tests still pass (except for the ones that don't and will be deleted).
Change-Id: Icb7259365b51ebe8c7f6c7cd4f9ba29f9fce08a4
/frameworks/base/media/java/android/media/tv/TvView.java
49b593efae85bc56381a68bd561a45d05b449796 11-Jul-2016 Robert Carr <racarr@google.com> Remove unused SurfaceView state.

Use progressively declined over N, until I noticed
they were no longer used at all.

Change-Id: I05db2e8569d26b69f91f753564ffa5f40aa05a61
/frameworks/base/media/java/android/media/tv/TvView.java
22168a7dfccab1865bc43b4c43a340b27deee9bb 03-Jun-2016 Jae Seo <jaeseo@google.com> TIF: Set the surface secure

Bug: 29104650
Change-Id: I481bf30c57a7c29faaf1cafe64607c22fe55f707
/frameworks/base/media/java/android/media/tv/TvView.java
abaa3395e94754563fb4b07d077e5e87d41f6a17 14-Apr-2016 Jae Seo <jaeseo@google.com> Merge "TIF: Update documentation on time shifting start/current position" into nyc-dev
4e3ded556100f674ccba0d0e40adcbd0d30f9b23 14-Apr-2016 Jae Seo <jaeseo@google.com> TIF: Update documentation on time shifting start/current position

Now that we use the same set of API for both time shifting and
recording, the descriptions should be updated to support both use cases.

Bug: 28067038
Change-Id: I036446eca373ca27005f74b008a259f27b7c5f61
/frameworks/base/media/java/android/media/tv/TvView.java
cdfbc488c675a9800dfc8f15aec24b65a7558d29 13-Apr-2016 Jae Seo <jaeseo@google.com> TIF: More annotations

Bug: 20980990
Change-Id: I5bbdc19703aa15bffe2f2f900be63cbfe9f639ae
/frameworks/base/media/java/android/media/tv/TvView.java
3b9be6700fd631e25559693820d03389f8de3893 18-Mar-2016 Jae Seo <jaeseo@google.com> TIF: Annotate constants

Bug: 20980990
Change-Id: I3fac9f19cc705c9d94d2ff24075830f2d65588c8
/frameworks/base/media/java/android/media/tv/TvView.java
f714e62c12d99d816d70d09da60b6885a1368cef 11-Mar-2016 Dongwon Kang <dwkang@google.com> TIF: Unhide sendAppPrivateCommand/onAppPrivateCommand

Bug: 25726685
Change-Id: Iad6417b4da0543043a7fa17287487313a7670209
/frameworks/base/media/java/android/media/tv/TvView.java
e12d810e99da093d3cf38f89c81e3e8d1e75b404 05-Mar-2016 Dongwon Kang <dwkang@google.com> TIF: Unhide TvView.setZOrderMediaOverlay/setZOrderOnTop/tune/unblockContent

Bug: 25726685
Change-Id: If96d0b086488c931d20315ee1c29cf7374715d93
/frameworks/base/media/java/android/media/tv/TvView.java
e3c11e842937f50f54c9d82363f33338dc9e261b 09-Feb-2016 Jae Seo <jaeseo@google.com> TIF: Rename connect()/disconnect() and remove unnecessary methods

Bug: 26969670
Change-Id: Iee7d1af2eecc11bb28a8d9d7e377b4754a37095c
/frameworks/base/media/java/android/media/tv/TvView.java
a826d0172aae5e91d633ffe606059a2355fbf7e5 18-Jan-2016 Jae Seo <jaeseo@google.com> TIF: Recording API

Bug: 23786643
Change-Id: Ie26e8944312048bc865b4506aa49fced15360fe4
/frameworks/base/media/java/android/media/tv/TvView.java
b1ae00ec628d16c2fd1354c70e971d4757201753 23-Jun-2015 Jae Seo <jaeseo@google.com> TIF: Always invalidate the session callback when resetting TvView

Bug: 20060638
Change-Id: If743eaa025e9bb5bc580d50697f9f20ff9d0fe0a
/frameworks/base/media/java/android/media/tv/TvView.java
6e4cbfd2e5ffb739269e5e4affc2b6894bc4090e 22-Jun-2015 Jae Seo <jaeseo@google.com> TIF: Minor code improvement

- Removed unnecessary 'final' keywords for private methods
- Removed unnecessary interface modifiers
- Added a missing ‘final’ keyword
- Simplified if statements
- Removed Javadoc links pointing to itself
- Removed redundant conditional expressions
- Removed unnecessary return statements
- Replaced explicit types with <>
- Removed an unnecessary unboxing
- Removed a redundant initializer
- Fixed typos

Change-Id: I1d137fda70192b33dd00e92ab01396519135ab39
/frameworks/base/media/java/android/media/tv/TvView.java
17345072864b9aeb4e5535257e83e6809859ae0f 21-Jun-2015 Jae Seo <jaeseo@google.com> TIF: Always flush pending app-private commands when resetting TvView

Bug: 19809952
Change-Id: Ic676b81591def065d79ac45cb1d247b67178e50b
/frameworks/base/media/java/android/media/tv/TvView.java
4b34cc77630112d00e9a87498d05f5f8803a9ff6 16-May-2015 Jae Seo <jaeseo@google.com> TIF: Pass the playback params as a whole

Bug: 21172914
Change-Id: I2d89f267d8d83b14b5d436304aa0ff82490211d8
/frameworks/base/media/java/android/media/tv/TvView.java
3d04b7693428dd887c93e2ac7f4e90fd0cc87859 13-May-2015 Jae Seo <jaeseo@google.com> TIF: API Review: android.media.tv

Addressed the feedback from the API Review:

android.media.tv.TvView.TimeShiftPositionCallback
Please add more documentation to explain why we are using the wall-clock
time here.

android.media.tv.TvInputService
onTimeShiftSetPlaybackRate should be renamed to
onTimeShiftSetPlaybackParams and pass in the PlaybackParams object
(formerly known as PlaybackSettings) instead of the rate and mode
separately.

android.media.tv.TvTrackInfo
getDescription() should return a CharSequence not a String.

android.media.tv.TvTrackInfo.Builder
setDescription() should take a CharSequence as input.

android.media.tv.TvView
Change timeShiftSetPlaybackRate() to setTimeShiftPlaybackParams() and
use the PlaybackParams object (formerly known as PlaybackSettings)
instead of the rate and mode separately.

Bug: 21045120
Change-Id: I768665ae9c385fcb034bfb346c21b4c9f0891172
/frameworks/base/media/java/android/media/tv/TvView.java
a90338396c90f19b062b696cdb1ffcb8600755b2 12-Mar-2015 Jae Seo <jaeseo@google.com> TIF: Rename requestUnblockContent to unblockContent

The method TvView.requestUnblockContent doesn't match the name of the
corresponding method in TvInputService, onUnblockContent, hence changed
the name to make it consistent with the current naming scheme.
This change deprecated the requestUnblockContent method as the first
step.

Bug: 19337627
Change-Id: I530209c4dca66305da90ffded7199fa3c1c1780c
/frameworks/base/media/java/android/media/tv/TvView.java
b73868ddf8e627beb32c488ee8ed6341b96ebc61 28-Apr-2015 Dongwon Kang <dwkang@google.com> TIF: add new audio modes to the timeShiftSetPlaybackRate() javadoc.

Bug: 20509313
Change-Id: I762bb74ae2a1688e1bc6cdbf6bf5a8b931ae0689
/frameworks/base/media/java/android/media/tv/TvView.java
c8b7356434f665c494504661a943323c0bbe702e 23-Apr-2015 Jae Seo <jaeseo@google.com> TIF: Start using the @NonNull annotation

Added the @NonNull annotation to the code where null check is required

Bug: 19941047
Change-Id: I9fd1f4c7ea4679c03bf831d90804488282a1c5d4
/frameworks/base/media/java/android/media/tv/TvView.java
c30327cbb3f3826c3276953a73e10e47d4b5872e 24-Apr-2015 Dongwon Kang <dwkang@google.com> Merge "TIF: use <p> tag in a consistent way."
0610e12733875a267f59d87a2a68aebbf486066e 23-Apr-2015 Dongwon Kang <dwkang@google.com> TIF: use <p> tag in a consistent way.

Bug: 20340510
Change-Id: I2422646f01542f571d033ee363df58e0906f3514
/frameworks/base/media/java/android/media/tv/TvView.java
4bf607b00c14c031e991ac9dc0ad49b9249c9162 23-Apr-2015 Dongwon Kang <dwkang@google.com> TIF: start using @Nullable annotation.

Added @Nullable annotation when the javadoc sprcifies the return value
or argument can be null.

Bug: 19941047
Change-Id: I823189a242fae10ca14788fee9747bf5d59f5eb3
/frameworks/base/media/java/android/media/tv/TvView.java
411d58d330eafb093fe7edfa3fcccfadfc470076 23-Apr-2015 Jae Seo <jaeseo@google.com> TIF: Cache multiple app private commands

Bug: 19809952
Change-Id: I458ab436761e8fd7e54fc7f49d86550e7945dca9
/frameworks/base/media/java/android/media/tv/TvView.java
1da8fb39499e8f5a962f7307fefdfd2ab6b79224 21-Apr-2015 Jae Seo <jaeseo@google.com> TIF: Cache the stream volume on TvView

Also added explanation of the default value.

Bug: 18939663
Change-Id: Idffd45738b0299779c245a11022faadc12004060
/frameworks/base/media/java/android/media/tv/TvView.java
ff1f29e1b112e68d16908b1a89225315089f8e50 08-Apr-2015 Dongwon Kang <dwkang@google.com> TIF: add a video unavailable constant for audio program case.

Bug: 20019339
Change-Id: Ife3452486c065e6c5809f0cd2bb87794c4279312
/frameworks/base/media/java/android/media/tv/TvView.java
465f0d6aa36f2f1db88603aa487bcba9f5af068d 07-Apr-2015 Jae Seo <jaeseo@google.com> TIF: Redefine time shift status and change callback and position APIs

Also added/modified the documentation and addressed feedback from the
previous CL.

Change-Id: I046970cd0d2688886039d37a332bbe11bc5a4b0f
/frameworks/base/media/java/android/media/tv/TvView.java
6f0240cf63fe62b0af2c7d5112f9881d1e167bfc 01-Apr-2015 Dongwon Kang <dwkang@google.com> TIF: Add time shift APIs.

Change-Id: I4faecd99d9e565c7228fc4b9da99e2adf1e67f19
/frameworks/base/media/java/android/media/tv/TvView.java
5f3cb4a584545927b3dcecb7cb47eb7edb6d2d5d 19-Nov-2014 Dongwon Kang <dwkang@google.com> TIF: implement gatherTransparentRegion() and dispatchDraw() in TvView.

Background: because the hole-punching code lives only in SurfaceView,
the overlay view can be covered by the application if the TV input
changes the position of SurfaceView via Session.layoutSurface().
This change punches a hole as large as TvView so that the underlying
overlayview can be shown properly.

Bug: 18420642
Change-Id: If9a829367083ce2002a4c4a4e4a4bbb623f7ad96
/frameworks/base/media/java/android/media/tv/TvView.java
6320fc490fe73b089cdccfc617e4b09f31f5d203 22-Oct-2014 Jae Seo <jaeseo@google.com> TIF: Notify of size change of the video in TvView

Put the necessary plumbing in place to notify of size change of the
video in TvView.
Put together the track related logic in TvInputManager.Session.
Protected track information with a lock.

Also modified debugging messages more consistently and fixed minor
warnings in TvView.

Bug: 17635300
Change-Id: I8d267d8a11056b5ccee1dacbf2d3391be16f811e
/frameworks/base/media/java/android/media/tv/TvView.java
887f52144eeea8d5812d64a29e207af6b97a763d 23-Oct-2014 Jae Seo <jaeseo@google.com> TIF: Cache the app private command and send it when connection is made

Bug: 17559793
Change-Id: If785d1ffceb5b5152381818efc4d1c8b5115143c
/frameworks/base/media/java/android/media/tv/TvView.java
ee2ec05ed7c0d3cb9115f4ddd7c3613269c4a57b 14-Sep-2014 Jae Seo <jaeseo@google.com> TIF: Turn debugging off

Bug: 17476383
Change-Id: I28ff54a635bf6468c231efe776dbc8e35460d542
/frameworks/base/media/java/android/media/tv/TvView.java
9127e4580c618bc1afae5c2c280f5a271f7a7635 10-Sep-2014 Jae Seo <jaeseo@google.com> TIF: Enable inflating class android.media.tv.TvView on non-TV devices

Needed to pass the CTS for those devices.

Bug: 17455222
Change-Id: Ief9a76835418906d9e8e06d4e5ddc71a3370055d
/frameworks/base/media/java/android/media/tv/TvView.java
2778f5a7bd7c45861b6f2fc5639509e327495a4a 04-Sep-2014 Jae Seo <jaeseo@google.com> API review: android.media.tv

TvInputInfo
- Renamed getIntentForSettingsActivity to createSettingsIntent.
- Renamed getIntentForSetupActivity to createSetupIntent.
- Changed the value of EXTRA_INPUT_ID from inputId to
android.media.tv.extra.INPUT_ID.
- Removed @hiden from CREATOR.

TvInputManager
- Renamed TvInputListener to TvInputCallback.
- Renamed registerListener to registerCallback.
- Renamed unregisterListener to unregisterCallback.
- Changed the value of ACTION_BLOCKED_RATINGS_CHANGED from
android.media.tv.TvInputManager.ACTION_BLOCKED_RATINGS_CHANGED
to android.media.tv.action.BLOCKED_RATINGS_CHANGED.
- Changed the value of ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED from
android.media.tv.TvInputManager.ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED
to android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED.
- Changed the value of ACTION_QUERY_CONTENT_RATING_SYSTEMS from
android.media.tv.TvInputManager.ACTION_QUERY_CONTENT_RATING_SYSTEMS
to android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS.
- Changed the value of META_DATA_CONTENT_RATING_SYSTEMS from
android.media.tv.TvInputManager.META_DATA_CONTENT_RATING_SYSTEMS
to android.media.tv.metadata.CONTENT_RATING_SYSTEMS.

TvView
- Renamed TvInputListener to TvInputCallback.
- Renamed setTvInputListener to setCallback.

Bug: 17389538
Change-Id: I3dceee3db67862d77b183aef0da4fd3a8681ab1b
/frameworks/base/media/java/android/media/tv/TvView.java
774f6c3657dff9f05ffd90d9a4a90153d06180e1 30-Aug-2014 Ji-Hwan Lee <jihwan@google.com> Add missing checks for the current session callback

Bug: 17336320
Change-Id: I4676c4d76d1ed9d22bd476319098cbfcce52cd6d
/frameworks/base/media/java/android/media/tv/TvView.java
56bfc2bc24aec2acbbab0dc66c961243f26fcf1f 26-Aug-2014 Ji-Hwan Lee <jihwan@google.com> Merge "TIF: Reset main TvView only for explicit reset() call" into lmp-dev
d0f00588834806d3f52c95c2d5fb13d9a92bddfc 26-Aug-2014 Ji-Hwan Lee <jihwan@google.com> TIF: Reset main TvView only for explicit reset() call

Or, do not reset when it's called internaly while tuning.

Bug: 17269010
Change-Id: I3447ef0e628c066f71eee5a1416347fa6c721504
/frameworks/base/media/java/android/media/tv/TvView.java
c931cc085091345f9667bf1e0ed8afd58e721a62 26-Aug-2014 Youngsang Cho <youngsang@google.com> Merge "Reset a session callback variable when tune is failed" into lmp-dev
7cf67054550e8e6ea2379d7b0f0653796ce85062 26-Aug-2014 Youngsang Cho <youngsang@google.com> Reset a session callback variable when tune is failed

Change-Id: I7c0188d916047f8331c74ce7a29b0a5228583979
/frameworks/base/media/java/android/media/tv/TvView.java
ffad70bb7efe08ab8f03cb93e783714232a101ac 26-Aug-2014 Chulwoo Lee <chulwoo@google.com> Recreate overlay view after the TIS crashes

The overlay view should be recreated when the session is recreated
after the TIS crash.

Change-Id: I7605aac0feed644ae29d65127f68630c3658343f
/frameworks/base/media/java/android/media/tv/TvView.java
c7f440dcd86ae88fc1b51e4394d66e4e80c9e53e 21-Aug-2014 Ji-Hwan Lee <jihwan@google.com> TIF: Release main TvView on reset()

Also, use WeakReference for TvView.sMainTvView.

Change-Id: I6eec1c9f907692f0fbfa96d80c7d1141eabde6e2
/frameworks/base/media/java/android/media/tv/TvView.java
1553a528a5e2a2eeb94318601943fad2d9484bb3 19-Aug-2014 Jae Seo <jaeseo@google.com> API Review: android.media.tv

TvView:
- Instead of ERROR_INPUT_DISCONNECTED, a separate callback
onDisconnected; change onError to onConnectionFailed.

Bug: 17114406
Change-Id: I9457ac81c883610f96954494bf75a4e78e53383f
/frameworks/base/media/java/android/media/tv/TvView.java
15c56aac985bc8d75f38fb4ecb92dda12d2ca06c 18-Aug-2014 Ji-Hwan Lee <jihwan@google.com> TIF: Call setMain(false) when session is released.

Also, rename setMainTvView() and setMainSession() to setMain(), except
ITvInputManager.

Change-Id: I586e3fd42720f07a75d6f31b1ee955ce5c29dd68
/frameworks/base/media/java/android/media/tv/TvView.java
5caf1e8dda6f7ca9a1078803a25e78e9a7db7157 06-Aug-2014 Youngsang Cho <youngsang@google.com> Make caption setting consistent across sessions

Change-Id: I7cb8ab109188b9f78cceb1025339bce98c776052
/frameworks/base/media/java/android/media/tv/TvView.java
887ad97ebed84749cfdd84e8170c72ba888cb414 06-Aug-2014 Youngsang Cho <youngsang@google.com> Merge "Add a method in TIS to relayout SurfaceView" into lmp-dev
9551e92507564c597a7764473945114d3c3bfff3 06-Aug-2014 Jae Seo <jaeseo@google.com> TIF: Add explanation for TvView

Bug: 16801733
Change-Id: I8fa81a850d1e29f32fdb6caa4bd3dc4b2668e18a
/frameworks/base/media/java/android/media/tv/TvView.java
ff04ae757a5542d2d5633e75b7adacc4fce1ce7e 02-Jul-2014 Youngsang Cho <youngsang@google.com> Add a method in TIS to relayout SurfaceView

Bug: 15389458
Change-Id: I7f740141e7cf59fea5d321099652e65bc9e5f7d1
/frameworks/base/media/java/android/media/tv/TvView.java
bf0a4eb158ff5352dd2e7c456339cd36c28bcb43 05-Aug-2014 Youngsang Cho <youngsang@google.com> Add system APIs to set Z-order of TvView

Bug: 16723028
Change-Id: I43c840ca2065920360859f8814a0c76ab2937ac1
/frameworks/base/media/java/android/media/tv/TvView.java
10d285ac06b3d3060c7d90d3dc196d4ac8367467 31-Jul-2014 Jae Seo <jaeseo@google.com> TIF: Make selected tracks identifiable

A recent change on the multi-track API surfaced an issue that it's hard to
identify selected tracks from the list of tracks obtained from
TvView.getTracks() method, especially when two or more tracks convey the same
track information (e.g. two English stereo audio tracks with the same sample
rate). This change introduced a new public method getId() in TvTrackInfo that
returns an ID with which one can identify the tracks uniquely. It also led to
minor signature changes across the multi-track API to make it more
developer-friendly in both application and TV input service developers'
perspectives.

Change-Id: I226f75e697b0ce52b44db7471660f6d9f646f6f9
/frameworks/base/media/java/android/media/tv/TvView.java
1f81b1040f40a3233981f34268b11e5c9ad9f34c 05-Aug-2014 Dongwon Kang <dwkang@google.com> TIF: make the documentation consistent.

Change-Id: Iaf93c8753c43fa128b464cea3f63a38fb7b3c8b3
/frameworks/base/media/java/android/media/tv/TvView.java
1a6b25eabcc1fb66e6e8d76f91fd413e18b793a9 09-Jul-2014 Sungsoo Lim <sungsoo@google.com> TIF: Add a parameter (Bundle params) of tune method

- tune(Uri, Bundle) is added as a system API.

Bug: 15809017
Change-Id: I50bc9b510f469ac3c157f095ccfe27d1cd1d9854
/frameworks/base/media/java/android/media/tv/TvView.java
d5ce9759524740cfb02638fd1d7b44315957b422 25-Jul-2014 Jae Seo <jaeseo@google.com> TIF: Make TvTrackInfo methods more explicit.

This change addresses the following API council feedback:

TvTrackInfo:
-- Remove all KEY_/VALUE_ constants, and replace with explicit,
strongly-typed accessor methods.
-- Add additional Bundle getExtras() method (in addition to the explicit
types); most of the time this Bundle will be null.

Bug: 16542165
Change-Id: Ie48cb170b2bbf07d9460fdc8ed77d7db01799772
/frameworks/base/media/java/android/media/tv/TvView.java
71b282fad429dfa5e98287aa34af6aecd155321b 28-Jul-2014 Youngsang Cho <youngsang@google.com> TIF: Reset SurfaceView whenever TvView tunes to a channel of different TV input

Bug: 14254494
Change-Id: Ieb6b0cb95a366995c7b85beea7eb9ca8507d5531
/frameworks/base/media/java/android/media/tv/TvView.java
6e62a1508cb7a5efcdde2ae9e51672fea4296dca 29-Jul-2014 Jae Seo <jaeseo@google.com> TIF: Use more consistent constant names

Change-Id: Iee7cbbba621e4174c9fdaedc86d3830ca9f46cfe
/frameworks/base/media/java/android/media/tv/TvView.java
6a1f2649a917ddec808e75f31efeb227133dd096 28-Jul-2014 Christofer Åkersten <akersten@google.com> Listen to onVisibilityChanged().

Use onVisibilityChanged() instead of setVisibility() in order to
detect changes in visibility on the TvView. This ensures we detect
visibility changes for ancestors.

Bug: 16618628
Change-Id: I6efd21763ebfdbb59532b837db5627b7ccb0cae0
/frameworks/base/media/java/android/media/tv/TvView.java
91a801d42f3acc35404da51ba26605093922503a 24-Jul-2014 Jae Seo <jaeseo@google.com> TIF: Rename methods in TvInputService

This change addresses the following council feedback.

TvInputService.Session:
-- Rename onRequestUnblockContent() --> onUnblockContent()
-- Change all dispatch* methods to be notify*

Bug: 16542165
Change-Id: Ib9c8dc825665fdf75ebd1d13b1e39c39514132f1
/frameworks/base/media/java/android/media/tv/TvView.java
4c52697dbed682a19dacc78b0c08931ea8dbc6b5 21-Jul-2014 Ji-Hwan Lee <jihwan@google.com> TIF: Support HDMI-CEC active source management

Add system API TvView.setMain() and TvInputService.onSetMain().

Bug: 15994065
Change-Id: I60ac24659453ca616380993c4accd8c17e714639
/frameworks/base/media/java/android/media/tv/TvView.java
15bbf3b220fdd22df62f2bfa04452f4cdf11d2bb 21-Jul-2014 Jae Seo <jaeseo@google.com> TIF: Use @SystemApi for APIs that we intend to open to OEMs

Bug: 16374058
Change-Id: Ifdf8188d3791e7e8ab6cc0a30696bde24b16ac5c
/frameworks/base/media/java/android/media/tv/TvView.java
a759b111a1c9cb00284038f8a1554bf29709b952 19-Jul-2014 Jae Seo <jaeseo@google.com> TIF: Add sendAppPrivateCommand()

Added a way to send a private command from the application to the TV
input. This can be used to provide domain-specific features that are
only known between certain TV inputs and their clients.

Change-Id: I7548311a64147b8ff27562ec680b941e2ec10bc0
/frameworks/base/media/java/android/media/tv/TvView.java
9bf671f8ee72b156f16fcf05a3d1c6e093ecba67 18-Jul-2014 Sungsoo Lim <sungsoo@google.com> TIF: revise API names

- TvInputManager: TvInputCallback -> TvInputListenter
- TvParentalControlManager: ParentalControlCallback -> ParentalControlListener
- TvView: unblockContent -> requestUnblockContent

Change-Id: I58220e86a4e59ee7d8f28fab833f09cd603b1e38
/frameworks/base/media/java/android/media/tv/TvView.java
bbcd206a798c8c2845200daf7a2d4cb7b29056f3 19-Jul-2014 Jae Seo <jaeseo@google.com> TIF: Add a way to notify whether the current program content is allowed

Now we have a complete set of API to tell the entire cases (allowed and
blocked), which makes possible for the application to rely more on
actions taken by TV input services transferring the responsibility for
parental control.

Bug: 13172379
Change-Id: I7b0dcf16b870782c76a428a1dac6ef1a528b7d40
/frameworks/base/media/java/android/media/tv/TvView.java
903d6b72cd572665309633e925485464d08bb25a 16-Jul-2014 Jaewan Kim <jaewan@google.com> TIF: Add unblock content

When a TV content is blocked by the parental control settings,
TV input service will notify TV to request user's PIN code verification.

If the verification succeeds, TV input service will be notified back
that content is unblocked so it can keep playing the content.

Bug: 13172379
Change-Id: I7b31d762eb54612c4d8779ee133211f32fb73b05
/frameworks/base/media/java/android/media/tv/TvView.java
c66ca1267cfa4aca70d3dceaf5962ff77ee030b3 18-Jul-2014 Youngsang Cho <youngsang@google.com> Merge "TIF: Add a notification for surface change from TvView to TvInputService" into lmp-dev
e821d711db1799dc51661a3ed6188f3cd942bae7 16-Jul-2014 Youngsang Cho <youngsang@google.com> TIF: Add a notification for surface change from TvView to TvInputService

Bug: 15447352
Change-Id: I3e91609c5eb03be84cc7c88507457b9e74750de8
/frameworks/base/media/java/android/media/tv/TvView.java
6057102dbb746593a7d59cf377c969b62e38c664 15-Jul-2014 Jae Seo <jaeseo@google.com> TIF: Add TvParentalControlManager

Each TV input service is now required to query the system whether the
user is allowed to watch the current program before showing it to the
user if the parental control is turned on, which can be checked by
calling TvParentalControlManager.isEnabled(). Whether the TV input
service should block the content or not is determined by invoking
TvParentalControlManager.isRatingBlocked() with the content rating for
the current program. Then the TvParentalControlManager makes a judgment
based on the user blocked ratings stored in the secure settings and
returns the result. If the rating in question turns out to be blocked,
the TV input service must immediately block the content and call this
method with the content rating of the current program to prompt the PIN
verification screen.

Each TV input service also needs to continuously listen to any changes
made to the parental control settings by registering a
TvParentalControlManager.ParentalControlCallback() to the manager and
immediately reevaluate the current program with the new parental control
settings.

Bug: 13172379
Change-Id: I8e1900d4b8d28c56798986d5c3906bd418ab97ac
/frameworks/base/media/java/android/media/tv/TvView.java
9b08edff236fc68d836eccfaa1a5f028dc390cec 04-Jul-2014 Dongwon Kang <dwkang@google.com> do not merge. Implement onVideoAvailable/Unavailable in TIF.

Use cases:
- VIDEO_UNAVAILABLE_REASON_TUNE: to show spinner on channel change.
- VIDEO_UNAVAILABLE_REASON_WEAK_SIGNAL: to show a message and spinner on weak TV signal.
- VIDEO_UNAVAILABLE_REASON_BUFFERING: to show spinner on buffering.
- VIDEO_UNAVAILABLE_REASON_UNKNOWN: to show spinner.

Bug: 14126559
Change-Id: Ide2b68c74bd96d4ea1b9d85ab099a277253d05c7
(cherry picked from commit 1edfd8eb985ee41095c60f4aaf7029f56abff614)
/frameworks/base/media/java/android/media/tv/TvView.java
2c1c31c7ae9bd972b974a5cc2d8b0942746af612 10-Jul-2014 Jae Seo <jaeseo@google.com> TIF: Add a way to enable/disable caption

This is required to handle the case that an application wants to turn
on/off the caption explicitly (e.g. TvView in PIP). TV input service
implementation must respond to the request immediately to avoid any
legal implication since the captioning is imposed by the law in many
countries.

Bug: 14121898
Change-Id: I9600debae709fdc99065d7a0138ae69d1dffc9ba
/frameworks/base/media/java/android/media/tv/TvView.java
1f213914c45c23c653f721690da2ce0718e63139 02-Jul-2014 Dongwon Kang <dwkang@google.com> Support multiple tracks in TV Input framework.

Added API: getTracks/selectTrack/unselectTrack/onTrackInfoChanged
(onVideo/Audio/ClosedCaptionStreamChanged callbacks are removed in favor of onTrackInfoChanged)
Use cases: audio and closed caption track selection
Background: go/tif-multi-track

Bug:14073704, Bug:14121898, Bug: 16049453
Change-Id: I199ed16f690d4e757da0bb30c8bc8222a6fa1d7a
/frameworks/base/media/java/android/media/tv/TvView.java
b93ccca6139a7ee2dba5c110e5f8213a2bd231e5 26-Jun-2014 Dongwon Kang <dwkang@google.com> Add onChannelRetuned callback in TV Input Framework.

Use cases:
- Channel change from STB which is bound to a TV input.

Bug: 14126559
Change-Id: Icddab61be6cb11162c03960fdb41fee8504bcd61
/frameworks/base/media/java/android/media/tv/TvView.java
07b7c5fa4cb705eea5d89f98e84341db5465d663 27-Jun-2014 Youngsang Cho <youngsang@google.com> Turn on/off an overlay view by visibility change in TvView

Bug: 15873405
Change-Id: I0e6db7fb61af6d79cbfc00cefddd8ba2a0a7ee7e
/frameworks/base/media/java/android/media/tv/TvView.java
182dc33e9efcbfa80d6b277666c427c1b4afc3bf 09-Jun-2014 Jae Seo <jaeseo@google.com> Merge "TIF: Address the feedback from the API review - 3/3" into lmp-preview-dev
1bfce9fb9bffe8bd620fd1683572ae620f91772f 04-Jun-2014 Jae Seo <jaeseo@google.com> TIF: Address the feedback from the API review - 3/3

- Change TvView to be a generic ViewGroup with a single SurfaceView child

Bug: 15345342
Change-Id: I86ed94b7020aabb6e093e391ab9477c1f801919a
/frameworks/base/media/java/android/media/tv/TvView.java
336cdf20dd44ee93b5173be73e26e966a2609eb0 08-Jun-2014 Dongwon Kang <dwkang@google.com> Make TvView keep the volume value and set later once the connecation is made.

Bug: 15483740
Change-Id: Id4272bffb556587707b641ec8296bc5a9e57807e
/frameworks/base/media/java/android/media/tv/TvView.java
b8a64416e5e7cf39fd899fa600a940b0ef3c15fd 04-Jun-2014 Jae Seo <jaeseo@google.com> TIF: Address the feedback from the API review - 2/3

This change addresses the following comments from the council:
- Change the TvView API to be tune(String inputId, Uri channelUri) and
reset()
- @hide TvInputSession class, including createSession() and
SessionCallback
- Define a listener interface specific to TvView, allowing you to hide
the session details and keep the API simpler. Add
setTvInputListener().

Bug: 15345342
Change-Id: I931662841b41d862ebc4a700ccb245889a5f87a5
/frameworks/base/media/java/android/media/tv/TvView.java
782f7345471072b630e58c7abd3579b0015273b1 03-Jun-2014 Jae Seo <jaeseo@google.com> TIF: Address the feedback from the API review - 1/3

This change addresses the following comments from the council:
- Change TvView.setVolume() --> setStreamVolume()
- Surface only TvInputInfo.getServiceInfo() instead of the separate
getPackage/getService/getComponent calls. However, keep loadLabel()
at the top level.
- @hide register/unregisterListener() for the preview, since it binds
out to each service.
- TvInputService should document which permission it should protect
itself with.
- Remove TvInputService.setAvailable() for third-party developers.
- Change class name TvInputSessionImpl --> Session
- Change callback name to onSetStreamVolume() to match earlier change

Bug: 15345342
Change-Id: I3ce5cba7dad2622b78d16c408f81c4b0eba837a4
/frameworks/base/media/java/android/media/tv/TvView.java
a3be12a236aef0d9c4ff1274075f1e7899d29153 02-Jun-2014 Dongwon Kang <dwkang@google.com> Add onAudioStreamChanged and onClosedCaptionStreamChanged callbacks from TIS to application.

Bug: 14628404
Change-Id: I40abf647e9d608c2c793d007fd2fe0d511535bdd
/frameworks/base/media/java/android/media/tv/TvView.java
d5cc4a281e7ce29d1e8687ff3394b57a3a549260 31-May-2014 Jae Seo <jaeseo@google.com> Put TV Input Framework under android.media.tv, including TvContract

Bug: 15345342
Change-Id: I665ca23f0f074ce29cb2e047109b209178532107
/frameworks/base/media/java/android/media/tv/TvView.java