5541 Commits

Author SHA1 Message Date
Andre Lago
bb1337bff4 [Ringtone] Return title "None" if Uri is null
Prevent apps reading the title of null ringtones from getting "Unknown
ringtone" as the title for a silent ringtone

Bug: 31084929
Change-Id: Ie9f84bd279633f065722dbde1fbd66289eaca07b
2016-08-25 16:27:17 +00:00
Sungsoo
77a7787cab ExifInterface: Make saveAttributes throw an exception before change am: a8f9a075b1
am: 6dfc7abaf9

Change-Id: Iecc3f1dcffd540f005312e8a301335ea02cd89b9
2016-08-24 02:31:14 +00:00
Sungsoo
a8f9a075b1 ExifInterface: Make saveAttributes throw an exception before change
ExifInterface object can be created with a unsupported file format.
If saveAttribute is called with an unsupported file format, ExifInterface
makes the file corrupted. This CL prevents those cases by throwing
an exception before making any change on the file.

Bug: 30936376
Change-Id: I115a42601c774062485974042464abb0d65c35e9
2016-08-23 15:22:45 +09:00
André Lago
13a5df3b31 Merge changes from topic 'Different sound settings for work profile'
* changes:
  [media] Separate ringtones for managed profiles
  [Settings] Added setting SYNC_PARENT_SOUNDS
2016-08-19 17:02:05 +00:00
Hyundo Moon
fc1df068ab Merge "MediaRouter: Make sStatic.mResources store application resources." 2016-08-19 09:07:00 +00:00
Jin Seok Park
9dcaad655e Merge "ExifInterface: Refactor custom input stream class" 2016-08-19 08:39:41 +00:00
Jin Park
0c1640aeb4 ExifInterface: Refactor custom input stream class
ExifInterface uses a class named ByteOrderAwarenessDataInputStream
to handle LITTLE_ENDIAN byte-ordered data. This class can only be
initialized with a byte array, which is inefficient for large RAW
files. This CL adds support for initializing with an input stream.

Bug: 30749097
Change-Id: I4e95fb2157115c571ed24ec3746a3c6db752bbdc
2016-08-19 15:47:28 +09:00
Hyundo Moon
eadd6d2329 MediaRouter: Make sStatic.mResources store application resources.
Previously it stored system resources, and that caused
Resources.NotFoundException in following methods:
 - RouteInfo.getName()
 - RouteCategory.getName()
 - UserRouteInfo.setIconResource(int)
 - RouteGroup.setIconResource(int)
Also, this CL makes getName()/setName() methods work properly.

Bug: 30797944
Test: run a simple app that calls above methods.
Change-Id: Ia5db57c3d7b71c91dcfeea0584867ee2d846fef9
2016-08-19 15:07:33 +09:00
Andre Lago
3fa139c7b2 [media] Separate ringtones for managed profiles
Separate the default system ringtone settings for managed profiles,
which previously used the same default ringtones as the personal profile
they belong to

Bug: 30658854
Change-Id: I22c69c7b8d31c7c424f5e00a3d9febac98b93d74
2016-08-18 09:58:26 +01:00
Jin Park
cabb85ca4b ExifInterface: Update Pixel X/Y Dimension tag values
Current code checks Pixel X/Y Dimension tags when updating primary
image size values. This creates a problem when the image data are not
placed properly (IFD_TYPE_PRIMARY may need to be swapped with
IFD_TYPE_PREVIEW). This CL moves the updating code to after the
images have been properly placed.

Bug: 29409358
Change-Id: Ia70b5b292812c1e7812e9fc8ca2434998cf1b7f9
2016-08-18 11:52:08 +09:00
Glenn Kasten
d21cb15584 resolve merge conflicts of c76a3ac to stage-aosp-master am: 67ffd5e617
am: f7b4fd24e3

Change-Id: Ib06db403955ae0056c1fee0e09f9249d0b887ea1
2016-08-17 21:10:59 +00:00
Glenn Kasten
f7b4fd24e3 resolve merge conflicts of c76a3ac to stage-aosp-master
am: 67ffd5e617

Change-Id: Ib2d89672efe8757edff320d5ed800b7b0293323b
2016-08-17 21:07:54 +00:00
Glenn Kasten
67ffd5e617 resolve merge conflicts of c76a3ac to stage-aosp-master
Change-Id: Ifff16bdc42e8326f3f60cf4b92688c445cb4db25
2016-08-17 13:28:04 -07:00
Glenn Kasten
dedb2fd507 Define low latency output stream (formerly primary) am: 2ed8f215f1
am: caea5a683b

Change-Id: I459a9fb99c11cb252232b7192355564d43397f04
2016-08-17 18:25:32 +00:00
Glenn Kasten
caea5a683b Define low latency output stream (formerly primary)
am: 2ed8f215f1

Change-Id: Iaa5978b477d925fe2bacfd31f206dd3380a42f68
2016-08-17 17:35:16 +00:00
Glenn Kasten
1fda533936 Squashed commit of the following:
commit efa6f355b06675aa4d0879fd279e22c16d5c046c
Author: Mikhail Naganov <mnaganov@google.com>
Date:   Wed Aug 10 12:25:13 2016 -0700

    MIDI: Use server-side socket in blocking mode for virtual devices

    Since virtual MIDI servers may misbehave, blocking mode will throttle
    them if clients are not coping with their sending speed.

    Bug: 29413812
    Change-Id: I9c4a2a7a7ea3ea060c93fedc7d0f033427c557c9

commit 755dfb5f83749d3963c63d98d692307f8271c804
Author: Mikhail Naganov <mnaganov@google.com>
Date:   Fri Jul 8 13:26:19 2016 -0700

    Protect MIDI framework against client blocks in MidiReceiver.onSend

    Make the server-side socket non-blocking when creating MidiOutputPort
    for clients. Thus if a client ceases to read from its side of the
    socket pair, the server will just fail to write instead of blocking.

    One drawback is that the MidiOutputPort on the client can't indicate
    that it has become dysfunctional, but it's not possible without
    changing the API.

    Bug: 29413812
    Change-Id: I9dfcbdd214a815cea8fd1365324fd78ca459268a

commit c740b13953761f58233ac651a0b5227733b1bdcc
Author: Mikhail Naganov <mnaganov@google.com>
Date:   Fri Jun 17 04:11:25 2016 -0700

    UsbMidiDevice: Clean up terminology and fix comments

    When working with physical MIDI devices, an *input* stream is used
    for reading from *output* port of the device, and vice versa. Thus,
    using "input" and "output" without specifying whether it's a stream
    or a port is confusing.

    Clarify names of counter variables, and fix a couple of comments
    that were incorrect due to this confusion. No functional changes.

    Change-Id: If561eaca4bade94e9296d2c703c9fcebc91296e2

commit 4269c6417287737624f6165a8bbeb5aa427de9a0
Author: Glenn Kasten <gkasten@google.com>
Date:   Thu May 5 18:49:16 2016 -0700

    Update MIDI package summary

    Bug: 28625060
    Change-Id: If552ca8e1a0666d402b5f536699bf3fb09c1e324

commit 862d40b73168bde7d0be5280d997985c18061014
Author: Phil Burk <philburk@google.com>
Date:   Tue Apr 19 15:56:24 2016 -0700

    MidiDevice: do not open ports on closed device

    Fix involves client side mIsDeviceClosed flag.

    Bug: 24949216
    Change-Id: I666284a787fbb9a710d2372fb424e8e54f6a2825
    Signed-off-by: Phil Burk <philburk@google.com>

commit 6f1de358b9f2616e03f4655f01454770915ddd66
Author: Phil Burk <philburk@google.com>
Date:   Mon Apr 18 16:05:28 2016 -0700

    MidiService: fix resource leak

    The proxy object was being used to match when adding or removing objects.
    But they are different each time. So now we use an asBinder() object.

    Bug: 28153736
    Change-Id: I1bccebf1e9464668db757ff08b41902d0cf0e3a7
    Signed-off-by: Phil Burk <philburk@google.com>

commit f7386bd535bb8a1d7f8df8f44a1748ab770c991a
Author: Phil Burk <philburk@google.com>
Date:   Tue Apr 5 14:19:53 2016 -0700

    MidiDevice: fix connectPorts for same Process

    If connectPorts() was called for a device in the same process then
    the connection would die when the ParcelFileDescriptor was closed.

    Bug: 26406775
    Change-Id: Id0538452593b4761ac2a93d366ade76d2e35ce73
    Signed-off-by: Phil Burk <philburk@google.com>

Change-Id: I4dfc2a2cbaf04bf1a790ae2cb39bf74fb5bb16ac
2016-08-17 08:45:39 -07:00
Glenn Kasten
46db227b84 Merge "Define low latency output stream (formerly primary)" into nyc-mr1-dev 2016-08-16 22:51:58 +00:00
Jin Seok Park
9a03dd10c1 Merge "ExifInterface: Refactor IFD type variables" 2016-08-12 01:44:27 +00:00
Mikhail Naganov
9652f0a3b4 Merge "MIDI: Use server-side socket in blocking mode for virtual devices" 2016-08-11 15:29:54 +00:00
Jin Park
d0e63a841a ExifInterface: Refactor IFD type variables
ExifInterface uses an ambiguous term called "hint" to indicate the
type of IFD that needs to be parsed. This CL substitutes the use of
such term with IfdType class.

Bug: 30749097
Change-Id: Id97d09882f37818978b773d55846707915efeb49
2016-08-11 10:37:35 +09:00
Jin Seok Park
c900c660bb Merge "ExifInterface: Remove JNI code" 2016-08-11 00:20:11 +00:00
Mikhail Naganov
7ea3e54b72 MIDI: Use server-side socket in blocking mode for virtual devices
Since virtual MIDI servers may misbehave, blocking mode will throttle
them if clients are not coping with their sending speed.

Bug: 29413812
Change-Id: I9c4a2a7a7ea3ea060c93fedc7d0f033427c557c9
2016-08-10 14:47:59 -07:00
Jin Park
0dd9e9cac8 ExifInterface: Remove JNI code
This CL finalizes porting piex into ExifInterface by removing JNI
methods and class as well as methods handling data received from
JNI method calls.

Bug: 29409358
Change-Id: I8f6c761e50cb29476dc0784f58908ec35e3c70e9
2016-08-10 11:49:20 +09:00
Jin Park
2574920992 ExifInterface: Add support for DNG thumbnail cases
DNG files have a unique way of identifying their image compression
type. This CL addresses this issue by adding support for cases
mentioned in the DNG Specifications.

Bug: 30727870
Change-Id: I416b9fb49872e9c878193f346dcaad5f45b0b995
2016-08-10 11:44:00 +09:00
Jin Seok Park
3d6fcede38 Merge "ExifInterface: Remove AssetInputStream dependency" 2016-08-10 02:35:53 +00:00
Jin Park
baad7d84f4 ExifInterface: Remove AssetInputStream dependency
ExifInterface calls native method to retrieve thumbnail data from an
AssetInputStream data. This CL removes that dependecy.

Bug: 29409358
Change-Id: I890b0e813733a5dcaa5480ee48e68c63fc079114
2016-08-10 10:04:07 +09:00
Jin Seok Park
7ca3862c54 Merge "ExifInterface: Fix function for image size update" 2016-08-10 01:00:48 +00:00
Jin Park
e6e4e8d7a5 ExifInterface: Fix function for image size update
Existing code assumes that the primary image data is correctly placed.
Since this may be a mistaken assumption, this CL checks the
NewSubfilType value and updates the image size values only if the
tag value equals the original resolution image.

Bug: 29409358
Change-Id: I51cffba870ee29d76118b4c8b72290d1010c6462
2016-08-09 13:18:22 +09:00
Glenn Kasten
c3de514438 Define low latency output stream (formerly primary)
Bug: 29164107
Change-Id: Ic31ee9bc85f39026918f9a7b7f379454d99b0009
2016-08-08 16:14:24 +00:00
Jin Seok Park
54e43b23e1 Merge "ExifInterface: Process uncompressed thumbnail" 2016-08-08 00:53:10 +00:00
Jin Park
043785660c ExifInterface: Process uncompressed thumbnail
An uncompressed thumbnail may use 24-bit RGB format to store image
data. This CL handles uncompressed thumbnail images and creates a
bitmap object by using the given byte data.

Bug: 28156704
Change-Id: Ie650de4398004dfa74519817e417c7002d4fbdbb
2016-08-04 15:11:49 +09:00
Hyundo Moon
686bcc524a Merge "MediaBrowser: Supplement JavaDoc of MediaItem.getMediaId()" 2016-08-03 02:49:25 +00:00
Hyundo Moon
1574838142 MediaBrowser: Supplement JavaDoc of MediaItem.getMediaId()
This CL adds link to MediaMetadata.METADATA_KEY_MEDIA_ID
into the JavaDoc of MediaItem.getMediaId() to help developers
easily find what the MediaId is.

Bug: 28790407
Change-Id: Icdcc98ffe59e1480df9ac85fe22b710ecd9d14de
2016-08-03 10:53:45 +09:00
Sungsoo Lim
ba11085635 MediaSession: Add methods for setting shuffle and repeat modes
Bug: 27317954
Change-Id: Ie83b25f40dd84e5b521a186077f23d343314201a
2016-08-02 16:09:54 +09:00
Jin Park
b3108a0757 ExifInterface: Add support for multiple RAW test files
ARW, CR2, NEF, NRW, SRW have slight modifications to the data
structures described in TIFF Specifications. This CL handles these
modifications.

Bug: 29409358
Change-Id: I10c6b17a25d237b71d311705dfd80f7be783cd1d
2016-08-01 23:13:43 +09:00
TreeHugger Robot
b966d62443 Merge "Specify primary mime type for each format code." 2016-07-27 01:54:37 +00:00
Jean-Michel Trivi
dcd6cf68e4 Change AudioRecordingConfiguration constructor parameter order am: 74eb6f62f8
am: 5145713e75

Change-Id: I38a6a836b536e3f191d2a8845d142204d3a92fc6
2016-07-27 01:33:13 +00:00
Jin Seok Park
e457868e27 Merge "ExifInterface: Add PEF, RW2 files parse support" 2016-07-27 01:29:45 +00:00
Jean-Michel Trivi
5145713e75 Change AudioRecordingConfiguration constructor parameter order
am: 74eb6f62f8

Change-Id: Ief48fc6b7b7f04d00ca11858b8b248cb449b2aab
2016-07-27 01:17:29 +00:00
Jean-Michel Trivi
74eb6f62f8 Change AudioRecordingConfiguration constructor parameter order
Switch the device and client AudioFormat parameters in the
  AudioRecordingConfiguration constructor, so it's the same
  order as the rest of the code involved in sending a callback
  when the recording configuration changes.

Bug 30282058

Change-Id: Iea417f02dcb644e3d4dacbc0e44ea4b2eac28840
2016-07-26 14:00:44 -07:00
Marco Nelissen
e116bcf72a Merge \\\\"Fix memory leak in MediaScannerConnection\\\\" am: e40ab18590 am: 0d5bcda101 am: fd743b4d56
am: c737306bf9

Change-Id: I6ac82941cb1d5facab286d3ece9966908f6996a9
2016-07-26 16:03:52 +00:00
xiaoli.xb.zuo
c737306bf9 Merge \\\"Fix memory leak in MediaScannerConnection\\\" am: e40ab18590 am: 0d5bcda101
am: fd743b4d56

Change-Id: I9a8ef3f3ae06b5054f426e7936c5aa9548a9dfcd
2016-07-26 15:55:13 +00:00
Marco Nelissen
fd743b4d56 Merge \\"Fix memory leak in MediaScannerConnection\\" am: e40ab18590
am: 0d5bcda101

Change-Id: I5714252c0373db0fc85bf65df7b52c983fbc6171
2016-07-26 15:48:05 +00:00
xiaoli.xb.zuo
0d5bcda101 Merge \"Fix memory leak in MediaScannerConnection\"
am: e40ab18590

Change-Id: I894584a5d193624acc78c20a6207b54b20b61563
2016-07-26 15:43:55 +00:00
Hangyu Kuang
b9779c7c26 media: Add hidden api to set video encoding profile and level. am: f70ad43f13
am: 2725d89822

Change-Id: I3c702fc0ce1b1ac78b894f665d5811c1c65c62b4
2016-07-26 15:15:27 +00:00
Jin Park
9ff5cefd4e ExifInterface: Add PEF, RW2 files parse support
PEF, RW2 files have unique ways of storing their data. This CL adds code
that checks whether a file is one of these formats and parses the data
according to specifications.

Bug: 29409358
Change-Id: I6c368b4865414062f9f535bf180d7d7bf6984a7d
2016-07-26 18:27:22 +09:00
Hangyu Kuang
2725d89822 media: Add hidden api to set video encoding profile and level.
am: f70ad43f13

Change-Id: I3bb9bf5884d791dd5d97fbda8117d1d4f3b1b40f
2016-07-25 23:45:35 +00:00
TreeHugger Robot
e7e1f0b788 Merge "media: Add hidden api to set video encoding profile and level." into nyc-mr1-dev 2016-07-25 23:40:00 +00:00
Hangyu Kuang
f70ad43f13 media: Add hidden api to set video encoding profile and level.
bug: 30284097
Change-Id: I898f9a05571098a0ca0f57fb5abf58567c16fdd1
2016-07-25 21:31:29 +00:00
Eino-Ville Talvala
4158f4a323 ImageReader: Add discardFreeBuffers method am: 2e2aaf6e04
am: bc20c106df

Change-Id: I215c711f13531821907cd442b2aca707f46bd87d
2016-07-22 22:07:18 +00:00