History log of /frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
18c0cfb0750668daf8b5c099122ea4fb214a1449 17-May-2016 Jae Seo <jaeseo@google.com> TIF: Throw a more appropriate runtime exception when building TvInputInfo

Bug: 28775591
Change-Id: I934c8d7fed3dda356cdc3bafe51a79f585918ed0
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
2263fb0b1a58282fb5a0aecb4c6b4e77296506b7 14-May-2016 Shubang <shubang@google.com> TIF: Update TvInputInfo when the input is reinstalled.

Bug: 28678019
Change-Id: Ibd290245a64cdb4950bda4c054e713b38a546f5f
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
2bea394d14e6e7ae6a183d302d21ce1deacf4774 05-May-2016 Shubang Lu <shubang@google.com> Merge "TIF: Keep recording sessions while changing user" into nyc-dev
8049f20df8c10397aac8d31bcb455913ad02bb67 25-Apr-2016 shubang <shubang@google.com> TIF: Keep recording sessions while changing user

Bug: 28302189
Change-Id: I3de400798b9ded5f9f67931fbe7033755d76902f
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
19c47d79951eb420e6926d188c7d39f5563c5b5f 05-May-2016 Youngsang Cho <youngsang@google.com> TIF: build TvInput list at onUnlockUser

From N, apps cannot be accesible until onUnlockUser is called.
So the TvInput's list needs to be built at onUnlockUser.

Bug: 28586844
Change-Id: I84c896fa243c05c7e1f794863d8a83288549e6ff
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
0751a83a99dc4481533ed706a942b8bb9caf8834 25-Apr-2016 Dongwon Kang <dwkang@google.com> Merge "TIF: Be consistent with argument name for startRecording" into nyc-dev
0cb5244e52590214ddc16dd5fc1030b5baf04726 22-Apr-2016 Dongwon Kang <dwkang@google.com> TIF: Be consistent with argument name for startRecording

Change-Id: Icb0125049cc92c5664e0810cdb86f1cb0903405f
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
a897e5f5e32557efa03c375fde17faae3282673f 19-Apr-2016 Dongwon Kang <dwkang@google.com> TIF: Do not build input list for background user

Building input list for background user leads to unnecessary connection
request to hardware input and that causes incomplete service state.

Bug: 27407198
Change-Id: Id8d5d5001394781edd2dafe8681c674855332ae3
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
e12d810e99da093d3cf38f89c81e3e8d1e75b404 05-Mar-2016 Dongwon Kang <dwkang@google.com> TIF: Unhide TvView.setZOrderMediaOverlay/setZOrderOnTop/tune/unblockContent

Bug: 25726685
Change-Id: If96d0b086488c931d20315ee1c29cf7374715d93
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
b55c7517ba4b2c2959a0bc4d37536e7e3c8283c9 01-Mar-2016 Dongwon Kang <dwkang@google.com> TIF: Address API review comments

Bug: 27386052
Change-Id: I242819e0817723e247b8fe646d534899ab50af76
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
8d718e1c96fd11ba9c956fbb66247b06142fda2d 15-Feb-2016 yangren <yangren@google.com> TIF: Add information of TvInputHardwareManager to dumpsys

Add function dump() to TvInputHardwareManager.

Bug: 22774343
Change-Id: I22e923b95724e4db42824743026c050412a3d28c
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
aa5605ffee270ef8802c5d9dc8df8ce71e377f55 13-Feb-2016 Jae Seo <jaeseo@google.com> TIF: Rename setTvInputInfo to updateTvInputInfo

As TvInputInfo includes many complex objects as fields, it is not
practical to check whether an existing TvInputInfo has actually
"changed" by using simple comparisons when a new TvInputInfo object is
set by a TV input service.
This code change renames
- setTvInputInfo to updateTvInputInfo
- onTvInputInfoChanged to onTvInputInfoUpdated
to indicate that the callback is mechanically invoked whenever
updateTvInputInfo method is called.

Change-Id: Ia351b3591d0ed9da962311546f0ba51158e6478e
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
c980f43d940f1154a15ef003fb00c19708c396da 10-Feb-2016 Jae Seo <jaeseo@google.com> TIF: Clean the hardware input list when the input service is reconnected

Needed to avoid adding duplicate TvInputInfo objects when the hardware
TV input service is killed and reconnected.

Bug: 26503803
Change-Id: I9265219678cb8594d43dac561f1e69c21d9c2733
(cherry picked from commit 6657e292a57e600669b3102d27f69497c45f899d)
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.java
4eee6a73e476cd2d82a69f3a535628901047f140 06-Feb-2016 Jae Seo <jaeseo@google.com> TIF: Allow the application to indicate a TV program to record

Bug: 26962040
Change-Id: I2f062a4621c8a9a6765543826ba2cd607f1468d4
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
abda420b9d2959776093230cd2e157a6080f2f64 29-Jan-2016 Jae Seo <jaeseo@google.com> TIF: Update the internal input list with new TvInputInfo

Bug: 26864151, Bug: 26863281
Change-Id: I33e357aac74bceda50c794eb6057c363de9250b8
(cherry picked from commit 89a9937927e05a86938aa297a79047ce1a7c7d2d)
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
2cdb05e576d5355d444a9533a62e6892cc02f9f2 04-Feb-2016 Jae Seo <jaeseo@google.com> TIF: Replace TvInputInfo in SessionState with ID and component name

Needed to avoid coherency issues when updating TvInputInfo.

Bug: 26864151
Change-Id: Iec67b74628e1e52ebd8f7bf1aeb6339fe8fdb98f
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
1abbbcd33efb8e5897c0fad5b6dd3af9a6b49b0d 29-Jan-2016 Jae Seo <jaeseo@google.com> TIF: Add Hardware prefix to method/member names for better readability

Also removed the infix 'Tv' to make those names consistent with other
names (e.g. mHdmiInputIdMap, inputList, etc.)

Change-Id: I40eff18f8ca795c080edaf293f4906848caed0ca
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
c2a89510ddda390d6d53ff24dd20d257fcd2379e 28-Jan-2016 Jae Seo <jaeseo@google.com> TIF: Notify of a change to TvInputInfo regardless of service connection

Also removed unnecessary input ID in various methods

Change-Id: I50a2da924e9442312ccf16278e9123f837ec8942
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
c03671fdf628a713b984483801554d889e54ae23 27-Jan-2016 Jae Seo <jaeseo@google.com> TIF: Add Builder to TvInputInfo and deprecate createTvInputInfo methods

Bug: 25726241
Change-Id: I8eae9c0c939e7ec4bdfbdbf40d0d1d70a5e0d45c
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
a826d0172aae5e91d633ffe606059a2355fbf7e5 18-Jan-2016 Jae Seo <jaeseo@google.com> TIF: Recording API

Bug: 23786643
Change-Id: Ie26e8944312048bc865b4506aa49fced15360fe4
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
2a2b299dca20b151d5dc5bda3d068d70e6f15f6c 13-Jan-2016 Jae Seo <jaeseo@google.com> TIF: Fix typos

Change-Id: I82f7fc68840d9fcdc579fc451e9d295c04512083
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
81e3c3e68d3baf506a76e588e8f25ff69e419171 12-Sep-2015 Dongwon Kang <dwkang@google.com> TIF: Unbind the service only when it is bound

Bug: 23718447
Change-Id: I3189dbea193b3d8247e29168564f894323fb4886
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
233d94c0df13a7e54f738f442457cebc62294384 31-Jul-2015 Xiaohui Chen <xiaohuic@google.com> clean up UserHandle.USER_OWNER reference

cleaning up a few in framework/base/services.

Bug: 19913735
Change-Id: I1af5f24d9b39d6712ad3a665effa6166e32ce3d3
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
4f1a6d477c0da5948617a1207c319ca227f60e57 21-Jul-2015 Jae Seo <jaeseo@google.com> TIF: Get or create the user state when failed to find existing one

Bug: 22560640
Change-Id: Idc56dc2b16319d173f005fc236f91f70d1a93fad
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
8c375feb686dee8b6e8a9c69100de88c4d61afdc 24-Jun-2015 Jae Seo <jaeseo@google.com> TIF: Use per-user ContentResolver in the TvInputManagerService

When switched to a different user (e.g. Restricted profile), the
TvInputManagerService continues to use the TV storage of the previous
user for logging, resulting in failure of the FOREIGN KEY constraint
since channel data for the current user don’t match to the logging data.
This change ensures that the system service uses the proper
ContentResolver when the user is switched.

Bug: 22047202
Change-Id: I870b5bd921e37a5f1219ea66c7a51314c77ddb01
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.java
93ff14b7a5d1a9b4d3f57da85b286069fe9d8303 21-Jun-2015 Jae Seo <jaeseo@google.com> TIF: Use the right size for calls to toArray() instead of 0

Change-Id: I645a09403b60545123627df7d0222ed34f084ffe
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
76976fae6fbe2f30ba209575557da153e29be33b 21-May-2015 Jae Seo <jaeseo@google.com> TIF: Build the list of available TV inputs as the current user

Bug: 21313985
Change-Id: I8aa881570915d14d63e4ac0b8034044f8736443b
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.java
58739e758428f3b880f8e67161f57c59aa06d496 24-Apr-2015 Jaesung Chung <jaesung@google.com> TIF: Add DVB device handling to TvInputManagerService

Added an API to pass an open file descriptor of DVB devices and
addressed the security issue of setting the permissions on DVB devices
to 0666.

Bug: 20436120
Change-Id: I4649e76084f3356ec22b7e776fb87c6a8fdc00d6
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.java
d69e4c1460017062e7c36be55801cb434ad19d97 24-Apr-2015 Dianne Hackborn <hackbod@google.com> Update use of procstate for services.

Now that we have a separate foreground service proc state
(above a sleeping top app), update various system services
to put their bindings into this state when appropriate.

There are two new bind flags for this -- one that just always
makes it a foreground service, another that only does it when
the device is awake (useful for things like the wallpaper).

And with all of that, tweak network policy manager to only
include apps that are at least foreground service state when
in power save and device idle modes. This will allow us to
further reduce the set of apps that have network access
(in particular not giving access to the current top app when
the screen is off), hopefully leading to even better battery
life.

Change-Id: I91d85a5c5ed64e856149e9a5d94a634a7925ec7f
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
82fce64530d19a4da1c02d424fb2515feafe6a70 21-Apr-2015 Jae Seo <jaeseo@google.com> TIF: Fix incorrect uses of INPUT_STATE_XXX

Also changed TvInputManager.getTvInputState to return
INPUT_STATE_DISCONNECTED for removed inputs and fixed documentation.

Bug: 18563677, Bug: 20435950
Change-Id: Idb81cee852b797eb3f5113d68468905f327928e7
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
31a8f8400b6e612bd287cc8ca3c2fcba0edd816e 09-Apr-2015 Dongwon Kang <dwkang@google.com> TIF: Update the input list even when a single component in a package is updated.

Bug: 20127116
Change-Id: I1aefaaba9076877cefc5cfdf36d3c6169c437b6d
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.java
6f0240cf63fe62b0af2c7d5112f9881d1e167bfc 01-Apr-2015 Dongwon Kang <dwkang@google.com> TIF: Add time shift APIs.

Change-Id: I4faecd99d9e565c7228fc4b9da99e2adf1e67f19
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
fdce9e541e143332ba4ece6a0bda4f11520f0b07 04-Dec-2014 Dongwon Kang <dwkang@google.com> TIF: handle a race condition when a session is crashed

Currently, TIMS has a logic for handling session crash (binderDied).
However, this can be racy if the client calls an operation right before it gets
ITvInputClient.onSessionReleased() callback. This change handles those request
gracefully without causing a crash in the client side.

Bug: 18612616
Change-Id: I37241e05d53f3cca693e0239fc9ad5dce02fc925
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
993f81e2380da210c27e1e957ac1bdca3a99100a 27-Nov-2014 Dongwon Kang <dwkang@google.com> TIF: fix a race condition when TvInputManager is initialized

Currently, TvInputManagerService notifies the initial state of each
input via TvInputManagetCallback#onInputStateChanged after TvInputManager
is created. However, this is racy because the client may call methods
like getTvInputState() before the initialization.

This patch makes sure that the client gets the control when the initialization
finishes completely.

Bug: 18419452
Change-Id: I5d8141c20984013e68f2809120710c670557c9ad
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
9c6b5b729bd83b1d1e00428f8a76f272b609c97e 16-Sep-2014 Ji-Hwan Lee <jihwan@google.com> TIF: Re-connect the session on package update.

When TIF client tries to connect a session while TV input is being
updated, updateServiceConnectionLocked() may fail to bindServiceAsUser()
and the session state may remain indefinitely until a client tries to
create another session to connect the service. Reconnect the session by
calling updateServiceConnectionLocked() when package is updated.

Also, remove the session state when client dies before onSessionCreated().
This was causing the stale session in the above scenario (without
reconnection) to be connected to TIS even when client no longer exists.

Bug: 17518751
Change-Id: I5484df0d80c71649d22438521adf182ab59a6ce4
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
ee2ec05ed7c0d3cb9115f4ddd7c3613269c4a57b 14-Sep-2014 Jae Seo <jaeseo@google.com> TIF: Turn debugging off

Bug: 17476383
Change-Id: I28ff54a635bf6468c231efe776dbc8e35460d542
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
19ba61affbc0c4a4454abc6cf09f70ea428d1a62 02-Sep-2014 Chulwoo Lee <chulwoo@google.com> Notify of the update of TvInputInfo

The TvInputInfo is updated when
1. the package is reinstalled.
2. the media on which a newer version of TV inputs exists become
available.
3. the media on which a newer version of TV inputs exists become
unavailable.

BUG: 17349383
Change-Id: I983058b13678bd8ecf7d766dc8bdac5fed7df4a0
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
f271eacba7997d2751c336153634fac53bc4d660 29-Aug-2014 Wonsik Kim <wonsik@google.com> Bind hardware TIS at startup

Bug: 17336654
Change-Id: Ia1354305ee83c7c15afb7647f000c8b023c4648d
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
fd8aa02d73ed43fb90bf44dbe4d65d378261d905 28-Aug-2014 Dongwon Kang <dwkang@google.com> TIF: cosmetic changes for consistency.

- Remove uncessarry logic in buildTvInputListLocked().
(No longer needed because we removed availability.
Verified the bug case, b/15738607, does not happen without this logic.)
- Rename member variables in XXXState classes.
- Define SessionCallback for consistency.

Change-Id: I49642c909ad7f77d97d1d90670c7bb7c2b12cda8
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
9c165d6e9a2f085fbdc87b9221f2d52d851b2652 25-Aug-2014 Jae Seo <jaeseo@google.com> TIF: Enable applications to register custom content rating systems

A recent change that moved the string resource for the system supported
content ratings from the framework to the TV app led to a need for
allowing the TV app to publish its own content rating systems. This
change added an intent action and a metadata key to be used by the TV
input manager service for querying available content rating systems,
similarly to the way InputManager defined ACTION_QUERY_KEYBOARD_LAYOUTS
and META_DATA_KEYBOARD_LAYOUTS for custom keyboard layouts. Applications
now can register their own rating systems simply by declaring a
broadcast receiver in their manifests.

Bug: 17167287, Bug: 17114406
Change-Id: I1808c624014b603ea709714737c2a880714bdc0a
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
f7f49ddade34744d5386f9bf52ab9ba4f981fce7 27-Aug-2014 Dongwon Kang <dwkang@google.com> TIF: fix callback cleanup logic in removeSessionStateLocked().

Adding DeathRecipient to callback instance is enough. removeSessionStateLocked()
can be called in normal session release case, and the current logic will remove
valid callback instances.
Also, ConcurrentModificationException in abortPendingCreateSessionRequestsLocked()
is fixed.

Bug: 17212681
Change-Id: I42cacfa33086bf9182b061553ff52c0e25d94d9b
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
6c79454cfc59c07af94289faceb87598aa570616 27-Aug-2014 Jae Seo <jaeseo@google.com> Merge "TIF: Remove the registered callback when the client process has died" into lmp-dev
fea8dd45f4955b4b4b6536bf51453e19288deba2 26-Aug-2014 Jae Seo <jaeseo@google.com> TIF: Remove the registered callback when the client process has died

Also make error messages more consistent

Bug: 17276418
Change-Id: Ib87e13e1383db4ff623de2e9b68ae9ff4309360a
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
70613dbff74544c6f537cc3a84392e07ad70859c 27-Aug-2014 Dongwon Kang <dwkang@google.com> Merge "TIF: clean up pending createSession requests when a package is removed." into lmp-dev
426c9a4008b75b93cbfea15aa4b8c47c5fdb49b9 26-Aug-2014 Dongwon Kang <dwkang@google.com> TIF: clean up pending createSession requests when a package is removed.

Pending createSession request for the package removed led to the tune request
with invalid channel URI. This change prevents crash from invalid URI by cleaning
up the pending requests on the package removal.

Bug: 17214114
Change-Id: I26fdf9eb45a5fec9032926a1c2994831c07b4fbe
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
5d0ec89d55f0e986a0704ce1c8ea5c1a604c4cb2 27-Aug-2014 Jae Seo <jaeseo@google.com> Merge "Revert "TIF: Temporarily disable permission check for parental controls"" into lmp-dev
fc836f6684f6e142fe53dc16e1552ffd19bd95bc 27-Aug-2014 Jae Seo <jaeseo@google.com> Revert "TIF: Temporarily disable permission check for parental controls"

This reverts commit 9d197941afcef7853578fcd2d704d6f97dde0902.

Change-Id: Ib376f3d4deddf72b94a5195f7aeafafd3ed189e8
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
14355950d5ce42b8043cfb96d192f1c76b93d496 20-Aug-2014 Jae Seo <jaeseo@google.com> API Review: android.media.tv

TvContentRating:
- The XML file: attributes should have android: prefix and should allow
string resource references for labels.

Bug: 17114406
Change-Id: Ife2f4dc6c2c8a5a1714cdeedb27aab40fce73e2b
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.java
0c3b4ad7b6888f533aaef01db1c8f61327f7d5e7 19-Aug-2014 Ji-Hwan Lee <jihwan@google.com> Merge "TIF: Remove session state when hardware wrapper input crashes" into lmp-dev
4835497886ee876b16e1144d32f5bdcfbb7e9062 16-Aug-2014 Ji-Hwan Lee <jihwan@google.com> TIF: Remove session state when hardware wrapper input crashes

Change-Id: I2306cc407a19892c1895ee70bd6bd52b1a3bd4f3
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
c22d0c0941ab65ca69977d002c4431394a735c7d 15-Aug-2014 Jae Seo <jaeseo@google.com> TIF: Make passthrough related method names consistent

Bug: 17063792
Change-Id: Id76b37ae1507db5d78319b8786b395353ded70e1
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
98f4c16a7beba90abffa89d0b32b8ee56a31073d 18-Aug-2014 Jinsuk Kim <jinsukkim@google.com> Merge "CEC: Replace the usage of logical address with id for HdmiDeviceInfo" into lmp-dev
8960d1b1552729e3dfd33deee951ac75933ad8e5 13-Aug-2014 Jinsuk Kim <jinsukkim@google.com> CEC: Replace the usage of logical address with id for HdmiDeviceInfo

Introduced 'id' of HdmiDeviceInfo to replace the direct use of logical address
as id. This accomodates the identification of MHL device with ease. Also updated
TIF to use id instead of logical address.

Bug: 16986744
Change-Id: Ifa827fb5e5fcf1d2f612f0845accbfe5c03734aa
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
550c4b0d4dc6f3e2ef388b4250c758829c8255bc 13-Aug-2014 Jae Seo <jaeseo@google.com> TIF: Temporarily disable permission check for parental controls

Bug: 16979343
Change-Id: I00ff70194faaf7218151388dc10ce8e4dd3d2728
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
592ddc3f6e8362807b314ac2c4b7c9b7e6e89ff2 14-Aug-2014 Wonsik Kim <wonsik@google.com> Merge "TIF: handle HDMI CEC power status change" into lmp-dev
e92f857d50d7259a4cf7ef5b88309e098338c9c1 12-Aug-2014 Wonsik Kim <wonsik@google.com> TIF: handle HDMI CEC power status change

Bug: 16967261
Change-Id: I252dbb249ec818bcaad7d813d1065ebb0714bd54
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
9cc28e5175e1391646b29469d329c9c1c9311ee1 13-Aug-2014 Jae Seo <jaeseo@google.com> TIF: Create TvInputState only once per each input

Also removed mClientTokens which is no longer used.

Bug: 16970763
Change-Id: I4fc276241c33f88ed932ce6c703bdb3f771eb7d4
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
0c38fc764b0e1c5c8b880872d9b4a647a76955cd 13-Aug-2014 Ji-Hwan Lee <jihwan@google.com> TIF: Fix release logic for hardware wrapper input

Change-Id: I7aad26682738e7a20bc6a053c3827ab79e83e925
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
61daf6b38e7a7ada2a6ca5a60539a54b9c6810bd 08-Aug-2014 Jungshik Jang <jayjang@google.com> Hook up device power status change to TIF

Instead of introducing new api update existing
IDeviceEventListener

Bug: 16445063
Change-Id: I93bfc736a06a78e83c95877a53f4f241b51ed9c0
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
7eb75dff7a0fb4b19c3e801cd388483d7d471f41 09-Aug-2014 Jae Seo <jaeseo@google.com> TIF: Move watch history logging to TvProvider

There are only two kinds of watch events that can happen on the system:
1. The current TV input session is tuned to a new channel.
2. The session is released for some reason.
The former indicates the end of the previous log entry, if any, followed by the
start of a new entry. The latter indicates the end of the most recent entry for
the given session. Here the system supplies the database the smallest set of
information only that is sufficient to consolidate the log entries while
minimizing database operations in the system service.

Bug: 14791151, Bug: 15921205, Bug: 15988715, Bug: 16831555
Change-Id: Ifcb1a1273c14ee234919d819d082b1004eb92ebc
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
8d4ded0058de5c573ccf79c4596bf5eb1b14fad3 09-Jul-2014 Chulwoo Lee <chulwoo@google.com> TIF: Fix a bug of incorrect watch history

When the user keeps watching one channel without tuning to the other
channel, the user can watch many programs. In this case as many watch
history records as the number of programs the user watched should be
inserted in watched_programs table.
But there is a bug now that only one record is logged for all the
programs and this CL fixes the bug and makes the watch history
logging work correctly for this case.
In addition, package information should be added to the content value
because it should be not null in programs table.

BUG: 16177411
Change-Id: I058f9db927b5d684a1af7852630f50ec2d2743b6
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
546c635ad9a26421fbdf54efa765b5ab0a63c191 07-Aug-2014 Jae Seo <jaeseo@google.com> TIF: Change CEC specific names to more general ones

Now MHL device information is also a part of HdmiDeviceInfo (previously
HdmiCecDeviceInfo). This change adjusts method/variable names across our code
base to reflect that.

Bug: 16215362
Change-Id: I7a6692329f39842a4aec9a4ff036eca5474cfd33
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
579befecb248162021929ab58ffd23f1724cc6be 07-Aug-2014 Jae Seo <jaeseo@google.com> TIF: Do not log non-searchable channel watch history

Bug: 16798476
Change-Id: Ic131009ad65a661331e4f8f0820c5c183a9f4986
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
956afc2ba79f50bb8025c6d334653e3c3419b480 26-Jul-2014 Ji-Hwan Lee <jihwan@google.com> TIF: Handle setMainSession for TV input wrapper services

Bug: 15994065
Change-Id: I46b3c0a89be92036f2c3849a412075caf587ec5c
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
df9f0a321e0cb2958c9d170395a0367a106fa0e6 06-Aug-2014 Terry Heo <terryheo@google.com> TIF: Add system API 'isSingleSessionActive()'

Bug: 16498558
Change-Id: I4f815f431051dbf786216d2b04e9737be451a508
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
61f4fbd2e8436a1ecd478c2a1f516d064a24d43b 06-Aug-2014 Jungshik Jang <jayjang@google.com> Rename HdmiCecDeviceInfo into HdmiDeviceInfo.

In order to include mhl device info to device info,
rename HdmiCecDeviceInfo into HdmiDeviceInfo.

BUG: 16215362

Change-Id: I30fb0216061fbbdd6fdc1b82c63af83f1b678597
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.java
e377ea5de67aaca36c86ac8971ce0a9126c5af20 06-Aug-2014 Dongwon Kang <dwkang@google.com> Merge "TIF: Rearchitecting TvInputPassthroughWrapperService." into lmp-dev
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/services/core/java/com/android/server/tv/TvInputManagerService.java
bd2fa2c02d916a9b6c62f8fd8701d779c00bd68d 25-Jul-2014 Dongwon Kang <dwkang@google.com> TIF: Rearchitecting TvInputPassthroughWrapperService.

This change addresses the following issues raised in the API review:

TvInputPassthroughWrapperService needs to be rearchitected:
-- Create a nested class (possibly called RemoteTvInput) inside TvInputService that
represents remote connection to the underlying physical TV input (HDMI).
RemoteTvInput which will need to have additional method like createRemoteSession.
-- This class has methods to control that remote input, and a callback so TvInputService
to observe state changes.
-- Add TvInputService.onGetParentInputId() (no argument) which returns null by default.
-- Extend TvInputService.onCreateSession(String inputId, RemoteTvInput parent) to pass
in the RemoteTvInput requested by onGetParentInputId(), if any.

Bug: 16542165
Change-Id: Ic6b0c9b5d770c9d1f9377061af8dcb6bae0cb9dc
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
2d99826605d8f18d71b5a4696cdf2f6909adab44 01-Aug-2014 Sungsoo Lim <sungsoo@google.com> Merge "TIF: Use XML file for representing TvContentRating" into lmp-dev
5c5b83fcd58d21c9ab7ac986bf84f604ec5bb4b5 29-Jul-2014 Sungsoo Lim <sungsoo@google.com> TIF: Use XML file for representing TvContentRating

This change addresses the following API council feedback.

- Remove all constants from TvContentRating. Instead this class becomes a
general parser for a tuple of "rating domain"+type+subtype(s).
- Instead of constants in the API, the rating definitions should come from
parsed XML meta-data tied to a TvInputService entry in the AndroidManifest.
This XML should define a ranked order of the rating constants along with
@string references for displaying in the Settings UI. Mention that the
"rating domain" should be scoped similar to a package name, for example
"com.youtube.ratings".
- For system-defined rating types (like US, Korea, etc) we should parse this
same XML format, but it may come from a hard-coded XML resource (since they
aren't tied to a single TvInputService.)
- Thoroughly document the built-in supported types in javadoc on TvContentRating.

Change-Id: I0a9526c73c8ca67fd0eeac63f3c63c05657a45e3
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.java
783645e99f909ffc7a2d5d2fca9324cc0e9b7362 28-Jul-2014 Jae Seo <jaeseo@google.com> TIF: Merge TvParentalControlManager into TvInputManager

This change addresses the following API council feedback.

TvParentalControlManager:
-- Replace the listener interface with a broadcast Intent with well-known
action, something like ACTION_BLOCKED_RATINGS_CHANGED.
-- TvParentalControlManager goes away, and two remaining methods move to
TvInputManager.

== Implementation changes ==
-- The user-selected rating preferences should be stored in an XML file, and
loaded at boot by your internal system service. It should _not_ be stored in
a Secure/Global setting.

Bug: 16542165
Change-Id: I278df963576652ec9163a66c1ef99419fcdb36c2
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
c88f1916b8ab7f5f75a00375c6fb4873ea5044af 25-Jul-2014 Ji-Hwan Lee <jihwan@google.com> TIF: Fix invalid use of serviceStateMap.get()

Change-Id: Ic43ac2697ed459a105e62c81e8cb6d0fb8ff6dd0
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
9e8ade2eb7ee835963473c9cf6faaf5423b0b048 25-Jul-2014 Ji-Hwan Lee <jihwan@google.com> TIF: Rename ComponentName variables to "component" consistently

Currently, it's sometimes "name", or "service".

Change-Id: I91dffe30fd2b873c744dbde2c027f0582f55746f
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
a65118e13b5ceb54454b48f67ea754a38a08f27a 24-Jul-2014 Ji-Hwan Lee <jihwan@google.com> TIF: Remove ClientState.mInputIds

It's no longer used since callback is now global, instead of per-input.

Change-Id: I82e4d9b8999fb9c18819a12e8436cd94e7174206
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
abca0ee7949f59e72b8d2764dafa23af18eb51db 24-Jul-2014 Ji-Hwan Lee <jihwan@google.com> TIF: Handle null main session

Change-Id: I5d9007e706d2adf4b559839c1db31221527214ec
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
982abe693f66037ca265b88057eceb5a3e815182 24-Jul-2014 Ji-Hwan Lee <jihwan@google.com> TIF: Fix crash on setMainSession

Change-Id: Iddf5032a99dbf855e418448b39ba66a68be8b07c
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.java
79124a717c09f12c74d587d3977bf33ca37e6420 21-Jul-2014 Terry Heo <terryheo@google.com> TIF: Enable capturing TV input of TvInputPassthroughWrapperService

Also fixed usage of Log.e() in TvInputService to show stack trace.

Bug: 16441553
Change-Id: I5c160de4a628698907ffd00510d982d597c0ea01
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
c086a3df3b28996cd10ebe42c5f59035d054aa0d 18-Jun-2014 Terry Heo <terryheo@google.com> Add a frame capture API of TV input

- Added new permission CAPTURE_TV_INPUT

Bug: 15736756
Change-Id: I2ae8b2e3f5b1ad1d525854ed89ab2043cf66acbe
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
008f6d4e326f6372e165bdf342178ecd1e834e2f 23-Jul-2014 Youngsang Cho <youngsang@google.com> Block logging watched histories for passthrough inputs

Added a system API TvContract.isChannelUriForPassthroughTvInput

Change-Id: I933482831ae2a8b4d6000c4d16520387b5b6a13f
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
4f9f57cede3de2e2aa3045e04b485b176ab22dbd 19-Jul-2014 Ji-Hwan Lee <jihwan@google.com> TIF: Extend multiple TV input per service for HDMI logical devices

Remove ITvInputManager.registerTvInputInfo() and let addTvInputInfo*()
cover the registration.

Bug: 15570939
Change-Id: Ic36701de96696e7fe32fc1faa0d5f6fde53f6666
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.java
6f306e21f4d0b62866d8622b4d4698f6d76de2b2 18-Jul-2014 Youngsang Cho <youngsang@google.com> Merge "TIF: Add unblock content" into lmp-dev
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/services/core/java/com/android/server/tv/TvInputManagerService.java
8e6b51b0fb810ac990c863cc0579e2b2700ab7d6 15-Jul-2014 Jaewan Kim <jaewan@google.com> TIF: Add onInputAdded and onInputRemoved

Bug: 16166859
Change-Id: I51bd87aded3e8619e36be200009e924e73cd348e
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.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
b375805f3b1672e68d1511565af4700e5fa8491d 13-Jul-2014 Jae Seo <jaeseo@google.com> TIF: Add a method to get TvInputInfo for a given TV input

This is going to be needed by applications to get information about the
inputs that are just added thus not included in the previously retrieved
input list.

Bug: 16166859, Bug: 15838097
Change-Id: Icecd03fcea208a0c4d41caab1eec64e574f40877
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
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/services/core/java/com/android/server/tv/TvInputManagerService.java
54a463498316594ba7e0567db5d4f541a7a1e827 18-Jul-2014 Jae Seo <jaeseo@google.com> Merge "TIF: Add TvParentalControlManager" into lmp-dev
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/services/core/java/com/android/server/tv/TvInputManagerService.java
187423c0bc4b27479bc8c23bd86969429094b296 25-Jun-2014 Wonsik Kim <wonsik@google.com> TIF: one-to-many relationship for TvInputService to TvInputInfo

The scope of this change is to provide a skeleton code for supporting
multiple TV input per service.

Bug: 16138420
Change-Id: Ic51355902d5e0424b8fc8a75c495d4781a7ed744
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
969167dc05a6485a32d160895871cff46fd81884 24-Jun-2014 Wonsik Kim <wonsik@google.com> TIF: Revisit availability changes

Bug: 15838097, Bug: 15973274
Change-Id: Ida060696cb6222c8ced576d86c100c25d94dc5c0
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.java
0f8fc345ea61928265fdd6d461bf1babe353fbe4 02-Jul-2014 Jae Seo <jaeseo@google.com> TvInputManagerService: Suppress warning in dump() and fix typo

Change-Id: I21eaa5592b5f355cc7227e9047ade0869ebe9e9b
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.java
e14c3f4fc42e2dc83cf4aba711c5ff52d8bbe3ea 27-Jun-2014 Jaewan Kim <jaewan@google.com> Implement dump for TvInputManagerService

Bug: 15483593
Change-Id: I821522513fb761418a372c1192f92ccf3acab486
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
226a51958d645a8e2be3e40a6b6daaca558b4913 24-Jun-2014 Jaewan Kim <jaewan@google.com> Update service connections when TV input list is updated

Bug: 15738607
Change-Id: Ie2d24d0c36308e6757b7d6939d79874c3bdd7211
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
80bec97846d56719327e9760a0224fb6f958834f 20-Jun-2014 Ji-Hwan Lee <jihwan@google.com> am 8931c9c9: Register PackageMonitor when system services are ready

* commit '8931c9c9ec392a1f2a7e59a516714f86cf9569aa':
Register PackageMonitor when system services are ready
0ceb7e4755015eafda29c251eac285620788a51b 20-Jun-2014 Ji-Hwan Lee <jihwan@google.com> Register PackageMonitor when system services are ready

Bug: 15767453
Change-Id: I191b20dfa31eee0e37ba7df67cbf906ccbfc0f4e
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
ab981c5653ed7f54247e589437a96b3190b48eb7 19-Jun-2014 Sungsoo Lim <sungsoo@google.com> Make getAvailability() always return true

Bug: 15745402
Change-Id: If40ecef74e5bd7124e0020fcdbcd4637b2d82d97
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
5c80ad2077f3e755413ea47a35f51e9d25dbb083 13-Jun-2014 Jae Seo <jaeseo@google.com> Clean up the EPG data when a TV input package is removed

Also removed an unused parameter from sendSessionTokenToClientLocked().

Bug: 14981342
Change-Id: I5bcf6050386a2bc3e216f44420390c4b78282af4
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
e17b2dd7bcc137bf4d842a779e8d62c63957a978 09-Jun-2014 Ji-Hwan Lee <jihwan@google.com> Set mBound only when bind succeeds

Fixes an issue that TV input is disabled forever after package upgrade,
when it's upgraded while in use. The root cause is as below:

- Package is killed while upgrade.
- Service disconnects, and tries to rebind for reconnecting, but bind fails
because service is not available temporarily. Still ServiceState.mBound is
set to true.
- Should rebind next when callback is registered or new session is created,
but doesn't because ServiceState is already marked bound.

Bug: 14981201
Change-Id: Ia5b0acb33f1247064213024438f114bc40238648
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
7b2ae34b97943a4dfe3fa6b5c1c74f415b468993 03-Jun-2014 Dongwon Kang <dwkang@google.com> Merge "Add onAudioStreamChanged and onClosedCaptionStreamChanged callbacks from TIS to application." into lmp-preview-dev
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/services/core/java/com/android/server/tv/TvInputManagerService.java
6fbe3982b035c200543454bb29b9f3e33b5e347a 03-Jun-2014 Jae Seo <jaeseo@google.com> Merge "TvContract: Address the feedback from the API review" into lmp-preview-dev
5a26f00c846f62e5c5039923d7d6de2ac04c4436 03-Jun-2014 Sungsoo Lim <sungsoo@google.com> Merge "Add ClientState for handling the crash of clients." into lmp-preview-dev
72ad7bf915ce40d8437a4ee2518ae07b73502e12 14-May-2014 Sungsoo Lim <sungsoo@google.com> Add ClientState for handling the crash of clients.

Bug: 15054040
Change-Id: I4dd8d1c350186fe705daa20c9944bc8e4dd556c2
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
e7bb7d6bb2257c24076f5a4b9f536f90a6637f58 27-May-2014 Chulwoo Lee <chulwoo@google.com> Add a way to get the class name of SetupActivity and SettingsActivity

Now, there can be only one SetupActivity and one SettingsActivity for
one TIS apk though one TIS apk can contain several services. Each TIS
need to be able to have its own SetupActivity and SettingsActivity.

BUG: 15177340
Change-Id: I2d944e3ef35c3a981483ba643fd27b15925bab16
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
bd23fa0ba1460a8d5194fd7c700030bf9c3f6fcb 01-Jun-2014 Jae Seo <jaeseo@google.com> TvContract: Address the feedback from the API review

This change addresses the following comments from the council:
- Provider authority should be "android.media.tv"
- Rename COLUMN_DATA to COLUMN_INTERNAL_PROVIDER_DATA and add comment to
indicate data is internal to the provider that inserted it, and should
not be decoded by other apps. It would be nice to restrict read access
to this column, but not essential.
- Hide COLUMN_LOCKED since implementation isn't defined yet, also
questions about how it interacts with Unicorn.
- Fix typo in ORIGINAL_NETWORK documentation.
- All provider MIME types need to be changed to follow platform
conventions: "vnd.android.cursor.dir/channel",
"vnd.android.cursor.dir/program", etc. (Notice singular tense and no
package prefixes since they're part of the platform API.)
- Rename Programs.COLUMN_DATA to COLUMN_INTERNAL_PROVIDER_DATA, along
with docs update, for the same reasons as above.
- Rename COLUMN_DESCRIPTION to COLUMN_SHORT_DESCRIPTION and update docs
to indicate it's a recommended maximum length, not a hard cap.
- COLUMN_GENRE should be split into two columns: COLUMN_BROADCAST_GENRE
(from broadcast standard) and COLUMN_CANONICAL_GENRE (from an Android
standard). Define a subclass with the Android canonical genres, which
are simple strings that are comma-separated when inserted into
COLUMN_CANONICAL_GENRE.

Bug: 15345342
Change-Id: I7f8e70aef617475a59d096fd73a551e7df8a1d3a
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.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/services/core/java/com/android/server/tv/TvInputManagerService.java
832860fb9f6b3a7188a6af2d5d67806593595800 21-May-2014 Youngsang Cho <youngsang@google.com> Add a path for generic event from a session to an application in Tv Input Framework.

Plus, Video size changed event is also added.

Bug: 14126559
Change-Id: I04c553481fbaf8d92adbcc34f3c9d26acc87b361
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
c22dbb69194c8e8fe2a32326d1f37a738cad0904 26-May-2014 Wonsik Kim <wonsik@google.com> Revert "Revert "Add physical TV input handling to TvInputManagerService""

This reverts commit 1940e197a8de186df5edf0b78e0907ae539bd215.

Bug: 14118245, Bug: 15197740
Change-Id: Ia308f16d2ed8ec55112a4d21c180ccb97e8d7c6a
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
f5cd0b388ac31104e014f9193d06080851a09e18 13-May-2014 Jae Seo <jaeseo@google.com> Add more columns to help identify TV channels

Also added the prefix COLUMN_ to clearly denote each column of the
tables for TV metadata.

Change-Id: I426e9854da5580066f39d416207abe56baf4de14
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
2b35a72a69f6fc39d21f7de9e21044d64db1380d 17-Apr-2014 Sungsoo Lim <sungsoo@google.com> Handle the crash of TIS.

- Implement DeathRecipient for SessionState.
- Implement onServiceDisconnected.
- Add callback methods for notifying the death of Session.

Bug: 14073482
Change-Id: Ifdc54266a878224844a221f0b52415d0bc378e39
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
d6672b51c5e07ec376a61057cfbb6bb7491a76b3 30-Apr-2014 Sungsoo Lim <sungsoo@google.com> Replace ComponentName to InputId.

Change-Id: Ia4b5b7fa3f2dfa68629f78981b4ea7f7017d6504
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
f836206818ce338db83a3c23c486fb8cab29cb6d 30-Apr-2014 Youngsang Cho <youngsang@google.com> Explictly release the surface in TV input framework

Change-Id: Id178e8959f9c25d1d5f1ab85d5e8455577570d11
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
6a6059a29edf31e65541b3d8927a46f5846fb0a2 18-Apr-2014 Jae Seo <jaeseo@google.com> Dispatch input events to the TV input

TvInputManagerService now creates an InputChannel pair and passes one
end to the app and the other end to the service. Then the TvInputManager
in the app creates an InputEventSender around one end of the channel to
send events and the service creates an InputEventReceiver around the
other end of the channel to receive events.
Most of the newly added code here was borrowed heavily from the IME.

Change-Id: I0bd83847cba0033ccb6f4b6dad267ebeaf5e9c7c
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
31dc634be3610b062fbcc4afa02607ce8f4125f5 16-Apr-2014 Jae Seo <jaeseo@google.com> Log watched TV programs

Change-Id: Id6ee87dffcf90f10f1619e849126c66ad27464e2
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
6b2c07cb3655b0f98990961e15c2b6077aaad5ca 22-Apr-2014 Youngsang Cho <youngsang@google.com> Merge "Add overlay view in Tv Input Framework"
9a22f0f0a631849d9c622c642d3ab0395f77584b 09-Apr-2014 Youngsang Cho <youngsang@google.com> Add overlay view in Tv Input Framework

A TvInputService app developers sometimes want to draw UI above a surface
playing TV. For this purpose, we add a window in TIS and allow developers to
attach their customized view on the TV surface.

Change-Id: I65c3dffa17580b8d4c42fac58bbfc8dad338c185
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
7de5e234715a3baa8905afa3dd0c5009af64541f 12-Apr-2014 Sungsoo Lim <sungsoo@google.com> Replace sessionStateMap with sessionTokens.

Change-Id: I6ec3390ca31cd17da35f0b0b83b1b09600d7d6d1
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
fd5b72f1ed2ee74a4204eef65f560fc82f0b62fe 15-Apr-2014 Dongwon Kang <dwkang@google.com> Handle the failure of session creation request in TvInputManagerService.

Bug: 14073508
Change-Id: Idc9da323bb0000300faf662c7db031214ae6136c
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
b06cb8870f0407f18bb1225065a93aba2a5de2bf 09-Apr-2014 Jae Seo <jaeseo@google.com> Skip cleaning up TV service/session when the user state is not found

Bug: 13930813
Change-Id: I64285edaca0bd06d6f6efaeb6b5c30c2ef762902
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java
3957091ba8f08c02b5e781098cb955a5f697a1ff 21-Feb-2014 Jae Seo <jaeseo@google.com> Initial round of Television Input Framework

This provides APIs to control and create individual television inputs on
the system which will later be hosted by television applications.

Change-Id: I6866d28e78175a1bff2c32a85c5d77e94d0cd60c
/frameworks/base/services/core/java/com/android/server/tv/TvInputManagerService.java