4916 Commits

Author SHA1 Message Date
Andy Hung
3dd656c624 resolve merge conflicts of ffe502b to cw-f-dev
Change-Id: Id392b2e1990dc50b5d2d552f283a11a648d849a1
2016-10-18 11:55:04 -07:00
Andy Hung
ffe502bd61 Ringtone: clear the MediaPlayer listener upon completion
This breaks a local refcount cycle and allows the Java gc to finalize
the Ringtone and MediaPlayer objects quickly.

Bug: 31811091
Change-Id: I0e5a4a78fdc02cc0c8b7811a1f1a45db3c90a0ff
2016-10-17 18:12:35 -07:00
Sungsoo
b68d0855c4 ExifInterface: Provide backward compatibility am: 2dbe166801 am: bc813cd510
am: 36f64a2f0c

Change-Id: Ibc82a2ddd80dff7d98880db0a179fbb1540ac6f8
2016-10-13 22:11:58 +00:00
Sungsoo
36f64a2f0c ExifInterface: Provide backward compatibility am: 2dbe166801
am: bc813cd510

Change-Id: I0aa6d33baeec8dd991561d964bfce16915c0553d
2016-10-13 22:06:01 +00:00
Sungsoo
bc813cd510 ExifInterface: Provide backward compatibility
am: 2dbe166801

Change-Id: I53f2bfb056d955c6693cb65c9cb9a21859ff7535
2016-10-13 21:57:22 +00:00
Sungsoo
2dbe166801 ExifInterface: Provide backward compatibility
ExifInterface.saveAttribute() didn't throw UnsupportedOperationException
before. Use IOException instead of UnsupportedOperationException for
backward compatibility.

Bug: 30936376, Bug: 32068647, Bug: 31319086
Change-Id: Ifb478db3af820eb846c5373d3a284367da3495a0
2016-10-13 13:06:24 +09:00
Erik Wolsheimer
76ed4ddca0 Fix memory leak in Ringtone
BUG: 31938615
Change-Id: Ic736f3494b4da95460bdc0cb7857cc9fcc746ab9
2016-10-11 10:13:23 -07:00
Philip P. Moltmann
5201f1e61c Do not access MTP devices when disabled.
The USB data transfer is disabled we should not allow access MTP devices
(e.g.
usb sticks). We have two ways of accessing them: Either by mounting them
or by creating a MTPDevice in an app.

Of course an app could implement implement their own MTPDevice
implementation. In this case we cannot enforce the policy without
completely suppressing all MTP USB devices which would be too
restrictive.

Note: When the policy is set we do _not_ disconnect already connected
MTP devices

Fixes: 31472955
Change-Id: I6080c48c49657102774b2b3b4d89ff030245a266
2016-09-30 22:24:23 +00:00
TreeHugger Robot
e2782906b5 Merge changes Ic1e2f5e8,Ida4a3fc1 into nyc-mr1-dev
* changes:
  Make dispatchAudioRoutesChanged be called when BT A2DP status changed
  Revert "Disable selecting the default audio route when a BT route is avaiable"
2016-09-29 10:54:20 +00:00
Sungsoo
71f3563c39 Make dispatchAudioRoutesChanged be called when BT A2DP status changed
Bug: 28517884, Bug: 31398128
Change-Id: Ic1e2f5e828a772c667caf1408ebfc9b0d7c3f7d4
2016-09-29 10:16:19 +09:00
Sungsoo
fa6f70e225 Revert "Disable selecting the default audio route when a BT route is avaiable"
This reverts commit 0d33113196e0070829104bf178f3139262b1f33f.

Bug: 28517884, Bug: 31398128
Change-Id: Ida4a3fc1f6f0aae09a5c4463bca8619412f3db58
2016-09-29 10:15:54 +09:00
Sungsoo
4e236046ae ExifInterface: Update javadoc for saveAttributes am: abf5b4cbf3 am: d0a8a69034
am: 0a31d58d14

Change-Id: I33726dd0a1bf2f30309e4abd74b8633c809afada
2016-09-28 00:22:55 +00:00
Sungsoo
0a31d58d14 ExifInterface: Update javadoc for saveAttributes am: abf5b4cbf3
am: d0a8a69034

Change-Id: I4df5b4855ec9f1e38fab504f3a895c4744cc287e
2016-09-28 00:15:51 +00:00
Sungsoo
d0a8a69034 ExifInterface: Update javadoc for saveAttributes
am: abf5b4cbf3

Change-Id: Icdd289f513f2a576b50d0f3ddf278a1c1710d8b5
2016-09-28 00:08:52 +00:00
Sungsoo
abf5b4cbf3 ExifInterface: Update javadoc for saveAttributes
Bug: 31319086
Test: Checked the created javadoc with "make docs"
Change-Id: I97c77ba4f00a95bc5eedf1dcee942aebd2d89ccb
2016-09-27 02:04:35 +00:00
Eino-Ville Talvala
c4faf0cb13 Docs: Note that a Surface acts like a weak reference
This causes frequent programming errors, when developers assume
that holding onto a Surface will keep its associated SurfaceTexture,
ImageReader, etc, also alive.

Bug: 31551063
Test: m offline-sdk-docs, manual viewing of result
Change-Id: I5fb5bb3e3c80c7d5d735417b1697e0fe9a62fc46
2016-09-16 22:58:11 +00:00
Wei Jia
b5cc0b55e3 Merge "MediaPlayer: add comments of restriction for setNextMediaPlayer." into nyc-mr1-dev 2016-09-16 00:24:16 +00:00
Wei Jia
295e727545 MediaPlayer: add comments of restriction for setNextMediaPlayer.
Bug: 31517393
Change-Id: I50d1c6cb45d2544b0dcc8f0a3e7cc5818fcd024e
2016-09-15 14:54:35 -07:00
Robert Shih
e6b987c569 MediaExtractor: clarify EOS behavior for local files
Bug: 30726795
Change-Id: Iecd0ceb2bd0e32e0ae3387c534e181a2daf2005b
2016-09-14 23:30:27 +00:00
Jean-Michel Trivi
3fb30a2a43 Merge "MediaScanner: check build fingerprint for system sound scan" into nyc-mr1-dev 2016-09-14 22:23:26 +00:00
Jean-Michel Trivi
17d2440090 MediaScanner: check build fingerprint for system sound scan
Always scan notification, ringtones and alarm files under /system
  when the build fingerprint has changed since the last scan,
  because the dates on those files is not set correctly
  (by design), and hence cannot be trusted in the date-based
  scanning logic.
Remove some dead code

Bug 30476971

Change-Id: I638c787dc177f7f5fb17c1c2a576be190c1c85f9
2016-09-14 12:48:50 -07:00
Jean-Michel Trivi
156a29f981 Merge "Fix Zen mode for different notification usage types" into nyc-mr1-dev 2016-09-13 00:46:52 +00:00
Eino-Ville Talvala
e93c655093 Merge "DO NOT MERGE ANYWHERE: ImageReader: Add discardFreeBuffers method" into nyc-dev 2016-09-12 19:20:06 +00:00
Eric Laurent
38ce20dd0d Merge "Disable selecting the default audio route when a BT route is avaiable" into nyc-mr1-dev 2016-09-10 01:36:48 +00:00
Sungsoo
9a420bb0f6 DO NOT MERGE) ExifInterface: Make saveAttributes throw an exception before change
am: 56ea7b4901

Change-Id: Iebcfced541a569bd441f45ff126075c2e87401c9
2016-09-09 22:46:46 +00:00
Eino-Ville Talvala
e175aa82b5 DO NOT MERGE ANYWHERE: ImageReader: Add discardFreeBuffers method
This method (currently @hide) discards all cached buffers for
the ImageReader, which can be useful to free up memory at the
cost of reallocation time if more buffers are needed later.

It has no effect on acquired Images, filled Images waiting to be
acquired, or buffers being actively used by the source rendering to the
Surface.

Bug: 28695173
Change-Id: I427a8ba4ad73a267083f843dbf228bfc53a730d9
2016-09-09 15:11:56 -07:00
Jean-Michel Trivi
e743bda5de Fix Zen mode for different notification usage types
ZenModeHelper was only considering a subset of all notification usage
 types. The code was also iterating over the usage values, expecting
 them to be contiguous, which will break with the addition of new
 usage values.
The update consists in:
 - defining in AudioAttributes an array of expected usage types
 - defining the suppression behavior for each usage type
 - have ZenModeHelper query the behavior for each usage in
    order to apply the corresponding muting behavior.

Bug 29009099

Change-Id: If884dda6297f125c60c5775c757df4f782e22e53
2016-09-09 12:04:11 -07:00
xiaoli.xb.zuo
439e5e49fb Fix memory leak in MediaScannerConnection
This patch adds releasing of MediaScannerConnection in ClientProxy
after disconnecting and releasing of ClientProxy and
IMediaScannerService in disconnection sequence in
MediaScannerConnection.

Bug: 30150344

Change-Id: I1e162e4c9a0b7a741ace20480bcf06f3151a93bf
2016-09-08 09:08:18 -07:00
Sungsoo
56ea7b4901 DO NOT MERGE) 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
(cherry picked from commit a8f9a075b14c526a0de75c2ade81ebc4e05e4ef8)
2016-09-08 08:01:13 +00:00
Sungsoo
0d33113196 Disable selecting the default audio route when a BT route is avaiable
Bug: 28517884
Change-Id: I537db7242adf8adb07f9860a0c43c9eaf40a4229
2016-09-08 15:14:27 +09:00
Mark Goldstein
60a849ab32 docs: Fix typo am: 1c22ae296b
am: b348093ec4

Change-Id: Ia4e3200d698bf4687b788d31e40dfcb61c3ecd18
2016-08-25 23:56:45 +00:00
Mark Goldstein
b348093ec4 docs: Fix typo
am: 1c22ae296b

Change-Id: I9f7f4389583eedbae2df7554f974d49ebe4b9c1e
2016-08-25 23:48:46 +00:00
Mark Goldstein
1c22ae296b docs: Fix typo
Bug: 25777114
Change-Id: I5c34ceba8f3b76bd47e1c020956cef285bad59d7
2016-08-25 12:48:07 -07: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
Glenn Kasten
46db227b84 Merge "Define low latency output stream (formerly primary)" into nyc-mr1-dev 2016-08-16 22:51:58 +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
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
2e2aaf6e04 ImageReader: Add discardFreeBuffers method
This method (currently @hide) discards all cached buffers for
the ImageReader, which can be useful to free up memory at the
cost of reallocationt time if more buffers are needed later.

It has no effect on acquired Images, filled Images waiting to be
acquired, or buffers being actively used by the source rendering to the
Surface.

Bug: 28695173
Change-Id: I427a8ba4ad73a267083f843dbf228bfc53a730d9
2016-07-21 17:04:19 -07:00
Bryan Mawhinney
881bc352ee Merge "Add .mov to MediaScanner video file types" into nyc-mr1-dev 2016-07-20 18:58:30 +00:00
Bryan Mawhinney
c9cb80e9e6 Add .mov to MediaScanner video file types
Bug: 16162336
Change-Id: I34467c707494690a9e3e3890f295dd1f7df86c86
2016-07-19 16:01:55 +01:00
Chien-Yu Chen
ca979b9d89 ImageReader: Make close thread safe
Bug: 30191606
Change-Id: Ic5b53c416a7fe3ebcaad2ab78f2e9aef3b790c88
2016-07-18 17:14:27 -07:00
Glenn Kasten
2ed8f215f1 Define low latency output stream (formerly primary)
Bug: 29164107
Change-Id: Ic31ee9bc85f39026918f9a7b7f379454d99b0009
2016-07-18 11:43:38 -07:00
Lajos Molnar
12f860f5a2 Merge "media: document new temporal layering schema values." into nyc-mr1-dev 2016-07-15 05:44:04 +00:00
Lajos Molnar
be00432071 media: clarify MediaFormat.KEY_I_FRAME_INTERVAL
Bug: 30096321
Change-Id: I908b669caf5443fb272a2d274b7cbf7227913b3e
2016-07-15 05:15:24 +00:00
Lajos Molnar
2cfca129d6 media: document new temporal layering schema values.
Also fix doc as these are advertised on the output port.

Bug: 30150921
Bug: 27596987
Change-Id: Ia95876ade36bc82eea0e9795dea0268abbd1c1ef
2016-07-14 19:56:35 -07:00
Lajos Molnar
82d886434d Merge "media: clarify notes in MediaCodec doc" into nyc-mr1-dev 2016-07-15 00:25:30 +00:00
Wei Jia
407fd1ea62 Merge "MediaPlayer: fix typo for OnInfoListener." into nyc-mr1-dev 2016-07-13 22:05:00 +00:00
Jean-Michel Trivi
69c6166684 Merge "Optimize audio playback restriction check" into nyc-mr1-dev 2016-07-13 21:50:59 +00:00
Jean-Michel Trivi
1293c060c8 Optimize audio playback restriction check
Order the playback restriction checks from the most likely
  restriction to the least likely.

Bug 30073948

Change-Id: I6431d15a2ed8b5831f937eab8db940d942082b0e
2016-07-13 19:30:56 +00:00