• Home
  • History
  • Annotate
  • only in /frameworks/base/packages/SystemUI/src/com/android/systemui/media/
History log of /frameworks/base/packages/SystemUI/src/com/android/systemui/media/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0a637ecd1b082c93bfbcfecfae5b051573fed1c3 20-Mar-2017 Jean-Michel Trivi <jmtrivi@google.com> NotificationPlayer: fix typo in log

Test: n/a
Change-Id: I585f6ad39ef6dc0a93651deae6ca50051f732a1b
otificationPlayer.java
5cd7d7f7a4525d8c277f307ccc79dbde3af3fa08 17-Mar-2017 Jean-Michel Trivi <jmtrivi@google.com> NotificationPlayer: fix error listener, sync in playback thread

The error and completion listeners should be set before
MediaPlayer.prepare() is called, in case of an error
during prepare.
Move the sleep to synchronize the playback of the notification
and the ducking from the MediaPlayer to the playback thread.

Test: play a notification during media playback
Bug: 35855841
Change-Id: I42f01f485f533c1cc84b9d927f0dc594cdb7ec8f
otificationPlayer.java
99489ccf740d369193a8ffc7eeb4bbde6919bd65 26-Jan-2017 Jean-Michel Trivi <jmtrivi@google.com> Notification playback synchronized with audio focus

PlayerProxy: more control options (pan, delayed start),
remove exceptions in method signatures.
Use delayed start on notification playback for better sync
between media apps and notifications
Disabled for now: support for AudioService (through
MediaFocusControl and PlaybackActivityMonitor) to enforce
audio ducking of focus owners losing audio focus with
AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK, and who don't
play audio that has a content labelled as CONTENT_TYPE_SPEECH.
This feature will be enabled when setting a VolumeShaper
on a player works.

Test: play music and play notification
Bug 30258418

Change-Id: I4e4d911645306bbde17f74288f3b61781fe0e3fe
otificationPlayer.java
9aeed0cd6f47359ec64e12ded06863ab272d712e 20-Jan-2017 Jean-Michel Trivi <jmtrivi@google.com> Notification player: do not use stream types

Don't go through stream types for the attributes of the
notification to play when requesting focus

Test: play notification with usage USAGE_NOTIFICATION_EVENT, verify
that usage is communicated to MediaFocusControl
Bug 30258418

Change-Id: Ieaab969d84728b04a6f34aa8a02cf18ba22d1aca
otificationPlayer.java
783ee0ca8707a4e2977d1afd42cd01a3885a06e6 06-Mar-2016 Jeff Sharkey <jsharkey@android.com> Ask RingtonePlayer to open data for caching.

When setting default ringtones, RingtoneManager now caches the
selected media for playback before the device is unlocked. However,
this API hasn't historically required the caller to hold storage
permissions.

To keep this working, we attempt to delegate ringtone access over
through RingtonePlayer, which is what we do for playback. However,
because we're caching the real ringtone bits now, we need to be much
more careful about the PFDs we're willing to return. This change
requires that they be in external storage, and that they have the
ringtone/alarm/notification bit set.

Bug: 27366059
Change-Id: I59c2adc1d1250a3eac281f190f35a7cb3119967b
ingtonePlayer.java
c0d7058b14c24cd07912f5629c26b39b7b4673d5 29-Jan-2016 Winson <winsonc@google.com> Referencing static interpolators.

Change-Id: I5d2292016e869ed533f5873e373a1eccce651fc5
ediaProjectionPermissionActivity.java
e4de5a0d3b6e0c897c1cea0912b58e11db962365 23-Sep-2015 Xiaohui Chen <xiaohuic@google.com> Cleanup OWNER references.

Bug: 19913735
Change-Id: I2150c6baaab80fe11312e4401394a2a8da52e595
ingtonePlayer.java
0827910121e9f40f17f2d3851cdf00ea0aea39a3 26-Aug-2015 Raph Levien <raph@google.com> am 4ba9752c: am bf375cd4: am 04531d5c: am f03c090f: am 8304c6c0: Merge "Truncate and ellipsize app name if too long for dialog." into mnc-dev

* commit '4ba9752c33559db2124eeb48ad659bb4b23e3032':
Truncate and ellipsize app name if too long for dialog.
58950a9476070b47bc0f2ae93e7a24ab0444c3f3 25-Aug-2015 Michael Wright <michaelwr@google.com> Truncate and ellipsize app name if too long for dialog.

If the given app name is too long for the permissions dialog, then
it can push the warning that the application will be able to record
the screen below the fold, letting the app basically set its own
dialog message in a way that a user would be difficult to detect as
fraudulant.

Bug: 23345192
Change-Id: If5881ca75d5c155ef5174351d245dbc3abdaa584
ediaProjectionPermissionActivity.java
a25f6fcfed280136a16ce5800fcaabae17291dd7 21-Aug-2015 Jean-Michel Trivi <jmtrivi@google.com> NotificationPlayer supports MediaPlayer errors

If an error is reported while trying to play a notification,
behave as if the playback had completed.

Bug 21093153

Change-Id: Iedc7691d0b8f4d68ad75cb04292a5d7d9350552f
otificationPlayer.java
4a05bbcd38604cbbcbac66af1abc69ecffddad8b 08-Aug-2015 Sungmin Choi <sungmin.choi@lge.com> Fix to check the incoming userid argument for RingtonePlayer

In PowerNotificationWarnings, where it dispatches notifications
with UserHandle.ALL:
mNoMan.notifyAsUser(TAG_NOTIFICATION, R.id.notification_power, n, UserHandle.ALL);
The fix is to have RingtonePlayer check the incoming userId argument to playAsync(),
and change USER_ALL to USER_OWNER.

BUG=22516181
BUG=22992637
Change-Id: Ia3f8aaa2bee7fb15c24542e2331b2bc5a877e715
ingtonePlayer.java
68de157b7810be72a283b9e0db292895d96988a9 20-Jul-2015 Todd Kennedy <toddke@google.com> Use RingtonePlayer to get ringtone title

Instead of requiring every application that calls Rintone.getTitle()
to request android.permission.READ_EXTERNAL_STORAGE, pass the call
through to the system UI process. We only do this for media store
URIs.

Bug: 22067670
Change-Id: I38cf3fb8d769ef6984c41a7b04afbbd4c57175ce
ingtonePlayer.java
462045e89aed0163a4681b8221f0df3f26900136 30-Jun-2015 Jean-Michel Trivi <jmtrivi@google.com> Ringtone: add support for volume control and looping

Bug 22182606

Change-Id: Ied910b9fe02a5da9c4822a107ee884677c8b4991
ingtonePlayer.java
b0cf7ea65df8aad45556d2336e9ebae7d6da94b4 08-Jun-2015 Dongwon Kang <dwkang@google.com> Make MediaProjectionPermissionActivity secure with setFilterTouchesWhenObscured()

Bug: 21485727
Change-Id: I6b639464a3543dec4d7a248bdd8042b2c3872fac
ediaProjectionPermissionActivity.java
08c7116ab9cd04ad6dd3c04aa1017237e7f409ac 28-Feb-2015 John Spurlock <jspurlock@google.com> Remove unused imports in frameworks/base.

Change-Id: I031443de83f93eb57a98863001826671b18f3b17
ediaProjectionPermissionActivity.java
3d332f4e67a484abe597576bf329d89655afe720 24-Feb-2015 John Spurlock <jspurlock@google.com> MediaProjectionPermissionActivity: Fix NPE.

Avoid dismissing a null dialog.

Bug: 19492919
Change-Id: I6642bb5194d9818ff3db1266c7c78ed752e23ecf
ediaProjectionPermissionActivity.java
752aee8a6f868011dea1d1bb4f582a2531d76d47 25-Nov-2014 Adrian Roos <roosa@google.com> Fix projection permission dialog layering

Bug: 18392920
Change-Id: I32c2c61339cbea9edd4a7a3f80365213fb4a69ac
ediaProjectionPermissionActivity.java
81f871e2b96125d57b76c07169e868e516443794 07-Aug-2014 Jean-Michel Trivi <jmtrivi@google.com> Add support for AudioAttributes in android.media.Ringtone

Deprecate use of stream types.
Map deprecated API to AudioAttributes.
Add new methods to specify AudioAttributes on a Ringtone instance.

Bug 16790748

Change-Id: Ifb3c2e838e1f119614459ad7d71d83a4d7c9ffdb
otificationPlayer.java
ingtonePlayer.java
c39d47a8e7c74bd539104b0efab898ef6fc43ddf 09-Jul-2014 Michael Wright <michaelwr@google.com> Add MediaProjection APIs.

The new MediaProjection infrastructure allows the system to hand out
tokens granting the ability to capture the screen's contents, audio,
etc. at a granular level. It's intended to be used both for screen
casting, via the cast APIs, as well as screen sharing via third party
applications.

The screen sharing case is implemented, but all of audio capturing
is still forthcoming.

Change-Id: I4b24669bed7083e11413c10ed8d6b025f5375316
ediaProjectionPermissionActivity.java
de84f0e77ea2bf713d15c290264059a413c2486a 12-Jun-2013 John Spurlock <jspurlock@google.com> Organize the imports in systemui.

To follow android conventions, more importantly to remove the
unused.

Change-Id: I75881718e84360a579a3b02c26489ad250bc9227
otificationPlayer.java
cd686b5b6d4166b510df8e32138479a9559bc117 05-Jun-2013 John Spurlock <jspurlock@google.com> Migrate systemui Slog calls to Log

Change-Id: Ib6734c85960f06fed646599565b8eeba26b9e98e
ingtonePlayer.java
b8bacccfc159fe204e5b09b52de55f8ba853f713 05-Jun-2013 John Spurlock <jspurlock@google.com> Remove a few non-public dependencies.

Maps, CharSequences, MotionEvent.copy

Change-Id: I97e15b0f9530623f65e061674bd7ec56d8fefa3e
ingtonePlayer.java
562e65bb19149d3f1d411d6665e7ae471e1e62bb 13-Feb-2013 Jean-Michel Trivi <jmtrivi@google.com> Remove obsolete imports

Change-Id: I67d357a1b0bac89447b1e237f61dd18aea7b912b
otificationPlayer.java
6313cbe1d05c60afae3f8a5d2460c5cf4714fa1d 13-Feb-2013 Jean-Michel Trivi <jmtrivi@google.com> Fix AudioFocus for back-to-back notifications

A single instance of NotificationPlayer will play notifications
back-to-back, and was, for each requesting AudioFocus. But as
a new notification was about to be played, its accompanying
thread was terminated, and the completion listener was never
called, and therefore AudioFocus was not released (e.g. two
requests for one release).
The fix consists in requesting AudioFocus only once and
abandonning it when the only reported completion is received.
Added a FIXME note about a better solution to be implemented.

Bug 7680947

Change-Id: Ica9d5c1eb5d57c89ceebe66282af69f0f7d43667
otificationPlayer.java
97ad2cd1a80eef7db0fe19f15c417de4fa752519 06-Feb-2013 Jean-Michel Trivi <jmtrivi@google.com> No AudioFocus for notifications when media played remotely

Don't use AudioFocus when playing a notification when media is
playing remotely. This behavior may be accompanied by
rules in the device's audio policy to not route the notifications
to the remote display.

Bug 7485803

Change-Id: I8b96aa59cace75f6e9a0e73799ef8c75e9ee97aa
otificationPlayer.java
65c4a2b26cd8776b0927e9b0e07ecf53bd31b627 26-Sep-2012 Jeff Sharkey <jsharkey@android.com> Multi-user ringtone playback.

Change RingtonePlayer to open content:// Uris based on requesting
UserHandle. Grant SystemUI visibility to all emulated storage so
it can play ringtones for apps without READ_EXTERNAL_STORAGE.

Resolve canonical file:// Uris before passing out of source app,
replacing any /emulated_legacy/-style paths with user-specific
variant so they can be opened by SystemUI. Calling for RemoteViews,
Ringtones, and Notifications.

Bug: 7202982
Change-Id: Ibf0eca8df80c1486711144a7b648f464aadfe099
ingtonePlayer.java
b6e404a95f31f4681265eb53d2b7969f900151cc 15-May-2012 Jeff Sharkey <jsharkey@android.com> Disable verbose RingtonePlayer debugging.

Bug: 6491451
Change-Id: I41119599b5bbcc1a2bb717b3673e01e4b5366b9c
ingtonePlayer.java
098d580cc2bb6c0891c756a4e5230c6c6b0d2376 27-Apr-2012 Jeff Sharkey <jsharkey@android.com> Migrate ringtone playback to SystemUI.

Introduce IRingtonePlayer, which handles playback for both Ringtone
objects and Notifications. SystemUI now hosts this player, which it
registers with AudioService. It also keeps MediaPlayer instances
warm, and cleans them up after stop() or Binder death.

Move both Ringtone and NotificationManagerService to play back audio
through this new interface.

Bug: 6376128, 6350773
Change-Id: I1dcb86d16ee3c4f07cdb2248d33dcff4ead3609a
otificationPlayer.java
ingtonePlayer.java