Commit Graph

6013 Commits

Author SHA1 Message Date
Hangyu Kuang
e6e5043f8d Merge "media: Address api council comments." into oc-mr1-dev am: d3cef1bf7c
am: 515b44b35f

Change-Id: I6e09042855c933647c5f08955e06378dbc56f324
2017-08-07 21:51:46 +00:00
TreeHugger Robot
d3cef1bf7c Merge "media: Address api council comments." into oc-mr1-dev 2017-08-07 21:20:54 +00:00
Jin Seok Park
4ae72e6cbf Merge "ExifInterface: Remove throwing exception" into oc-mr1-dev am: 48dad606c5
am: a0e00f5015

Change-Id: I03db88b452431a3ec454754bbb7eb99a43ee0356
2017-08-04 01:05:01 +00:00
Sungsoo Lim
6a62de0746 Merge "Catch IllegalArgumentException when disconnect" into oc-mr1-dev am: 1d66ccde36
am: f6791675f2

Change-Id: I33c1d2cbccb2e2944bba49d8b7d6b5117816870a
2017-08-04 00:50:11 +00:00
Sungsoo Lim
eb3167035d Merge "Do not call ItemCallback after disconnected" into oc-mr1-dev am: 8724fb9348
am: 57cf99b969

Change-Id: I112b12eac97890092af0362048d6e001cbedb923
2017-08-04 00:48:20 +00:00
Jin Seok Park
48dad606c5 Merge "ExifInterface: Remove throwing exception" into oc-mr1-dev 2017-08-04 00:43:02 +00:00
Sungsoo Lim
1d66ccde36 Merge "Catch IllegalArgumentException when disconnect" into oc-mr1-dev 2017-08-04 00:22:00 +00:00
Hangyu Kuang
51cb826529 media: Address api council comments.
Bug: 64338602
Test: CTS test.
Change-Id: I7e1db5a6aea3d63b37a2554ec2a21a0fe40f6e03
2017-08-03 13:52:56 -07:00
Sungsoo Lim
c012f6edd8 Catch IllegalArgumentException when disconnect
IllegalArgumentException can happen, if unbindService() is called
after the service is stopped.

Bug: 63439915
Test: Passed MediaBrowserTest
Change-Id: I70ecb9e907af66b9b65960dd4029e55e81639c03
2017-08-03 14:38:36 +09:00
Sungsoo Lim
be87b68039 Do not call ItemCallback after disconnected
Bug: 64119114
Test: Passed MediaBrowserTest
Change-Id: Icf3283710abe7c03f4a73532b33ec2a306d2280b
2017-08-03 04:48:48 +00:00
Sungsoo Lim
fc844db18d Merge "Check CookieHandler in setDataSource with cookies" into oc-dr1-dev am: 6a2ee3b180 am: 0553f96c0a
am: 167b6837dd

Change-Id: I45dec1e4f76ab3550e00492294ee0523f48ad963
2017-08-03 01:43:32 +00:00
Sungsoo Lim
167b6837dd Merge "Check CookieHandler in setDataSource with cookies" into oc-dr1-dev am: 6a2ee3b180
am: 0553f96c0a

Change-Id: I4559ce2ec092c1855cb09316e5323d0cb33da31f
2017-08-03 01:13:52 +00:00
Sungsoo Lim
c0fe5b2d88 Merge "Check CookieHandler in setDataSource with cookies" into oc-dr1-dev
am: 6a2ee3b180

Change-Id: Ia42104e2fb75d867279fe8d553c807d5dcfac06d
2017-08-03 01:03:48 +00:00
Sungsoo Lim
6a2ee3b180 Merge "Check CookieHandler in setDataSource with cookies" into oc-dr1-dev 2017-08-03 00:52:27 +00:00
Sungsoo Lim
09d62021d9 Check CookieHandler in setDataSource with cookies
If the caller of MediaPlayer.setDataSource has installed its own
CookieHandler when cookies are provided, MediaPlayer.setDataSource
requires that the CookieHandler has to be of CookieManager type.

Bug: 63638018
Test: manual
Change-Id: I1539d1fa83440ddfb00cc958cd46b9917fe3a296
2017-08-03 09:48:01 +09:00
Tarandeep Singh
80f47e54f4 Merge "Merge "Fix keyboard focus in VR" into oc-dr1-dev am: 986995d481 am: 7def2eea97" into oc-mr1-dev-plus-aosp
am: 6f6cc83cf3

Change-Id: I9ceea32fa06bab6416a341998425e9d176c054e6
2017-08-02 23:44:16 +00:00
Tarandeep Singh
ab1a5ff749 Merge "Fix keyboard focus in VR" into oc-dr1-dev am: 986995d481
am: 7def2eea97

Change-Id: I538777a295628827fc3052c58641cbb659afad20
2017-08-02 23:04:58 +00:00
Tarandeep Singh
9c4115a562 Merge "Fix keyboard focus in VR" into oc-dr1-dev
am: 986995d481

Change-Id: I693c1256583dc1081c6402668401c6aab2337d16
2017-08-02 22:59:51 +00:00
Hangyu Kuang
d964cdefc4 Merge "media: Add scaled video thumbnail extractor api." into oc-mr1-dev am: 26a4940296
am: 40b96c785f

Change-Id: Ie5a72ad1f303e814129ed54915747c5aa925a437
2017-08-02 19:32:26 +00:00
TreeHugger Robot
26a4940296 Merge "media: Add scaled video thumbnail extractor api." into oc-mr1-dev 2017-08-02 19:14:23 +00:00
Tarandeep Singh
e1cfcf4c4d Fix keyboard focus in VR
Consider this VirtualDisplay (VD) scenario:
HostActivity creates a VD which holds SettingsActivity. When EditText
on SettingsActivity is tapped, it gains focus.
On eventual taps, it loses focus i.e. the Window in VD loses focus and
the host activity in primary display gets the focus instead. This
happens because WM's TaskTapPointerEventListener.onPointerEvent()
is called on the default display only.

Root cause:
1. Tap detector isn't registered for non-default display.
2. Tap detector has no info on which displayId touch was received.
3. InputFlinger doesn't deliver InputMonitor events for
non-default displays (fixed in a separate CL)

Fixing above results in onPointerEvent(MotionEvent) to deliver the
Touch events successfully to VD. We restrict these changes to physical
multi-displays and VR VirtualDisplays (which uses virtual touch device).
[VrManagerService calls WMInternal.setVr2dDisplayId(int)]

In future, displayId should be part of InputEvent. Bug: 64258305

Bug: 62033391
Test: bit FrameworksServicesTests:com.android.server.wm.DisplayContentTests
Change-Id: I3626f4de5aa9bcf905da9abd39f3ab1baefc4c48
2017-08-02 10:46:22 -07:00
Jin Park
d113478931 ExifInterface: Remove throwing exception
ExifInterface reads the first 5000 bytes of an image file to
determine what type of image it is, and throws an EOFException
if the file is smaller 5000 bytes. This CL removes the throwing
action.

Bug: 64133582
Test: Run ExifInterfaceTest.java with <5kb file
Change-Id: I2b2026f06d70a4fe2986d2e8c410679ba9bf3f7f
2017-08-02 08:48:17 +00:00
Previr Rangroo
b2016f1458 Merge "Add new Dolby Vision Profile types" into oc-mr1-dev am: 2ca4449d6b
am: 20efa0bce6

Change-Id: I3394825fb00c3409142c10c88fe44d2a622ece6f
2017-08-01 21:07:50 +00:00
Shubang Lu
c281dbc673 Merge "Add permission check and @RequiresPermission annotation" 2017-07-28 01:39:57 +00:00
Hangyu Kuang
0552036bc8 media: Add scaled video thumbnail extractor api.
Bug: 62198298
Test: CTS test
Change-Id: Ic78e2dac38b596a10d2fae76bc22f8c43fadf444
2017-07-27 13:31:46 -07:00
Julian Mancini
a83cc4582f Add support for simpler Lat/Long values
In this CL, we add two public static final Strings to MetadataReader. I
use these to put in an "extras" bundle into our highest level bundle.
Within that extras bundle is the Latitude and Longitude values, if
available.

Bug: 63906073
Test: In Place
Change-Id: I1feccb4444d6525f9bc8bddfe8cc73b098e0b90e
2017-07-27 10:21:23 -07:00
Sungsoo
972f27b938 Restore the selected route when an app starts to make sound
Limitation: When two apps make sound simultaneously while one uses a BT
route and the other uses the default route, switching activities between
the two different apps will not change the BT A2DP status until one of
the apps changes its playback status to inactive.

Bug: 32958908, Bug: 35567695, Bug: 33186346
Test: Passed MediaRouter/MediaSession test, and manually varified that
      the b/33186346 is fixed.
Change-Id: I1da97dcb74fa2095425b311ad62cdd00f8118cea
(cherry picked from commit b3658569e9)
2017-07-26 11:02:21 +09:00
Shubang
dd3ec0be11 Add permission check and @RequiresPermission annotation
Bug: 62347045
Test: make; flash; run
Change-Id: Icbd828fa5a4762cf335492a42d321e29c4e2ec5f
2017-07-24 14:39:33 -07:00
Jean-Michel Trivi
9b22133e1c AudioFocusRequest code sample: qualify class for some constants
Add the name of the AudioManager class for the REQUEST constants.

Test: build framework
Bug: 63907030

Change-Id: Id79223a5376d4c75cc74fb471d35672b452d9fc9
2017-07-24 13:50:16 -07:00
Previr Rangroo
307da62b1c Add new Dolby Vision Profile types
Test: build

Change-Id: I475a0ec5b510523434e0c53c5085c58908e4ed83
Signed-off-by: Previr Rangroo <prang@dolby.com>
2017-07-21 18:18:08 +00:00
Conrad Chen
ab61a5af0b Media API: fix possible NPE
Test: cts-tradefed run cts -m MediaTest
Change-Id: I077bdef97e48aa793a82a109e17c6dbe3147a3a9
2017-07-20 11:43:03 -07:00
Conrad Chen
a73f5e6bff Merge "Media API: Using context's classloader in MediaBrowser" 2017-07-20 17:40:30 +00:00
TreeHugger Robot
789f86907e Merge "Remove logspam of MediaRouter" 2017-07-20 01:31:54 +00:00
Sungsoo Lim
e8de514b10 Merge "MediaRouter: Introduce and use getFallbackRoute method" into oc-dr1-dev am: 7b3bd1d547
am: 4dec845d52

Change-Id: I07d405b81ec43d720ec843a87e6a3bb07e03aea7
2017-07-20 00:32:10 +00:00
TreeHugger Robot
7b3bd1d547 Merge "MediaRouter: Introduce and use getFallbackRoute method" into oc-dr1-dev 2017-07-20 00:18:20 +00:00
Lajos Molnar
ef8d73353a Merge "media: Add constants for CBP and CHP for AVC codecs" 2017-07-19 23:43:51 +00:00
Sungsoo Lim
4bad663518 Remove logspam of MediaRouter
Bug: 62459799
Test: manual
Change-Id: Ia705a3d35625b1ec2d7cd2717f082c7d8c216099
2017-07-19 16:24:15 -07:00
Lajos Molnar
9da5f1ba58 media: Add constants for CBP and CHP for AVC codecs
Bug: 63864332
Change-Id: Ifd6b8c097df2ca8e706d5797ad9c1e7e7d02b6bc
2017-07-19 16:02:44 -07:00
Sungsoo Lim
d98427b1bc Merge "Type check before casting from CookieHandler to CookieManager" into oc-dr1-dev am: 925abb706e
am: d820ac190e

Change-Id: Ic0eab4ae3869cadc8bc1343053be94d620ebb30f
2017-07-19 23:01:54 +00:00
Conrad Chen
11b41c54a2 Media API: Using context's classloader in MediaBrowser
When subscribing media updates, we allow users to pass options as
Bundles, in which users may put non-framework-defined parcelables,
which would cause ClassNotFoundException when media browser tries
to compare options to select the specified callback.

Sets any passed options' classloader as context's classloader to
solve the problem.

Test: manually checks if crashed APPs can survive after the fix
Bug: 62648808
Change-Id: I670c8da4ebc7845487db3a0d22c9d2baf727056f
2017-07-19 21:51:27 +00:00
Sungsoo Lim
9bfb46f6ff Type check before casting from CookieHandler to CookieManager
CookieHandler.getDefault() doesn't always return CookieManager.

Bug: 63638018
Test: pass StreamingMediaPlayerTest#testHlsWithHeadersCookies
Test: manual with a test app
Change-Id: Ie7c19d38f779813f3fffb9abbcb3188a0fca3f45
2017-07-19 18:40:16 +00:00
Sungsoo Lim
59579ce59d MediaRouter: Introduce and use getFallbackRoute method
Instead of selecting default route, select the fallback route to avoid
making sound via the default route while a BT route is available.

Bug: 63582431
Test: manual
Change-Id: I2cb8fbf6c518294fcec2bf14a5d8175c7302396f
2017-07-17 23:21:34 +00:00
Eric Laurent
1e52eafae1 Merge "audioservice: modify default music volume" into oc-dr1-dev am: b6f946c081
am: aebf79edb4

Change-Id: I9e5ee08c8320799dd53e604005c4be57142832fb
2017-07-12 17:47:33 +00:00
Eric Laurent
403bd3429b audioservice: modify default music volume
Default music volume is changed from 3/4 of max to 1/3 of max to
reduce initial volume over headphones percieved as too agressive.

Also add a property ro.config.media_vol_default to modify this
default value.

Bug: 62608451
Test: verify default music volume over headphones after factory reset.
Change-Id: Icadb99e1bafe88984d3a3a05014d4d4648830693
2017-07-11 16:21:44 -07:00
Dianne Hackborn
3e99f654fb Fix issue #34471029: Don't allow audio use from background apps.
This is becoming a common pattern (keeping track of which processes
are cached and not allowing them to do stuff in that state), so I
am turning this in to a general mechanism for monitoring this state
through the activity manager's IUidObserver.  Now we can just have
AudoService implement its own IUidObserver to get this state and
update which uids it is blocking.

This required making some changes to uid change reports so that
the integer is now a bit mask instead of an enumerations, but that
is what it was already turning in to anyway.  (This gets rid of
the crazy GONE_IDLE constant that we'd needed to add before because
it wasn't a bit mask).

Eventually the power manager should be changed to be told about
these changes to cached state instead of listening to every proc
state change, but we'll do that later, it is more disruption than
I want to take for now.  However, while working on this, I noticed
that the power manager had regressed in the cached uids it would
actually block, because the activity manager was no longer telling
it about all uids that are idle.  (I think this happened when I had
to change the default idle state of UidRecord to true.)  So I am
adding a bit of new code to keep track of what idle state we last
reported to observers, to make sure we tell it about newly created
uids that are idle but have never actually become active.

Test: runtest -c com.android.server.am.ActivityManagerServiceTest frameworks-services

Change-Id: I7bfd46bacadd4cab2a69f40e6e52afb4e67b456a
2017-07-10 17:24:20 +01:00
Scott Randolph
7934aab628 Fix typo in AudioPolicy comments
Make it clear that setAudioPolicyFocusListener is required when external
focus control is desired (as opposed to previously mentioned
setAudioPolicyStatusListener).

Test:  Inspection of the code.
Change-Id: I6d933feb3bf998d10a10b58ec6804dbab34e2036
2017-07-05 18:20:18 -07:00
TreeHugger Robot
b6d9ba31de Merge "cas: convert MediaCas to HIDL" 2017-06-28 20:37:24 +00:00
Jean-Michel Trivi
b777252139 Merge "AudioService: internal API for disabling audio playback for a UID" into oc-dr1-dev am: 8f81919093
am: 051285b648

Change-Id: Ib78281b6bc1b4ae37e0aba5e6a0b20cd81a29db2
2017-06-28 03:33:03 +00:00
Jean-Michel Trivi
92ed7bf412 AudioService: internal API for disabling audio playback for a UID
Internal API, available through AudioManagerInternal, to flag
  a UID as having lost the ability to play audio. When that
  happens, all players associated with this UID are paused, and
  future players are immediately paused when they report they
  started.
Users of this API must "enable" a previously banned UID when
  it is no longer in use.

Test: upcoming manual test with background apps
Bug: 34471029
Change-Id: Ic1c103aabe8f3897072b3ce938d84cb949540e23
2017-06-27 17:57:34 -07:00
Jaewan Kim
5f69d38a99 Merge "Consider double tap of the play/pause as the next track" into oc-dr1-dev am: f05929af73
am: db7927c21e

Change-Id: I69a6f48e46bcbd7ed03057ce0c18002f6ecdd576
2017-06-25 01:42:03 +00:00