7823 Commits

Author SHA1 Message Date
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
RoboErik
79fa4630bb API changes to sessions
Changes requested by API Council review. A second CL will refactor
TransportController and TransportPerformer based on feedback.

Change-Id: Ie26a7d01d7021232a66c2edf1eb58120437fdfde
2014-05-29 11:28:48 -07:00
Lajos Molnar
8c5d0f2120 DO NOT MERGE: media.MediaCodec: hide NotificationCallback listener
Bug: 15091403
Change-Id: I1fd178b6872997055c2ee0b7edfa0264a7d6718b
2014-05-28 19:13:17 -07:00
Lajos Molnar
acfcf645ff media.MediaCodec: document and fix-up setNotificationCallback
change from interface to abstrace class

Bug: 15091403
Change-Id: I5093672e36681670934a5ebaa49484441af5bcdd
2014-05-28 19:12:15 -07:00
Yin-Chia Yeh
8298472764 Camera2: Test null TonemapCurve behavior
Add a test to verify we return null TonemapCurve when at least one
channel of tonemap curve is absent.

Bug: 14628001
Change-Id: I3e89dbcf00e5f21b01fc78fe43fe5c4200690357
2014-05-28 15:39:50 -07:00
Eric Laurent
0aa1cbb0de Merge "DO NOT MERGE - AudioManager: audio routing extensions" into lmp-preview-dev 2014-05-28 22:11:20 +00:00
Eric Laurent
0abcc5a0bb DO NOT MERGE - AudioManager: audio routing extensions
Added API and classes allowing framework components
to have direct control over audio routing and volumes.

Change-Id: I28225a6ebad86a7836e1ed749d93c0e964e215f1
2014-05-28 14:41:28 -07:00
Eino-Ville Talvala
b9a65de1f7 Merge changes Ia0f54124,I1e085f5e,Ic0a3ff0a,I141847df,I8ae4efa2 into lmp-preview-dev
* changes:
  camera2: Update native/managed key mappings.
  Camera2: switch API interface to java classses
  Camera2: Use ColorSpaceTransform and RggbChannelVector, replace enum byte[]
  camera2: Add new metadata keys, change types for existing range keys
  Camera2: Replace int[] by MeteringRectangle
2014-05-28 20:33:42 +00:00
Yin-Chia Yeh
8490ace76f Camera2: switch API interface to java classses
android.sensor.info.physicalSize: float[] -> SizeF
android.statistics.hotPixelMap: int[] -> Point[]
android.tonemap.curve[Red|Green|Blue]: float[] -> TonemapCurve

Bug: 14628001
Change-Id: I1e085f5e640a059852fcb504b6dd5f884039e653
2014-05-28 01:36:54 -07:00
Igor Murashkin
78712a8bd7 camera2: Add new metadata keys, change types for existing range keys
Also adds the following keys:
* android.control.maxRegionsAe
* android.control.maxRegionsAwb
* android.control.maxRegionsAf
* android.request.maxNumOutputRaw
* android.request.maxNumOutputProc
* android.request.maxNumOutputProcStalling

Changes the following keys' type
generations:
* android.control.aeTargetFpsRange
* (Range<Integer>)
* android.control.aeAvailableTargetFpsRanges
* (Range<Integer>[])
* android.control.aeCompensationRange
* (Range<Integer>)
* android.lens.focusRange
* (Range<Float>)

Bug: 14628001
Change-Id: I141847dffc4b0d89cea37c19a54d6d5faf24a9bb
2014-05-28 01:36:53 -07:00
Jean-Michel Trivi
1ad0192800 DO NOT MERGE temporary hide of AudioAttributes
Bug 15089989

Change-Id: I6077d4906d5624be4dd2b8a5c3378a04c848b6d8
2014-05-27 12:44:05 -07:00
John Spurlock
8600534df6 VolumeZen: combine ringer/notification volume and zen.
- Implement a new volume panel widget, combining volume and
  zen mode + conditions.
- Show zen mode + conditions when modifying ringer or notification
  streams.
- Host the volume panel widget in a dialog when being controlled
  by the audio service / volume keys.
- Remove support for multiple sliders in the volume panel.
- Remove support for separate ringer + notification volumes
  in the volume panel.
- Move volume panel resources up to SystemUI.
- Create a new combined Notifications quick settings tile.
- Host the volume panel widget in the quick settings panel under
  Notifications.
- When the quick settings detail panel is visible, route the volume
  keys to the embedded widget instead of showing a redundant dialog.
- Create common styles for quick settings text to be closer to spec.
- Update the framework resources for the ringer stream.
- Show the ringer icons in global actions.
- Add "until you turn this off" back as a separate zen condition.
- Disable time condition buttons when they are N/A.
- Don't allow volume changes to set ringer mode silent.

Bug:15186070
Change-Id: Id5e321dd1d5e7c4cf3917027ffbdf7e80d38b00d
2014-05-27 10:08:00 -04:00
Ruben Brunk
0bfa56e766 Merge "camera2: Move DngCreator to hardware/camera2." into lmp-preview-dev 2014-05-24 00:25:59 +00:00
Igor Murashkin
d6d65154e5 camera2: Refactor CameraMetadata.Key out into 3 key classes
Before:
* CameraMetadata.Key<T>

After:
* CameraCharacteristics.Key<T>
* CaptureResult.Key<T>
* CaptureRequest.Key<T>

CameraMetadata#get has been removed (each metadata subclass has
its own #get now) due to java generic limitations (in particular
a type bound <T1<T2> extends Key<T2>> is an illegal bound).

CameraMetadataNative gets a new #dumpToLog function to dump the native
metadata to logcat.

Bug: 15091017
Change-Id: Ic56c54c0d184e209e20de374dc8a6d79527c209f
2014-05-23 11:55:29 -07:00
Ruben Brunk
b6079005ed camera2: Move DngCreator to hardware/camera2.
Bug: 15091253
Change-Id: Ibe2ee376436e5c796e33c0b782ea68278589f2e6
2014-05-22 22:57:11 +00:00
Ruben Brunk
94520c7460 Merge "camera2: Add HAL1 compatibility shim skeleton." 2014-05-22 06:08:56 +00:00
RoboErik
02014c8faa Switch to using int stream instead of AudioAttributes
This is an alternate to the submitted API which doesn't use the new
AudioAttributes class and just takes the AudioManager.STREAM instead.

Change-Id: I0365bc6fb9196fc33852ba6b202ca553efe0cc85
2014-05-21 19:04:08 -07:00
RoboErik
33983a9011 Add stream/volume apis to sessions
This adds RemoteVolumeProviders which handle volume change
events and a way to switch a session between local stream
playback and remote playback handling.

This also adds a way for an app to specify the PendingIntent
to launch when we want to show their ongoing playback UI.

Change-Id: I3a72bf2ec7ca55f61f50859ddc2988eebd491e9d
2014-05-21 17:43:18 -07:00
Ruben Brunk
feb50af361 camera2: Add HAL1 compatibility shim skeleton.
This adds basic support for running the Camera2 API on a device running
a camera HAL version lower than CAMERA_MODULE_API_VERSION_2_0.

This CL includes support for:
- N-way preview output streams
- N-way jpeg output streams
- CameraDevice emulation at the binder interface
- Basic camera metadata querying in the CameraManager

Bug: 15117269
Bug: 15116722

Change-Id: I8322955034c91f34bb348d4b28c2b774dbef38f6
2014-05-21 16:37:59 -07:00
RoboErik
5b53148a4e Merge changes I1cbdff1d,I23906b4c
* changes:
  Handle headsethook voice launching
  Add 5s timeout to wakelock
2014-05-21 19:59:11 +00:00
Glenn Kasten
ed727159d6 Merge "Update android.media.AudioTrack.getTimestamp API documentation" 2014-05-21 18:38:42 +00:00
Jeff Tinker
7e1329f574 Build cast v2 mediadrm signer library as non-static
bug: 13988104
Change-Id: Ie94074dd46e4489c7d4e0f378d1e35b14bb0c0ac
2014-05-21 18:18:03 +00:00
Glenn Kasten
486918b415 Update android.media.AudioTrack.getTimestamp API documentation
Change-Id: I0928c73c147ce843ae46565883da209b278fb3b4
2014-05-21 09:36:41 -07:00
John Spurlock
3346a80208 VolumeZen: SystemUI now hosts the volume dialog.
- Allow SystemUI to set the volume controller interface using
  a new binder call to audio service.
- Remove VolumePanel's dependency on AudioService.
- Host the base VolumePanel in the SystemUI process.

Change-Id: I095d5a1a579d42b68d0f81abb4087bd0c754b876
2014-05-21 09:58:41 -04:00
RoboErik
418c10ca9d Add 5s timeout to wakelock
Also filed a b/15110168 to anr the app if it doesn't finish with the
button event in 5s.

Change-Id: I23906b4c7f17d3d3a29eef92b523d8653c87017e
2014-05-20 14:57:46 -07:00
Eric Laurent
c0e439f1b7 Merge "AudioSystem: add new audio device definitions" 2014-05-20 21:39:23 +00:00