11557 Commits

Author SHA1 Message Date
Jean-Michel Trivi
85bdb72cba MediaScanner: check build fingerprint for system sound scan am: 17d2440090
am: 330249109a

Change-Id: I52040c27bb68d282821db43d48b956e949c9e1de
2016-09-14 22:37:32 +00:00
Jean-Michel Trivi
330249109a MediaScanner: check build fingerprint for system sound scan
am: 17d2440090

Change-Id: Ie3515f40346072f1552f7045bf8d5de02c0b26a9
2016-09-14 22:31:14 +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
Philip P. Moltmann
ec3cbb2a66 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-14 13:29:45 -07: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
d987793bd6 Fix Zen mode for different notification usage types am: e743bda5de am: 4068a641e6
am: 06a206456a

Change-Id: I5a9723affc20cf7a22fcd1e45481d98427acf947
2016-09-14 06:30:54 +00:00
Chih-hung Hsieh
0c712a9ede Merge "Fix google-explicit-constructor warnings in media utils." am: 5e91082b3c am: d1dd5ae76b am: 68b9ebcd59
am: da6d274a7d

Change-Id: I87b449706cc87c9e9ca722f483d23d40729da7e1
2016-09-14 04:56:58 +00:00
Sungsoo
4c3b24759d Disable selecting the default audio route when a BT route is avaiable am: 0d33113196 am: 9c18f58031
am: 9b2b7cdf83

Change-Id: I6bce27791fb0ae74d1317c967cfd4d244cbc2d8c
2016-09-14 04:43:41 +00:00
Mikhail Naganov
de779e182a Merge "Midi: Replace usages of ParcelFileDescriptor with FileDescriptor" 2016-09-13 23:09:02 +00:00
Mikhail Naganov
17bbb50edc Midi: Replace usages of ParcelFileDescriptor with FileDescriptor
FileDescriptor can be natively marshaled, and can be used with both
Java and native code, whereas PFD can not.

Bug: 25945784
Change-Id: I5299f0a1555d3531f7dcf1e23c027fb420dc3569
2016-09-13 11:08:37 -07:00
Jean-Michel Trivi
06a206456a Fix Zen mode for different notification usage types am: e743bda5de
am: 4068a641e6

Change-Id: Ia7956cc38b7a747fed7744016e7b9c5ba0a51530
2016-09-13 01:04:41 +00:00
Jean-Michel Trivi
4068a641e6 Fix Zen mode for different notification usage types
am: e743bda5de

Change-Id: Id5820ab61a8672b7b1a2857c8e6356a11f78be07
2016-09-13 00:50:34 +00: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
Hyundo Moon
934a526e68 MediaSession: Rename methods related to shuffle mode
This CL remames following methods:
 - MediaController.getShuffleMode() -> isShuffleModeEnabled()
 - MediaController.TransportControls.setShuffleMode()
    -> setShuffleModeEnabled()
 - MediaSession.setShuffleMode() -> setShuffleModeEnabled()
 - MediaSession.Callback.onSetShuffleMode() -> onSetShuffleModeEnabled()

Change-Id: Ifb1ef5b5355ddec60c3e9e84d53eb4ead4671b4f
2016-09-12 21:15:41 +09:00
Chih-hung Hsieh
da6d274a7d Merge "Fix google-explicit-constructor warnings in media utils." am: 5e91082b3c am: d1dd5ae76b
am: 68b9ebcd59

Change-Id: I49a2d607d1d0adfe5a4297a83771336c4cd9c870
2016-09-10 17:26:10 +00:00
Chih-hung Hsieh
68b9ebcd59 Merge "Fix google-explicit-constructor warnings in media utils." am: 5e91082b3c
am: d1dd5ae76b

Change-Id: I71778eb5a253ebf5342f863d34e178513d386783
2016-09-10 17:20:37 +00:00
Chih-hung Hsieh
5e91082b3c Merge "Fix google-explicit-constructor warnings in media utils." 2016-09-10 17:07:53 +00:00
Sungsoo
9b2b7cdf83 Disable selecting the default audio route when a BT route is avaiable am: 0d33113196
am: 9c18f58031

Change-Id: Ia97a95e1ffdd113130ccfa2f70f5c02ac407b057
2016-09-10 01:53:43 +00:00
Sungsoo
9c18f58031 Disable selecting the default audio route when a BT route is avaiable
am: 0d33113196

Change-Id: I5ce37239efc8a48f8b14927ca3cc9289f88b84ce
2016-09-10 01:44:26 +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
4c3668d7aa DO NOT MERGE) ExifInterface: Make saveAttributes throw an exception before change
am: 56ea7b4901

Change-Id: If8497c9ad514037ce4c1f72dee6f77426d3ecd50
2016-09-09 22:46:55 +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
Robin Lee
5e7d93581c Merge "[Ringtone] Return title "None" if Uri is null" 2016-09-06 00:27:57 +00:00
TreeHugger Robot
069fe7ea64 Merge "MediaBrowser: Make ItemCallback can take a null media item" 2016-09-02 02:55:13 +00:00
Chih-hung Hsieh
2378ff89f4 Merge "Fix google-explicit-constructor warnings in media/mca." am: 2cace65f71 am: 4836d07980 am: edd824b94a
am: d835145d2f

Change-Id: Ia15a7ea301c489653f3f95356328248b27da293a
2016-09-01 01:26:36 +00:00
Chih-hung Hsieh
20651bc467 Merge "Fix google-explicit-constructor warnings in soundpool." am: feee33ce2c am: 17f1fc6c76 am: c80db139b3
am: cb98cac6d3

Change-Id: Id22ce0c86caa79f2eabf4201f6a0267d13270a00
2016-08-31 23:35:35 +00:00
Chih-hung Hsieh
d835145d2f Merge "Fix google-explicit-constructor warnings in media/mca." am: 2cace65f71 am: 4836d07980
am: edd824b94a

Change-Id: I83d815f5d739c47407f3faf1b25034e52492d638
2016-08-31 17:40:08 +00:00
Chih-hung Hsieh
edd824b94a Merge "Fix google-explicit-constructor warnings in media/mca." am: 2cace65f71
am: 4836d07980

Change-Id: Ib0369e46dd1f1e56b3f660e615bc34c87120acaa
2016-08-31 17:34:11 +00:00
Chih-hung Hsieh
2cace65f71 Merge "Fix google-explicit-constructor warnings in media/mca." 2016-08-31 17:18:29 +00:00
Chih-hung Hsieh
cb98cac6d3 Merge "Fix google-explicit-constructor warnings in soundpool." am: feee33ce2c am: 17f1fc6c76
am: c80db139b3

Change-Id: I6a5f93e80d4ef18286fcb45987b6f9bbd7425f88
2016-08-30 22:50:14 +00:00
Chih-hung Hsieh
c80db139b3 Merge "Fix google-explicit-constructor warnings in soundpool." am: feee33ce2c
am: 17f1fc6c76

Change-Id: If968940949e97633e99832a3edc1d3003662dac2
2016-08-30 22:41:26 +00:00
Sungsoo
d570d5ca3c MediaBrowser: Make ItemCallback can take a null media item
When the implementation of MediaBrowserService returns null,
ItemCallback.onError was called, but the JavaDoc is saying that
ItemCallback.onItemLoaded can be called with a null result.

This CL makes ItemCallback.onItemLoaded be able to take a null result,
and ItemCallback.onError be called when the implementation doesn't override
the onLoadItem method or when the returned object is not MediaItem.

Bug: 27808084
Change-Id: I97cfd83786f8f857dc9551e5b0a358962f98e4a2
2016-08-30 14:23:38 +09:00
Mark Goldstein
e18ff6543e docs: Fix typo am: 1c22ae296b am: 94d4c84f38
am: 269756de07

Change-Id: Id8c1f698a53e0a975f2dc3b03bbef9d40d4fba8a
2016-08-29 23:55:24 +00:00
Chih-Hung Hsieh
ae1aadc04f Fix google-explicit-constructor warnings in soundpool.
* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Id1183b2929242cdf1fd0a1558d0e70194a1de9bb
2016-08-29 14:53:50 -07:00
Chih-Hung Hsieh
bd42349f7e Fix google-explicit-constructor warnings in media utils.
* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I13958693f28fae9016124a43cd211e5302ed8d51
2016-08-29 14:49:57 -07:00
Chih-Hung Hsieh
bd6b663b47 Fix google-explicit-constructor warnings in media/mca.
* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Ia820e0a82df4bf74e5846917f6148849aed6ddc0
2016-08-29 14:47:52 -07:00
Mark Goldstein
269756de07 docs: Fix typo am: 1c22ae296b
am: 94d4c84f38

Change-Id: Ic95ae48e0ebc693de6114edc2186347deea8145b
2016-08-26 01:02:05 +00:00
Mark Goldstein
94d4c84f38 docs: Fix typo
am: 1c22ae296b

Change-Id: I775b87f43db12889696f015b8fe4051816e6d0fd
2016-08-26 00:47:56 +00: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
Colin Cross
6520711837 resolve merge conflicts of 77a7787 to master
Change-Id: I17f14a88b5b654a8860a09f610e797af15cedecc
2016-08-25 15:01:52 -07:00
Mark Goldstein
1c22ae296b docs: Fix typo
Bug: 25777114
Change-Id: I5c34ceba8f3b76bd47e1c020956cef285bad59d7
2016-08-25 12:48:07 -07:00
Guang Zhu
01c560f4af Avoid JUnit4 collision in android-support-test, mockito-target
Bug: 31072145
Test: make droid checkbuild

Change-Id: I1462b0ba70aa3ede1a5b2ccc407e234dea1eb1b2
2016-08-25 19:37:46 +00:00
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