10103 Commits

Author SHA1 Message Date
Jean-Michel Trivi
d4de20df2a AudioService: remove dead code
Remove dead code related to media button event receiver and
  remote control display, now handled by MediaSession*

Change-Id: I4bd621240ddddf4df079df8d551c72b232c3301d
2015-11-23 23:16:04 +00:00
Jae Seo
c94c051822 TIF: Use System.nanoTime() to measure execution durations in sessions
When the wall clock is adjusted to the broadcast time, the duration
measurement in ITvInputSessionWrapper may go wrong. To avoid this, use
System.nanoTime() that doesn't depend on the wall clock.

Bug: 25370822
Change-Id: I2ddb968b5e146500429b82979fe48262bf335993
2015-11-20 17:00:26 -08:00
Eino-Ville Talvala
346bc968f9 Merge "Don\'t use timestamps with all zero" am: 9574e58027 am: be1a3f8b66
am: 7ca29b3ea2

* commit '7ca29b3ea287883c1c55c62a0e654a87cc81b75d':
  Don't use timestamps with all zero
2015-11-17 23:21:29 +00:00
Dianne Hackborn
8958c1effb Merge "Initial stab at background check." 2015-11-17 19:13:32 +00:00
Eino-Ville Talvala
be1a3f8b66 Merge "Don\'t use timestamps with all zero"
am: 9574e58027

* commit '9574e58027f8edeb539ecedf2988c1a302887807':
  Don't use timestamps with all zero
2015-11-17 02:00:53 +00:00
Dianne Hackborn
bef28feba5 Initial stab at background check.
Actually, this implementation is more what we want for ephemeral
apps.  I am realizing the two are not really the same thing. :(

For this implementation, we now keep track of how long a uid has
been in the background, and after a certain amount of time
(currently 1 minute) we mark it as "idle".  Any packages associated
with that uid are then no longer allowed to run in the background.
This means, until the app next goes in the foreground:

- No manifest broadcast receivers in the app will execute.
- No services can be started (binding services is still okay,
  as this is outside dependencies on the app that should still
  be represented).
- All alarms for the app are cancelled and no more can be set.
- All jobs for the app are cancelled and no more can be scheduled.
- All syncs for the app are cancelled and no more can be requested.

Change-Id: If53714ca4beed35faf2e89f916ce9eaaabd9290d
2015-11-16 17:58:32 -08:00
Sungsoo Lim
70ffbdca62 Make TvContentRating.contains() public
Apply the feedback from API council.

Bug: 25726616
Change-Id: I9858a61eea50ff95221d453117fe3d991f88a33f
2015-11-17 10:34:04 +09:00
Sungsoo Lim
2189f58ec5 MediaBrowser: Handle null results properly in onLoadChildren
Bug: 19127753
Change-Id: I7ddad87e5ec6338a74c340485fed583107709acf
2015-11-16 14:46:29 +09:00
Michal Piechowski
43b0a458ab Don't use timestamps with all zero
Although all zero (0000:00:00) is valid time, in most cases it means
that value is not present. According to http://www.exiv2.org/Exif2-2.PDF
in such case those values should be omitted, however
some cameras set them to 0 anyway. With this commit such timestamps
will be treated as they were empty.

Change-Id: I9c762b1fa04ea6bf9c0fba9e2459a20430c71c90
2015-11-13 10:05:06 +09:00
Ian Pedowitz
c9711721f3 Merge "Revert "Fix race condition when setting default ringtones"" into mnc-dr-dev am: 88d4cc1001 am: 4f22c781b6 am: 44df02fc17
am: 4ab979e6cc

* commit '4ab979e6cc0c63b97b79441b478e30c8febdc3ee':
  Revert "Fix race condition when setting default ringtones"
2015-11-11 22:13:11 +00:00
Ian Pedowitz
4ab979e6cc Merge "Revert "Fix race condition when setting default ringtones"" into mnc-dr-dev am: 88d4cc1001 am: 4f22c781b6
am: 44df02fc17

* commit '44df02fc17bb0f3f1c445166c6cbd7f4d92b4eb6':
  Revert "Fix race condition when setting default ringtones"
2015-11-11 22:04:28 +00:00
Ian Pedowitz
4f22c781b6 Merge "Revert "Fix race condition when setting default ringtones"" into mnc-dr-dev
am: 88d4cc1001

* commit '88d4cc100175a54be3b7d560a91c38197f59f4bf':
  Revert "Fix race condition when setting default ringtones"
2015-11-11 21:46:06 +00:00
Ian Pedowitz
05ce0c6bb0 Revert "Fix race condition when setting default ringtones"
This reverts commit f2cb9341ff864e6d9cc6797857665b2281643a74.

Change-Id: I151972052aea47bf8c6823eb8bbf8161c5a7a4f0
2015-11-11 21:38:04 +00:00
Jeff Tinker
807ea28eef Merge "Improve MediaCodec.CryptoException log messages" 2015-11-10 21:16:44 +00:00
Jeff Tinker
3ccb34d707 Improve MediaCodec.CryptoException log messages
The message being logged is "Unknown error" even for
known error types.  This change provides more descriptive
error strings, for the case when the message isn't
explicitly provided by the DRM plugin.

Change-Id: Ic86478d7685cd33e21ecd2f875ef7dbed351e52e
related-to-bug: 25477595
2015-11-09 17:31:05 -08:00
Jeff Tinker
b801f7b891 Merge "Extend MediaCodec.CryptoInfo to support Sample AES" 2015-11-09 23:11:21 +00:00
Marco Nelissen
ff5fe15d34 Merge "Fix race condition when setting default ringtones" into mnc-dr-dev am: 83702ec3ed am: 02bf433f90 am: 8fb0121cb6
am: b67ae42ad0

* commit 'b67ae42ad07ed6a5b4927c41089076e6eafd6949':
  Fix race condition when setting default ringtones
2015-11-09 21:46:06 +00:00
Marco Nelissen
b67ae42ad0 Merge "Fix race condition when setting default ringtones" into mnc-dr-dev am: 83702ec3ed am: 02bf433f90
am: 8fb0121cb6

* commit '8fb0121cb60ddf54a22bff088670594f422edea9':
  Fix race condition when setting default ringtones
2015-11-09 21:39:41 +00:00
Marco Nelissen
02bf433f90 Merge "Fix race condition when setting default ringtones" into mnc-dr-dev
am: 83702ec3ed

* commit '83702ec3edf3bd17eff90a409cc3cf5efab48cff':
  Fix race condition when setting default ringtones
2015-11-09 21:28:32 +00:00
Marco Nelissen
f2cb9341ff Fix race condition when setting default ringtones
If the device was powered off during first boot, after media scanner
inserted some entries but before the default ringtone settings were
set (or committed to disk), the default settings would not be set
on subsequent boots.

Bug: 18625739
Bug: 22349910
Change-Id: Iff07da59a9c6d53bf2950bd107ee74d02b7f48d6
2015-11-06 10:50:47 -08:00
Jeff Tinker
45eb9b39f4 Extend MediaCodec.CryptoInfo to support Sample AES
API changes only, implementation to follow

b/23719082

Change-Id: I7cbd0cdf03a8b5b67628cde200c3df6a9253fdbf
2015-11-05 14:21:25 -08:00
Glenn Kasten
613c63c742 Merge "BluetoothMidiDevice: change write type to support JamStik"
am: 6079b990f1

* commit '6079b990f1461011a9dedb47cc65db1ce062e199':
  BluetoothMidiDevice: change write type to support JamStik
2015-11-02 23:06:04 +00:00
Glenn Kasten
bd32753700 Merge "BLE-MIDI: change binding for BluetoothMidiService"
am: 5831944a6e

* commit '5831944a6e99eff746e70d6ee9532ec3e3f32918':
  BLE-MIDI: change binding for BluetoothMidiService
2015-11-02 23:04:42 +00:00
Glenn Kasten
d8a8500429 Merge "MidiBluetoothService: add new device to HashMap"
am: 9b07ba4bc3

* commit '9b07ba4bc33319d6db8de173a24eb13b2d7f0b50':
  MidiBluetoothService: add new device to HashMap
2015-11-02 23:03:18 +00:00
Glenn Kasten
58f41c3b76 Merge "MidiManager: fix double BTLE callback"
am: bbf34d0bd1

* commit 'bbf34d0bd1bc4f85c9af614291925f5da1fa0459':
  MidiManager: fix double BTLE callback
2015-11-02 23:01:49 +00:00
Glenn Kasten
350dc16475 Merge "MidiService: update listener with current status when registered"
am: d4e9b9e4ac

* commit 'd4e9b9e4ac4196d37b0a5e59867f5a51018f4087':
  MidiService: update listener with current status when registered
2015-11-02 23:00:15 +00:00
Phil Burk
d11e59ec6b BluetoothMidiDevice: change write type to support JamStik
Temporarily use a Request instead of a Command so that the JamStik
will be properly enabled.

Bug: 24207964
Change-Id: I3d11732958c46e6039405b5969d5af0db8032fb9
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit 95129f50c68c734c5ebdf32ff6b8b9c63cc1ada7)
2015-11-02 13:31:29 -08:00
Phil Burk
ff23e1b4cb BLE-MIDI: change binding for BluetoothMidiService
Add a remote call addBluetoothDevice() using AIDL.
This was needed because onBind() is only called once.

Bug: 23219556
Bug: 23760886
Change-Id: Id7554ca55d596352d11dbd6ae3e403138a29c864
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit 7cd06c0b9e087a555d2c5dd4cab5b7eac8497526)
2015-11-02 13:31:29 -08:00
Phil Burk
2e48f1b96e MidiBluetoothService: add new device to HashMap
The HashMap is being used but devices never added to the map.

Bug: 23429459
Change-Id: I1da5305a56f5bd48e1c5d9345e721ea8dd2eed4e
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit e5f722e55c5708c2b48b8c9688c135e451225032)
2015-11-02 13:31:29 -08:00
Phil Burk
a471e2cf8c MidiManager: fix double BTLE callback
Stop openBluetoothDevice() from calling its callback twice.

Bug: 23218338
Change-Id: I2e738b22a124c0336c46bef05680a82ee1f59e79
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit 0ca998d79fe95ded26ec4ff0a1e0a8dc4802684b)
2015-11-02 13:31:29 -08:00
Phil Burk
3698fca0dc MidiService: update listener with current status when registered
This will give an app an opportunity to learn whether an input port is busy
before the user tries to connect and then fails.

Bug: 22825043
Change-Id: Ifede60f166dfe66ea15453044fce06f4a8452b18
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit b2355940e3e697deeecd1b6511cd5094f9dc553a)
2015-11-02 13:31:29 -08:00
Glenn Kasten
1662ccc975 Merge "Update AudioManager.getProperty documentation" 2015-11-02 19:55:37 +00:00
Glenn Kasten
0b986af895 Update AudioManager.getProperty documentation
Change-Id: I004bfdbbac9b0897931fa206bff865bdb600ebf6
2015-10-30 18:27:14 -07:00
Glenn Kasten
a217f8f9ca Explain ENCODING_PCM_FLOAT
Change-Id: Icf680f65f07023ca6e416a1ef6067132daf607b9
2015-10-30 18:27:02 -07:00
Dongwon Kang
082aed1ab4 MediaBrowser: Handle onServiceConnected/Disconnected in the given thread
The class assumes that the member variables are accessed in the same thread
when the class was created, but onServiceConnected/Disconnected is called
in the main thread according to the documentation.

Bug: 25307613
Change-Id: I86b63cc45fbc6995cedce39f5c151e99f76172d0
2015-10-29 00:35:01 +00:00
Dongwon Kang
ec7bf63d59 MediaBrowser: Fix a wrong ISE message
Change-Id: Ic0b376bdc52dd01d9d687468104ffe6a797adb30
2015-10-28 00:57:47 +00:00
Phil Burk
2cce579ed2 Merge "MIDI docs: add missing bracket" 2015-10-26 20:26:11 +00:00
Phil Burk
908d5bc82e MIDI docs: add missing bracket
The example code for openDevice() was missing a close bracket.

Bug: 25283941
Change-Id: I8fac6a6dee2393125ad4e057cb857fe21e43b491
Signed-off-by: Phil Burk <philburk@google.com>
2015-10-26 11:41:11 -07:00
Wei Jia
92a1b8cab2 am 559f28ec: am d32df662: am de612dc1: MediaPlayer: remove obsolete function setPlaybackRate from comments.
* commit '559f28ec67636f7bed82550be7590db46b47f1d0':
  MediaPlayer: remove obsolete function setPlaybackRate from comments.
2015-10-13 22:02:44 +00:00
Wei Jia
d32df6623e am de612dc1: MediaPlayer: remove obsolete function setPlaybackRate from comments.
* commit 'de612dc1d10d25e017ac911d0e7cca6709bdbb96':
  MediaPlayer: remove obsolete function setPlaybackRate from comments.
2015-10-13 21:47:04 +00:00
Wei Jia
de612dc1d1 MediaPlayer: remove obsolete function setPlaybackRate from comments.
Bug: 24260668
Change-Id: I20733e52dbd2dab5eb10b4607a1c1aadb93a1332
(cherry picked from commit cd860ac06ca7a46e9638dd741ba731f066705eb5)
2015-10-13 21:31:22 +00:00
Daichi Hirono
85f7078f8b Add constans for MTP event codes.
BUG=23368533

Change-Id: I922eb9a26812a44780ba81b8a391be45852cad08
2015-10-13 12:49:16 -07:00
Phil Burk
246b66cbcb am 1bc47a6e: am bfaa71bb: am 8e82755d: Merge "BluetoothMidiDevice: change write type to support JamStik" into mnc-dr-dev
* commit '1bc47a6e7020799ae7eb5ee3e91bc452144a3d64':
  BluetoothMidiDevice: change write type to support JamStik
2015-10-13 18:58:26 +00:00
Phil Burk
bfaa71bb31 am 8e82755d: Merge "BluetoothMidiDevice: change write type to support JamStik" into mnc-dr-dev
* commit '8e82755dfdfee837cb73d3db3f6319301d2a5903':
  BluetoothMidiDevice: change write type to support JamStik
2015-10-13 18:43:35 +00:00
Phil Burk
8e82755dfd Merge "BluetoothMidiDevice: change write type to support JamStik" into mnc-dr-dev 2015-10-13 18:36:13 +00:00
Phil Burk
61cf82778f am 92ae0a54: am 7bbb6fed: am 977fe03b: BLE-MIDI: change binding for BluetoothMidiService
* commit '92ae0a5480f8ac2107688bf2f6bb58d49cb52bd1':
  BLE-MIDI: change binding for BluetoothMidiService
2015-10-13 18:21:44 +00:00
Phil Burk
7bbb6fedbc am 977fe03b: BLE-MIDI: change binding for BluetoothMidiService
* commit '977fe03b36a7783f9cee8497efe550a69b128473':
  BLE-MIDI: change binding for BluetoothMidiService
2015-10-13 18:10:29 +00:00
Ronghua Wu
f807c4fc9e am c2fd35f7: am 57c332bd: am c024de3c: media: ignore null InputStream
* commit 'c2fd35f7ae51d83b3d8f7f46c70e351bf0f18235':
  media: ignore null InputStream
2015-10-13 15:50:57 +00:00
Ronghua Wu
57c332bd4a am c024de3c: media: ignore null InputStream
* commit 'c024de3c946c18e8e4799eb8d372fdec3146f8cf':
  media: ignore null InputStream
2015-10-13 15:40:48 +00:00
Phil Burk
977fe03b36 BLE-MIDI: change binding for BluetoothMidiService
Add a remote call addBluetoothDevice() using AIDL.
This was needed because onBind() is only called once.

Bug: 23219556
Bug: 23760886
Change-Id: Id7554ca55d596352d11dbd6ae3e403138a29c864
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit 7cd06c0b9e087a555d2c5dd4cab5b7eac8497526)
2015-10-13 15:40:03 +00:00