Commit Graph

5386 Commits

Author SHA1 Message Date
TreeHugger Robot
cea665e36a Merge "Media: check Settings.AUTHORITY without userId" 2016-09-26 15:37:15 +00:00
Robin Lee
9d5b8368d7 Media: check Settings.AUTHORITY without userId
Otherwise we'll miss a trick and not take the settings provider
shortcut for playing work ringtones.

Bug: 30658854
Change-Id: I378cabe0ba426a2c91919b3df33a525d41fe3d0d
2016-09-26 13:49:52 +00:00
Mikhail Naganov
325db121f5 Merge "Make MidiDeviceInfo accessible to native code" 2016-09-22 22:36:08 +00:00
Mikhail Naganov
84b674079d Make MidiDeviceInfo accessible to native code
Update Java serialization code to allow interacting with native
serialization code. One notable change is due to the fact that
properties of non-primitive types can not be read back by native code,
the properties are serialized in two versions: one only contains
properties having primitive types, and another contains all
the properties. The latter is ignored by native code.

Bug: 25945784
Test: using a PoC app
Change-Id: I047a5bdec3006bcbce34c1c63aa7746e01f7a71e
2016-09-22 13:34:19 -07:00
Philip P. Moltmann
71985f5e23 Merge "Do not access MTP devices when disabled." 2016-09-21 18:14:25 +00:00
Eino-Ville Talvala
16177b899b Docs: Note that a Surface acts like a weak reference am: c4faf0cb13 am: ca7f4217b8
am: 0b0b740e6a

Change-Id: I173daca517236a9c912518bf2323b4db9a4cf963
2016-09-17 01:03:05 +00:00
Eino-Ville Talvala
0b0b740e6a Docs: Note that a Surface acts like a weak reference am: c4faf0cb13
am: ca7f4217b8

Change-Id: I42b145bb9139058d2ea349dbb556cd8a2f88724b
2016-09-17 00:47:03 +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
a46f4e2cfb MediaPlayer: add comments of restriction for setNextMediaPlayer. am: 295e727545 am: bff3f8a337
am: e9c90cea19

Change-Id: Ief6afe2b76968e14fb124be6316972033634d3a0
2016-09-16 01:55:45 +00:00
Wei Jia
e9c90cea19 MediaPlayer: add comments of restriction for setNextMediaPlayer. am: 295e727545
am: bff3f8a337

Change-Id: I86366b9ac51539ae4000810418b9d3a688231d4e
2016-09-16 01:48:44 +00:00
Wei Jia
bff3f8a337 MediaPlayer: add comments of restriction for setNextMediaPlayer.
am: 295e727545

Change-Id: Ie1fa26a735bfd1167a94796ca379f5b860e959b4
2016-09-16 00:30:13 +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
692bca0628 MediaExtractor: clarify EOS behavior for local files am: e6b987c569 am: 7709e7831e
am: 061a018055

Change-Id: I5e049b0f4e38ee4831f383c4490afb3bac3faecf
2016-09-15 20:24:05 +00:00
Robert Shih
061a018055 MediaExtractor: clarify EOS behavior for local files am: e6b987c569
am: 7709e7831e

Change-Id: Iaeb510d47505763722ad5ae16e408e1da10cf5a0
2016-09-15 20:18:51 +00:00
Jean-Michel Trivi
14d4f21e02 MediaScanner: check build fingerprint for system sound scan am: 17d2440090 am: 330249109a
am: 85bdb72cba

Change-Id: I31706a0f1abdebab10e9450eb3b2b1469b087701
2016-09-15 11:42:10 +00: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
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
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
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
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
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
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
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
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
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