Commit Graph

25043 Commits

Author SHA1 Message Date
Mike Lockwood
3b7664589b Make MidiSender and MidiReceiver abstract classes, rename MidiReceiver.post() to receive()
Change-Id: I1cef3bd48ca0acf2968c9de223f78445f3434404
2015-03-04 20:38:37 -08:00
Mike Lockwood
20821ecbe8 Eliminate MidiPort base class for MidiInputPort and MidiOutputPort
Change-Id: I628c0468ac980eee909add53a4d6e55e9b358603
2015-03-04 16:15:45 -08:00
Mike Lockwood
c623ec973b Merge "MidiManager: Virtual MIDI devices are now implemented as Services" 2015-03-05 00:01:33 +00:00
John Spurlock
75328b703f Merge "Audio: Remove the concept of master volume." 2015-03-04 22:59:41 +00:00
John Spurlock
ee5ad729b9 Audio: Remove the concept of master volume.
- Remove two config resources (use master volume, and volume ramp).
- Remove master volume adjustments / getters / intents.
- Retain @hidden setMasterMute, needed for device admin
- Remove master volume logic in AudioService.
- Remove master volume logic in VolumePanel.
- Rename "getMasterStreamType" to "getUiSoundsStreamType" to avoid confusion.

Bug: 19582978
Change-Id: Id02c8fa4898cff3b913147f5ac1b4038e2e7cc24
2015-03-04 17:51:44 -05:00
Julia Reynolds
e925440a55 DOs can clear the DI; rehide hasUserSetupCompleted.
Bug: 19230954
Change-Id: I97467229b23f3c9be1c3c4fff1c888a812f14a95
2015-03-04 17:36:00 -05:00
Mike Lockwood
11fd96d6ff MidiManager: Virtual MIDI devices are now implemented as Services
To implement a virtual MIDI device, include a subclass of MidiDeviceService in
your application.  This service is identified by an intent filter and meta-data
in the application's manifest to allow the MIDI manager to register the virtual device
without actually running the application. Instead, the application's MidiDeviceService
subclass is started on demand when MIDI manager clients want to open the device.

Here is an example of how the MidiDeviceService might be described in the application manifest:

    <service android:name="VirtualDeviceService">
        <intent-filter>
            <action android:name="android.media.midi.MidiDeviceService" />
        </intent-filter>
        <meta-data android:name="android.media.midi.MidiDeviceService"
            android:resource="@xml/device_info" />
    </service>

and the device_info.xml meta-data:

<devices>
    <device manufacturer="Sample Manufacturer" model="Sample Model" private="false">
        <input-port name="my input port" />
        <output-port name="my output port" />
    </device>
</devices>

(note that the <input-port> and <output-port> names are not currently used, but support for these
will be added in a subsequent change)

Client's of the virtual device will bind directly to the hosting application's MidiDeviceService subclass.
To support this, MidiManager.openDevice() now returns the MidiDevice asynchronously via a callback.

This change also adds a utility class called MidiDispatcher, which is a MidiReceiver
that dispatches all data it receives to a list of other MidiReceivers.
We now use this internally in MidiInputPort and MidiDeviceServer, but developers
may use it for other purposes as well.

Change-Id: Ic3009f06d56f3d5edbd87de3f0c330b51a1c217d
2015-03-04 13:45:38 -08:00
Julia Reynolds
aa7e7318e3 Merge "Allow the device initializer to perform user setup tasks." 2015-03-04 19:01:31 +00:00
Chris Wren
d17696904d Merge "Remove spammy notification_cancel event log." 2015-03-04 18:40:21 +00:00
Amith Yamasani
f834c282aa Merge "Fix a regression in UsbDebuggingManager" 2015-03-04 18:04:02 +00:00
Amith Yamasani
f4a8df4c7e Fix a regression in UsbDebuggingManager
Catch NPE as well if socket object is null.

Bug: 19602060
Change-Id: I7cf9cb16abc3fde626170c1aefeba5fc91c5734f
2015-03-04 10:00:11 -08:00
Chris Wren
bddb5bc846 Remove spammy notification_cancel event log.
We also log when notifications are actually canceled,
so this only tells us how often clients cancel non-existent
notifications.  The answer: quite often.

Bug: 19599876
Change-Id: I812866cb080d51974d4db0b6e6b3eb50c3aeb560
2015-03-04 08:48:42 -08:00
Adrian Roos
62b65e4a8f Update immersive cling visuals
Also enables the swipe from top gesture for revealing
the navigation bar, even if the status bar is visible.

Bug: 19282730
Change-Id: I7b562c2f0f00ff3f05b8b1e44657efe79b45f9c7
2015-03-04 17:28:14 +01:00
Julia Reynolds
20118f18c1 Allow the device initializer to perform user setup tasks.
A device initializer is an application that is allowed to run
during user provisioning on device owner devices. During
device provisioning (or, user provisioning of the first user
of the device), a device initializer is granted device owner
permissions. During secondary user provisioning, a device
initializer is granted profile owner permissions. Once
provisioning is complete for a user, all elevated permissions
are removed from the device initializer and the device admin
component of the app is disabled.

Bug: 19230954
Change-Id: Ib6725fb3b09bb21e4198a5dc0b445ccebb40b27e
2015-03-04 10:25:43 -05:00
Dianne Hackborn
7d088428f3 Merge "Add new "daily stats" tracking to battery stats." 2015-03-04 00:57:54 +00:00
Dianne Hackborn
d4a8af7b6a Add new "daily stats" tracking to battery stats.
Currently is only used for tracking the daily charge
and discharge rates.  We keep up to 10 days of data.

Change-Id: I54e29e35ff60d9277da9e476cdab22f4a6d540bf
2015-03-03 15:38:58 -08:00
Craig Mautner
4bd091414a am 5d3f00e3: am 358188f5: Merge "Change ActivityView startActivity state sequence" into lmp-mr1-modular-dev
* commit '5d3f00e38b84c107037de1250a6e55d89f84ef77':
  Change ActivityView startActivity state sequence
2015-03-03 22:25:13 +00:00
Nick Kralevich
1503655007 am 59e06d3a: am 98fdff61: am 56fde9e7: Merge "SELinuxPolicyInstallReceiver: Prevent partial or mixed policy updates."
* commit '59e06d3ab479ab04df84b783cb119f032549f492':
  SELinuxPolicyInstallReceiver: Prevent partial or mixed policy updates.
2015-03-03 22:24:26 +00:00
Craig Mautner
5d3f00e38b am 358188f5: Merge "Change ActivityView startActivity state sequence" into lmp-mr1-modular-dev
* commit '358188f5891f5645dbff4fd8cb1a3e7341371f74':
  Change ActivityView startActivity state sequence
2015-03-03 21:08:45 +00:00
Craig Mautner
358188f589 Merge "Change ActivityView startActivity state sequence" into lmp-mr1-modular-dev 2015-03-03 21:03:29 +00:00
Craig Mautner
b916836e8d Change ActivityView startActivity state sequence
Problems arise if an activity is started in an ActivityView when the
parent activity is not resumed. In particular the ActivityView can
be brought to the front in front of other activities that have been
started by the parent.

This change checks the state of the parent when the ActivityView is
starting and if it is not resumed, throws an Exception.

This change also removes the queueing up of Intents if the surface
does not exist when startActivity is called. Now, the owner of the
ActivityView is notified when the surface becomes available. If
startActivity is called before that notification an Exception will be
thrown.

Fixes bug 19147472.

Change-Id: I6712cf1929fe65c4238ce7f3feb4e8511ed97244
2015-03-03 10:15:21 -08:00
Nick Kralevich
59e06d3ab4 am 98fdff61: am 56fde9e7: Merge "SELinuxPolicyInstallReceiver: Prevent partial or mixed policy updates."
* commit '98fdff61dd651f52d36c0e88dcce8a04568b7cc7':
  SELinuxPolicyInstallReceiver: Prevent partial or mixed policy updates.
2015-03-03 17:08:50 +00:00
Nick Kralevich
98fdff61dd am 56fde9e7: Merge "SELinuxPolicyInstallReceiver: Prevent partial or mixed policy updates."
* commit '56fde9e70ef850ca7e3f076e52567f5c75b5e7da':
  SELinuxPolicyInstallReceiver: Prevent partial or mixed policy updates.
2015-03-03 17:02:22 +00:00
Christopher Tate
73570db59f Use scheduled job rather than periodic alarms for key/value backups
Instead of a runs-forever periodic alarm that drives key/value backup
passes, we instead schedule-on-demand a trigger job that will kick off
the pass after a batching interval.  The key semantic change is that
we now never wake for key/value backup work unless we've been explicitly
asked to do so.  We also use a rather longer batching interval than
was previously the case.

Bug 19536032

Change-Id: Ie377562b2812c9aeda0ee73770dfa94af6017778
2015-03-02 18:01:28 -08:00
John Spurlock
6611bfdaa4 Merge "AudioService: Fix typo/grammar in comment." 2015-03-03 00:02:15 +00:00
Shishir Agrawal
95e25a6b3c am 06e9147d: am c8e3784e: am 20a5df62: am bcced5b8: Merge "Fix incorrect condition for sub id check." into lmp-mr1-dev
* commit '06e9147d8a9e07aa06433f18323253f8659d27f9':
  Fix incorrect condition for sub id check.
2015-03-02 23:12:27 +00:00
Shishir Agrawal
06e9147d8a am c8e3784e: am 20a5df62: am bcced5b8: Merge "Fix incorrect condition for sub id check." into lmp-mr1-dev
* commit 'c8e3784e259a1c668193a6590570847c9cd9310b':
  Fix incorrect condition for sub id check.
2015-03-02 22:54:59 +00:00
Shishir Agrawal
c8e3784e25 am 20a5df62: am bcced5b8: Merge "Fix incorrect condition for sub id check." into lmp-mr1-dev
* commit '20a5df6205c3d57bfcb5b8e1454fb88c638c8ae3':
  Fix incorrect condition for sub id check.
2015-03-02 22:48:11 +00:00
Shishir Agrawal
20a5df6205 am bcced5b8: Merge "Fix incorrect condition for sub id check." into lmp-mr1-dev
* commit 'bcced5b834e49bf3a0b57a0009958ba061d31e76':
  Fix incorrect condition for sub id check.
2015-03-02 22:38:43 +00:00
Adam Lesinski
f55187767e Merge "Fix issue where pruned UsageStats files would not be removed from index" 2015-03-02 22:23:44 +00:00
Adam Lesinski
a4005662c7 Merge "Add generic "INTERACTION" event type to UsageStatsManager" 2015-03-02 22:22:58 +00:00
John Spurlock
bc82b12eb7 AudioService: Fix typo/grammar in comment.
Change-Id: I311fc5d7531464bbaeef5937c5ff2b757a8e675e
2015-03-02 16:15:26 -05:00
Adam Lesinski
3a0831bfe6 Fix issue where pruned UsageStats files would not be removed from index
This would cause an exception to be thrown when querying stats
that included a deleted file and cause only in-memory stats to be
returned.

This change now re-indexes after deleting files.

Furthermore, we continue reading UsageStats files in order
to return more useful data if some other issue (file corruption)
leads us to fail reading a file.

Change-Id: I4a52739624d68e719e3d7d324a0b16709a62ac7a
2015-03-02 13:06:46 -08:00
Adam Lesinski
978a1ed5aa Add generic "INTERACTION" event type to UsageStatsManager
This will allow for updating a package's last time used
property for packages that are interacted in ways other than
launching their activities (interacting with notifications, etc.)

Change-Id: Ic6f9519f46fa04abd37ea6fc9475bcd9ea721003
2015-03-02 12:54:14 -08:00
John Spurlock
7b91c55b3f Merge "Remove unused imports in frameworks/base." 2015-03-02 20:43:50 +00:00
John Spurlock
4b69ac70a1 Merge "AudioService: Migrate index map to SparseIntArray." 2015-03-02 20:07:04 +00:00
John Spurlock
2bb02ec6a9 AudioService: Migrate index map to SparseIntArray.
- Use SparseIntArray instead of a generic hash map.
 - Avoids unnecessary boxing/unboxing.
 - Avoids unnecessary allocation for iterator temp objects.
 - Provides deterministic dumping (by ascending device order).

Change-Id: If5ca5edd94af90cfed65ecbbbc1f4929f50ab6e9
2015-03-02 13:13:06 -05:00
Amith Yamasani
d65ed88144 Merge "Avoid NPE when quickly toggling USB debugging state" 2015-03-02 18:07:58 +00:00
Amith Yamasani
f6197e8fa2 Avoid NPE when quickly toggling USB debugging state
If you try to disable USB debugging before the socket
to listen is opened in the thread, it will end up
with an NPE.

Do some locking around socket creation and closing
to avoid this.

Bug: 18708503
Change-Id: Iac43e4806fff1e411772b1ba1a070d8a7c776fcb
2015-03-02 09:14:23 -08:00
John Spurlock
59dc9c1d19 AudioService: Fix typo in constant.
Change-Id: I66dba8ffbbe59ab82f97c989163db04741c9a1d1
2015-03-02 11:20:15 -05:00
John Spurlock
08c7116ab9 Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
2015-02-28 14:47:49 -05:00
Stephen Smalley
e9dc17233f SELinuxPolicyInstallReceiver: Prevent partial or mixed policy updates.
The current SELinuxPolicyInstallReceiver logic can yield a partial
or mixed (old and new) set of policy files under /data/security/current
if there is an error or a crash at certain points before completing
the installation of the update.

Rewrite the logic to avoid the possibility of such partial or mixed
policy updates by using rename on the entire directory of policy
files rather than operating on a per-file basis.  Also separate
the extraction of the policy files from the bundle into their own
temporary directory.  Make sure we delete any previous temporary directory
or backup directory before using them for this update.  Drop the
use of a symlink for /data/security/current altogether; it provides
no benefit.

Change-Id: I564af01c2c3ca1531c216013b8724c7511f32de8
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-02-27 16:07:55 -05:00
Jim Miller
ba67aee02c Add fingerprint settings support to the framework
- cleanup thread issue and simplify native FingerprintService methods
- add new permissions and enforce them
- add fingerprint hardware detection API

Change-Id: I87c2243ea2412061f1e85b044138480d0161bcdf
2015-02-27 12:03:32 -08:00
Mike Lockwood
238cba3593 Merge "Move ALSA utilities to com.android.internal.alsa package" 2015-02-27 18:42:13 +00:00
Edward Cunningham
690f78adf1 Fix UsageStats to report correct endTime from XML
Bug: 19529542
Change-Id: Iacb1a245a40c6b88ae15740797217f59d5fca1e6
2015-02-27 00:33:30 +01:00
Mike Lockwood
464c655871 Move ALSA utilities to com.android.internal.alsa package
Change-Id: Icbd45ec97a942e44e60f8d4ba0bb58c97f85b55f
2015-02-26 13:50:08 -08:00
Amit Mahajan
4c98b2cdd6 Merge "Adding logging to debug SignalStrength callback missing issue." 2015-02-26 19:00:05 +00:00
Dianne Hackborn
93ec05ca47 Merge "Rework voice interaction session lifecycle." 2015-02-26 18:59:57 +00:00
Amit Mahajan
6ba726f825 Adding logging to debug SignalStrength callback missing issue.
This is a temporary change. Needs to be reverted.

Bug: 19323020
Change-Id: Ifdc2b14f4da6cd5a28e85c3bce35ddf0e975b6f4
2015-02-26 10:52:49 -08:00
Wale Ogunwale
7659ce4ee8 Merge "Account for IME and screen decors when laying out a resized window." 2015-02-26 18:44:49 +00:00