4643 Commits

Author SHA1 Message Date
Jaesung Chung
49371caff0 ExifInterface: handle the invalid offsets and count numbers
Some JPEG images generated by various camera vendors have wrong offsets
and invalid numbers for indicating the size of components. Instead of
throwing exceptions, this CL makes Exifinterface ignore these cases to
read the information without losing contents already parsed.

Bug: 27583378
Change-Id: Ie8ee0bf49283ef519f4f31c5b8ba78ce3f82fe92
2016-03-15 17:26:42 +09:00
Jaesung Chung
89cb194542 Merge "ExifInterface: implement the serialzation for Exif IFD structures" into nyc-dev 2016-03-10 08:35:24 +00:00
Jaesung Chung
86e552b9fa ExifInterface: implement the serialzation for Exif IFD structures
One image can have multiple image file directories, which stores the
attributes of the image, in Exif specification to save metadata.
In the old version, the all attributes from several image file
directories were combined in a one hash map eventually and were served
without distinction of the original IFD group.

In order to keep the original data as much as possible, it loads/saves
the attributes based on the original IFD group internally.

Bug: 26044456, Bug: 11224701
Change-Id: I416e4e79fd47461c9aa83ce13591ed1a5d42f26e
2016-03-10 15:51:41 +09:00
Jaesung Chung
e834dd78d4 Merge "ExifInterface: fix a bug in readExifEntryValue" into nyc-dev 2016-03-10 04:26:52 +00:00
Jeff Sharkey
2478f36428 Merge "Resolve ringtone Uris using Context user." into nyc-dev 2016-03-09 21:59:20 +00:00
Jeff Sharkey
265551de72 Resolve ringtone Uris using Context user.
The Context passed in has already been tied strongly to a specific
user, so resolve Settings based on that user.

Bug: 27568161
Change-Id: I1365c25f97c4177afe592d7c9f410eab777110e7
2016-03-09 14:56:01 -07:00
Jaesung Chung
ad76dc2e62 ExifInterface: fix a bug in readExifEntryValue
The readExifEntry method has raised an unnessary EOFException on reading
an non-ASCII byte array.

Bug: 27484747
Change-Id: I19371e0eed25770929f50b3ca25f249c50113925
2016-03-09 23:21:32 +09:00
Jaesung Chung
bd1dc40a3b Merge "ExifInterface: add RAW input stream support" into nyc-dev 2016-03-09 08:23:06 +00:00
Jaesung Chung
6e08d2b082 ExifInterface: add RAW input stream support
And also the following things are included:

- Remove mInputStream.
- Update javadoc accordingly.

Bug: 11224701
Change-Id: I30b4c29ac800ae396fca8f6b2c2c0f68028a44b3
2016-03-09 17:22:11 +09:00
Sungsoo Lim
df91a67953 MediaBrowser: Copy options before calling subscribeInternal()
If MediaBrowser and MediaBrowserService are on the same process,
the options object could be shared.

Bug: 27398805
Change-Id: I61ce63f667e46229662d85cd6f417b104f9d1388
2016-03-09 16:03:23 +09:00
Zhijun He
924dd55528 Merge "ImageReader/Writer: refactor and cleanup" into nyc-dev 2016-03-09 01:09:34 +00:00
Paul Mclean
70612efe65 Merge "Make native_release() methods in AudioTrack and AudioRecord JNI-callable." into nyc-dev 2016-03-09 00:00:08 +00:00
Jae Seo
e75f77326e Merge "TIF: Drop the requirement for ID tuple for non-broadcast channels" into nyc-dev 2016-03-08 22:49:30 +00:00
Paul McLean
c69ac54111 Make native_release() methods in AudioTrack and AudioRecord JNI-callable.
Change-Id: I31f8946579438021ba8f7ec58bf301a190082063
2016-03-08 15:47:35 -07:00
Dongwon Kang
08713d2a0e Merge "TIF: Unhide TvView.setZOrderMediaOverlay/setZOrderOnTop/tune/unblockContent" into nyc-dev 2016-03-08 22:11:13 +00:00
Zhijun He
0ab416269a ImageReader/Writer: refactor and cleanup
Below changes are included:
* Defer the buffer lock to Image#getPlanes call. This will save quite a bit
CPU cycles associated with lock buffer if the application doesn't really
want to access the data.
* Refactor the code: move some common code to some utility class, and use
one unified consumer (BufferItemConsumer) in ImageReader native implementation.
The code refactoring will also make it easier to support non-opaque image
attach/detach.

Bug: 22356918
Bug: 19962027
Change-Id: I4fb865b0ea3deb6650afc64c32a5906f30e8ccbd
2016-03-08 13:21:36 -08:00
Jae Seo
c0e5873599 TIF: Drop the requirement for ID tuple for non-broadcast channels
This has been causing some confusion among streaming-based channel app
developers without having any clear benefit, hence drop the requirement.

Bug: 27536480
Change-Id: I51be65ccc402171a0ce34ae4640905ec48d39e37
2016-03-08 11:41:29 -08:00
Dongwon Kang
e12d810e99 TIF: Unhide TvView.setZOrderMediaOverlay/setZOrderOnTop/tune/unblockContent
Bug: 25726685
Change-Id: If96d0b086488c931d20315ee1c29cf7374715d93
2016-03-08 10:53:09 -08:00
Jean-Michel Trivi
84dee4f16c Merge "Rename AudioRecordConfiguration to AudioRecordingConfiguration" into nyc-dev 2016-03-08 16:46:58 +00:00
Jae Seo
6256e27c1b TIF: Add more comments for TvInputInfo/TvTrackInfo
- Documented what TvInputInfo.getTunerCount returns if the input is not
  of TYPE_TUNER.
- Documented what all getters/setters in TvTrackInfo throw if not called
  on proper types.

Bug: 27531254
Change-Id: I32d83ce888507ec29cda8dce74871a3d55783766
2016-03-07 20:09:43 -08:00
Sungsoo Lim
e10739ab8b Merge "MediaBrowser: Copy options before using it in subscribe()" into nyc-dev 2016-03-08 01:46:13 +00:00
Jean-Michel Trivi
598c0c9f65 Rename AudioRecordConfiguration to AudioRecordingConfiguration
In package android.media:
- rename AudioRecordConfiguration to
   AudioRecordingConfiguration to avoid ambiguity with the
   android.media.AudioRecord class
- rename AudioManager.getActiveRecordConfigurations() to
   getActiveRecordingConfigurations.

Bug 27385560

Change-Id: I5ef404ff36522193990c9b563d4545893529b365
2016-03-07 16:05:51 -08:00
Jean-Michel Trivi
310355d28e Merge "Revert "Rename AudioRecordConfiguration to AudioRecordingConfiguration"" into nyc-dev 2016-03-07 19:59:42 +00:00
Jean-Michel Trivi
431ec6cdb9 Revert "Rename AudioRecordConfiguration to AudioRecordingConfiguration"
This reverts commit 99278e1c724e01b792dd27031bc579e7d738edc1.

Change-Id: Ifcb3f17a26df8171cbc21dac093477b98a1333db
2016-03-07 19:59:21 +00:00
Jean-Michel Trivi
46f5429768 Merge "Rename AudioRecordConfiguration to AudioRecordingConfiguration" into nyc-dev 2016-03-07 19:29:04 +00:00
Jeff Tinker
b849eeab26 Merge "Add error code to MediaCodec.CryptoException" into nyc-dev 2016-03-07 18:18:10 +00:00
Insun Kang
bf8ff76fee Merge "Fix wrong metadata conversion in MediaSessionLegacyHelper" into nyc-dev 2016-03-07 06:31:22 +00:00
Jeff Sharkey
0f905b3db2 Merge "Set default ringtones through RingtoneManager." into nyc-dev 2016-03-06 00:50:20 +00:00
Jeff Sharkey
9dd3b2162d Set default ringtones through RingtoneManager.
RingtoneManager is the public API that everyone should be going
through, and it now has the side-effect of caching the set ringtone
to make it available before CE storage is unlocked.

Bug: 27435331
Change-Id: I30ed4e2df2ef1e4fd47f947c70845aaa74356384
2016-03-05 17:43:22 -07:00
Jeff Sharkey
b94f2df289 Merge "Ask RingtonePlayer to open data for caching." into nyc-dev 2016-03-06 00:29:01 +00:00
Jeff Sharkey
783ee0ca87 Ask RingtonePlayer to open data for caching.
When setting default ringtones, RingtoneManager now caches the
selected media for playback before the device is unlocked.  However,
this API hasn't historically required the caller to hold storage
permissions.

To keep this working, we attempt to delegate ringtone access over
through RingtonePlayer, which is what we do for playback.  However,
because we're caching the real ringtone bits now, we need to be much
more careful about the PFDs we're willing to return.  This change
requires that they be in external storage, and that they have the
ringtone/alarm/notification bit set.

Bug: 27366059
Change-Id: I59c2adc1d1250a3eac281f190f35a7cb3119967b
2016-03-05 17:23:32 -07:00
Jeff Sharkey
d6de3abed9 Merge "Add AssetFileDescriptor to MediaExtractor." into nyc-dev 2016-03-05 23:09:25 +00:00
Jeff Sharkey
a3c1c2297d Add AssetFileDescriptor to MediaExtractor.
Mirrors API on MediaPlayer.

Bug: 27506874
Change-Id: Ibc07cf8151c362ff7375b89e7a9044bef1d9e94d
2016-03-05 16:07:46 -07:00
Jeff Tinker
d393216f8a Add error code to MediaCodec.CryptoException
Added a code to represent unsupported operations

bug: 25929554
Change-Id: Id8bfa092f29de073db19c4d7444f89249ea2cdd5
2016-03-05 11:53:23 -08:00
Jean-Michel Trivi
b74926232e Merge "API changes for audio recording notifications" into nyc-dev 2016-03-04 22:49:31 +00:00
Sungsoo Lim
97243a8ff2 MediaBorwserService: Update javadoc
Bug: 26733259
Change-Id: I7240149c0cbbacf221e466908e6ebc201d603c5f
2016-03-04 14:47:23 +09:00
Wei Jia
ebdc198e2f Merge "MediaPlayer: use local variable to check member is null." into nyc-dev 2016-03-03 21:03:24 +00:00
Wei Jia
a2239b78f8 MediaPlayer: use local variable to check member is null.
Bug: 26961341
Change-Id: I343b18f4bfaba9b119a6721e1b39415474149d75
2016-03-03 10:02:19 -08:00
Lajos Molnar
4ab9756906 Merge "media: Add track ID format key" into nyc-dev 2016-03-03 16:14:26 +00:00
Lajos Molnar
6ef0ac3278 media: Add track ID format key
Bug: 25684127
Change-Id: I574515c3c144f5cabe4f40d934d062de1dd20851
2016-03-03 16:12:52 +00:00
Jean-Michel Trivi
99278e1c72 Rename AudioRecordConfiguration to AudioRecordingConfiguration
In package android.media: rename AudioRecordConfiguration to
   AudioRecordingConfiguration to avoid ambiguity with the
   android.media.AudioRecord class

Bug 27385560

Change-Id: Ia633ac30cbe151b8f0f903dc96a459a56737ace2
2016-03-02 14:43:41 -08:00
Jean-Michel Trivi
28ff76b455 API changes for audio recording notifications
Make AudioRecordConfiguration final since it is parcelable.
In AudioRecordingCallback, pass the array of active recording
  configurations.
Add @IntDef for return values for
  AudioRecordConfiguration.getClientAudioSource()

Bug 27385560

Change-Id: I01193577f50e50496742d888b45f89a2c3b67904
2016-03-02 14:40:03 -08:00
Insun Kang
c9763d766c Fix wrong metadata conversion in MediaSessionLegacyHelper
Bug: 27447464
Change-Id: I4d2ec5b3fe480636dcc76b1f3a4f0b1a110defae
2016-03-02 23:30:53 +09:00
Sungsoo Lim
64f16f1dc1 MediaBrowserService: Make SubscriptionCallback.onError be called
Bug: 26733259
Change-Id: I8324e1c56e87071e781550ac0701e632a4122e73
2016-03-02 14:08:18 +09:00
Jeff Sharkey
60b7bcc614 Merge "When system server goes down, crash apps more." into nyc-dev 2016-03-02 02:42:16 +00:00
Jeff Sharkey
c53962d4ed When system server goes down, crash apps more.
Apps making calls into the system server may end up persisting
internal state or making security decisions based on the perceived
success or failure of a call, or the default values returned.

The reality is that if the system process just died, init will be
along shortly to kill all running apps, so we should have no problem
rethrowing the RemoteException as a RuntimeException.

Bug: 27364859
Change-Id: Ife0bcb079636c88d54c44d17eb580409fd79028b
2016-03-01 19:29:16 -07:00
Insun Kang
542221d68a Merge "Annotate Media section of framework/base" into nyc-dev 2016-03-02 01:36:10 +00:00
Dongwon Kang
9cd89a403e Merge "TIF: Address API review comments" into nyc-dev 2016-03-01 22:11:47 +00:00
Phil Burk
88353459e2 Merge "AudioTrack: docs for getUnderrunCount()" into nyc-dev 2016-03-01 19:13:39 +00:00
Dongwon Kang
b55c7517ba TIF: Address API review comments
Bug: 27386052
Change-Id: I242819e0817723e247b8fe646d534899ab50af76
2016-03-01 10:03:58 -08:00