7848 Commits

Author SHA1 Message Date
RoboErik
a3d8188556 Merge "Adds listeners for changes to the list of active sessions" into lmp-preview-dev 2014-06-09 19:07:49 +00:00
RoboErik
55f6ab4c81 Merge "b/15388389 Add volume handling support to MediaRouter" into lmp-preview-dev 2014-06-09 19:07:34 +00:00
RoboErik
20685929a4 Merge "Add a way to get the package/pid of the session" into lmp-preview-dev 2014-06-09 19:07:20 +00:00
Jae Seo
085eefd184 Merge "Fix a typo in TvContract" into lmp-preview-dev 2014-06-09 18:43:27 +00:00
Jae Seo
182dc33e9e Merge "TIF: Address the feedback from the API review - 3/3" into lmp-preview-dev 2014-06-09 18:38:43 +00:00
Jae Seo
f30ea53306 Fix a typo in TvContract
Assigned a new value to TYPE_ATSC_M_H so that it differs from TYPE_ATSC_C.

Change-Id: I65494fdf625a3b4840c9e8cfa4b728214d63e6df
2014-06-09 17:50:07 +00:00
Wonsik Kim
55f933f715 Merge "Make TvInputs aware of whether it's hardware-based or not" into lmp-preview-dev 2014-06-09 06:07:21 +00:00
RoboErik
fb442b0384 Add a way to get the package/pid of the session
We need a package/pid to connect a session to a notification. This
adds a way to get those from the controller of a session.

Change-Id: I7700a341beebd46116dfb7dc82f1a667c718e728
2014-06-08 13:20:43 -07:00
RoboErik
2e7a9167ae Adds listeners for changes to the list of active sessions
The listeners get notified when sessions are added, removed, or
reprioritized.

Change-Id: I7f3bfc84049719c3b9c19016c6bac92e1a5c3179
2014-06-08 12:21:32 -07:00
RoboErik
5d3114b64a b/15388389 Add volume handling support to MediaRouter
This makes MediaRouter work with sessions to handle volume
requests. Should work with all existing custom volume handling.

Change-Id: I5dfde26a6203a1072b7fc700978b4ca852ebe7d0
2014-06-08 12:18:25 -07:00
Jae Seo
1bfce9fb9b 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
2014-06-08 21:42:39 +09:00
Dongwon Kang
336cdf20dd Make TvView keep the volume value and set later once the connecation is made.
Bug: 15483740
Change-Id: Id4272bffb556587707b641ec8296bc5a9e57807e
2014-06-08 18:20:55 +09:00
Wonsik Kim
af743eeaec Make TvInputs aware of whether it's hardware-based or not
Bug: 15326724
Change-Id: I1f418150ba29ee50afc50a811198115fdc6f9c42
2014-06-07 13:36:19 +09:00
Igor Murashkin
2f98a26bbf Merge "util: Make Rational a Number/Comparable; add Range#inRange" into lmp-preview-dev 2014-06-07 00:35:36 +00:00
Igor Murashkin
007bfb14d2 util: Make Rational a Number/Comparable; add Range#inRange
* Also changes Rational to reduce the numerator/denominator by
its greatest common divisor at construction time (e.g. (2/4 -> 1/2)).

Bug: 15432042
Change-Id: Ib827abccf44a040667e5931cf9442afc86b57e2d
2014-06-06 16:38:09 -07:00
Dongwon Kang
7012db741c Merge "TIF: Address the feedback from the API review - 2/3" into lmp-preview-dev 2014-06-06 06:59:17 +00:00
Dongwon Kang
2750d21d8b Merge "TIF: Address the feedback from the API review - 1/3" into lmp-preview-dev 2014-06-06 06:58:02 +00:00
Jae Seo
b8a64416e5 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
2014-06-06 09:13:28 +09:00
Ji-Hwan Lee
cc15afbe12 Merge "TvContract: Add channel logo and program thumbnail" into lmp-preview-dev 2014-06-05 22:12:08 +00:00
Alan Viverette
4586b0da63 Merge "Add defaults for caption colors and edge type" into lmp-preview-dev 2014-06-05 20:37:22 +00:00
Ji-Hwan Lee
4c1959cc45 TvContract: Add channel logo and program thumbnail
Channel logo is exposed via its own content URI,
"content://android.media.tv/channel/#/logo".

Program thumbnail is added as an URI column in existing program table.

Change-Id: I8dd636bbea9d3fa991ad42ccc03a198e8c1d051d
2014-06-06 05:12:12 +09:00
Eric Laurent
a335e14b6b Merge "remove debug log in AudioPortEventHandler." into lmp-preview-dev 2014-06-05 15:18:35 +00:00
Jae Seo
782f734547 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
2014-06-05 19:22:18 +09:00
Eric Laurent
e94379beba remove debug log in AudioPortEventHandler.
Bug: 14815883.
Change-Id: Ib5076fcfe8a36d1dd772b072fdf3400e57acc61c
2014-06-04 20:09:13 -07:00
Alan Viverette
e88aee8ad8 Add defaults for caption colors and edge type
BUG: 8151470
Change-Id: I4d7b75bf647aeded77b4000cdcd37e9ace46a374
2014-06-04 18:35:42 -07:00
Eric Laurent
8da213917e Merge "AudioManager: fix AudioPort gain query" into lmp-preview-dev 2014-06-04 00:27:50 +00:00
Dongwon Kang
7b2ae34b97 Merge "Add onAudioStreamChanged and onClosedCaptionStreamChanged callbacks from TIS to application." into lmp-preview-dev 2014-06-03 02:31:28 +00:00
Eric Laurent
b4e0909fc4 AudioManager: fix AudioPort gain query
Fix bug causing AudioPort.gain(int) to always return null.

Also removed debug log from AudioManager.

Bug: 14815883.
Change-Id: Ie65bab233ec8b4d974061e11ec5b8f0de18275d9
2014-06-02 19:22:48 -07:00
Dongwon Kang
a3be12a236 Add onAudioStreamChanged and onClosedCaptionStreamChanged callbacks from TIS to application.
Bug: 14628404
Change-Id: I40abf647e9d608c2c793d007fd2fe0d511535bdd
2014-06-03 09:53:05 +09:00
Jae Seo
6fbe3982b0 Merge "TvContract: Address the feedback from the API review" into lmp-preview-dev 2014-06-03 00:26:05 +00:00
Chulwoo Lee
e7bb7d6bb2 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
2014-06-03 08:56:35 +09:00
Jae Seo
bd23fa0ba1 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
2014-06-02 16:44:37 -07:00
Jae Seo
d5cc4a281e Put TV Input Framework under android.media.tv, including TvContract
Bug: 15345342
Change-Id: I665ca23f0f074ce29cb2e047109b209178532107
2014-06-02 11:02:52 -07:00
RoboErik
e78755e180 Merge "Minimum work to make volume handling work with sessions" into lmp-preview-dev 2014-06-02 17:10:07 +00:00
Eric Laurent
ddc93ce343 AudioManager: do not mandate a looper
Having a listener for audio port updates is not mandatory.
do not throw an excepion when AudioManager is contructed
from a thread without looper.

Bug: 15368707.
Change-Id: If5ce54bf4efdff8b785098649fa1cd0564861e1e
2014-06-02 09:16:02 -07:00
John Spurlock
a11b4affca VolumeZen: Prevent raising ringer volume in silent mode.
Instead of breaking out of silent mode when raising the volume
using the keys, prevent the change and display a visual hint up
in the user interface.

Bug:15330217
Change-Id: I74aae44319aadcd6db9841c7799967607f5a1617
2014-06-01 11:52:23 -04:00
Eric Laurent
54b5e5bdf6 Merge "AudioManager: add audio port gain control" into lmp-preview-dev 2014-05-31 00:49:58 +00:00
Eric Laurent
8725859ee3 Merge "audio routing update listener" into lmp-preview-dev 2014-05-31 00:49:44 +00:00
Eric Laurent
a89eb2d8e5 Merge "AudioSystem: added JNI for routing extensions" into lmp-preview-dev 2014-05-31 00:49:27 +00:00
Eric Laurent
3a24199a0f AudioManager: add audio port gain control
Implement AudioManager.setAudioPortGain() API.

Bug: 14815883.

Change-Id: Ib54bd1fd1392c474f4767a00228b0a617c51ec5e
2014-05-30 17:13:10 -07:00
Eric Laurent
700e73471d audio routing update listener
Implement audio port and audio patch
callback infrastructure for clients to receive
notifications when audio routing changes occur via the
OnAudioPortUpdateListener interface.

Bug: 14815883.

Change-Id: I32cbba64eca7369871aec235ff100de1f0c2d344
2014-05-30 17:13:10 -07:00
Eric Laurent
b69681c894 AudioSystem: added JNI for routing extensions
Bug: 14815883.

Change-Id: Ia0c0d14a8e3051a4bc0ce502b6e979135b170c97
2014-05-30 17:12:48 -07:00
Jeff Tinker
948d08dcdd Merge "Fix name error in com.android.mediadrm.signer.xml" into lmp-preview-dev 2014-05-31 00:02:59 +00:00
Lajos Molnar
a6716aade1 Merge changes I1fd178b6,I5093672e into lmp-preview-dev
* changes:
  DO NOT MERGE: media.MediaCodec: hide NotificationCallback listener
  media.MediaCodec: document and fix-up setNotificationCallback
2014-05-30 23:14:55 +00:00
RoboErik
b69ffd4dc2 Minimum work to make volume handling work with sessions
This is the minimum change to make adjusting volume work with
MediaSessions. This only affects adjusting the volume and adjusting
the volume with a suggested stream. Adjusting a specific stream or
setting a specific stream will still use the same code.

This does not fix existing remote volume handling in RCC, which
will require a separate change to MediaController.

Change-Id: I5b957ff4bece1ee11e2364e1f216e1c08343c983
2014-05-30 15:47:58 -07:00
RoboErik
283c907a6a Merge changes I16ad392e,Ie26a7d01 into lmp-preview-dev
* changes:
  Refactor transport controls APIs
  API changes to sessions
2014-05-30 22:18:54 +00:00
Igor Murashkin
5743868e15 camera2: Change android.lens.focusRange to Pair<Float,Float>
Since the focus range is defined in diopters (1/distance), it just so
happens that in a range [near, far] near >= far which is against the
android.util.Range contract.

Change it to pair instead.

Also adds a marshaler for Pairs since they didn't have one before
(and aren't parcelable).

Bug: 15335269
Change-Id: If2f3259aeec072438a1c18c1b9728a4c81e92a40
2014-05-30 11:28:49 -07:00
RoboErik
c47fa84b0a Refactor transport controls APIs
This merges TransportPerformer into MediaSession + a
TransportControlsCallback and makes TransportController into an
inner class on MediaController called TransportControls. Also makes
the PlaybackState and Metadata part of the session APIs instead of
transport controls.

Change-Id: I16ad392e6d318abe3119ad5d89656d253af25e16
2014-05-30 10:35:44 -07:00
Jeff Tinker
d6315a35bf Fix name error in com.android.mediadrm.signer.xml
Change-Id: I33811345d9e01180b736c6d90a43f58fcb45768a
related-to: 15341137
2014-05-30 08:27:33 -07:00
Yin-Chia Yeh
789de110c7 Merge "Camera2: Test null TonemapCurve behavior" into lmp-preview-dev 2014-05-29 18:42:15 +00:00