26436 Commits

Author SHA1 Message Date
Dianne Hackborn
c352722e8a Ignore small time changes in alarm manager.
It turns out switching to the new kernel alarm
reporting causes lots and lots of spurious flags
that the clock has changed.  The alarm manager
would blindly trust these, thinking the world has
changed on it and recomputing everything and reporting
this to everyone else.  This was expensive.

We now verify that the time has changed sufficiently
that it is worth caring about.  This is basically the
same algorithm that battery stats was using to avoid
recording small clock changes, so we are really just
pushing this down into the alarm manager and can now
remove that from battery stats.

Also since we are getting these so much, make use of
the other information in about the wakeup that tells us
if an alarm went off to avoid doing anything if it didn't.

Change-Id: I6f4f4226db6eb2b38ca73860786e7cf7c9136cc3
2015-05-13 17:44:05 -07:00
Jorim Jaggi
6a587acd1d Merge "Fix fingerprint for multiuser" into mnc-dev 2015-05-14 00:36:03 +00:00
Svet Ganov
67b7ec2887 Merge "Access mock location is no longer a runtime permission - framework" into mnc-dev 2015-05-13 23:45:23 +00:00
Jorim Jaggi
aa4d32add7 Fix fingerprint for multiuser
Change-Id: Iab18c4de9764da1a65490b186b33535f8e79e1e5
2015-05-13 16:35:56 -07:00
Fabrice Di Meglio
fe112e7b38 Merge "Add IntentFilter auto verification - part 10" into mnc-dev 2015-05-13 23:20:47 +00:00
Fabrice Di Meglio
649efc68cb Add IntentFilter auto verification - part 10
- tune Intent resolution candidates filtering: remove the undefinedList
from the results and then add it again it there is no more candidates.

See bug #19628271

Change-Id: I9ab077f6a431367be8bab30c134d34e1e7ac51ed
2015-05-13 16:17:11 -07:00
Svet Ganov
f7e9cf4fb4 Access mock location is no longer a runtime permission - framework
The access mock location is no longer a runtime permission. It is a
signature protected one that apps cannot get but the fact they request
it means they want to inject location into the system. Now the user
gets to choose the current mock location app in developer options from
the apps that request the mock location permission. The access to mock
location is no longer guarded by the permisson but from a new app op
which is off by default and the settiings UI sets it to enabled only
for the currently selected mock location app.

bug:21078873

Change-Id: I19e3f9dc7c7de82eab46b30fec1abfbca54a0e59
2015-05-13 15:37:21 -07:00
Nick Kralevich
9831fad676 Merge "Modify how USB connections are handled." into mnc-dev 2015-05-13 22:31:57 +00:00
Jorim Jaggi
645edef483 Merge "Make sure the app can draw a frame before unlocking" into mnc-dev 2015-05-13 22:13:27 +00:00
Nick Kralevich
fcf10f7c12 Modify how USB connections are handled.
* Introduce a new "charger only" mode. In this mode, MTP is disabled,
and no file transfers can occur.
* Make charger only mode the default.
* Modify "persist.sys.usb.config" so it now only holds the adb status.
* Make the USB settings non-persistent. Unplugging the USB connection will
reset the device back to "charger only" mode.
* Fixup wording per UI guidelines.

TODO: Re-implement MDM restrictions for USB / MTP access controls.

Bug: 18905620
Change-Id: I99a50d9132a81e98187f431166fd9fef4d437e4f
2015-05-13 14:28:13 -07:00
Jorim Jaggi
827e0facfe Make sure the app can draw a frame before unlocking
- The mechanism to stop windows drawing while window animator was
animating was somehow flaky. It relied on the fact that the client
would call relayout() whenever the animating state changed. This is
mostly the case, but not for lockscreen animations. Instead, we now
use a push model, where window manager tells the app that the state
has changed.
- In addition, it only stopped drawing if that window was animating,
but then only resumed drawing after all windows have finished
animating. Now, we do this per window, so we only stop drawing for
windows that are currently animating.
- We resume the top activity now at the very beginning of the
unlocking sequence. This gives the app a chance to draw a frame
before the user sees anything. If it's to slow, then we just use the
outdated framebuffer.

Bug: 19964562
Change-Id: Ifef8abd189a3146d854b81b9b948861e4d38c155
2015-05-13 14:23:05 -07:00
Kenny Guy
467eb0566f Merge "Allowing profile to set a subset of keyguard restrictions." into mnc-dev 2015-05-13 21:07:17 +00:00
Jorim Jaggi
131a19ee6f Merge "Persist fingerprint names" into mnc-dev 2015-05-13 20:32:31 +00:00
Jorim Jaggi
ee77cebc1a Persist fingerprint names
Bug: 20469328
Change-Id: I8f4a988687bfb78c36cc7cf187103a9d93ed4535
2015-05-13 13:25:26 -07:00
Julia Reynolds
396d944001 Merge "Remove initiator name param." into mnc-dev 2015-05-13 20:14:44 +00:00
John Spurlock
2047ce8240 Merge "Zen: Serialize notify conditions calls, defer subscription." into mnc-dev 2015-05-13 19:06:10 +00:00
Amith Yamasani
59a5733adf Merge "Track app idle history and dump it" into mnc-dev 2015-05-13 18:52:30 +00:00
Amith Yamasani
0a11e69428 Track app idle history and dump it
"dumpsys usagestats history" will show the
active state of each app for the last 100 hours,
if the device hasn't rebooted.

Bug: 20066058
Change-Id: I703e5bc121298e4363c202da56fffb0b8534bcaf
2015-05-13 11:49:35 -07:00
John Spurlock
a7d92b19c0 Zen: Serialize notify conditions calls, defer subscription.
- Don't subscribe/unsubscribe to new rules until the config has
   been set, avoids race conditions.
 - Process all condition updates on the same thread.
 - Add the schedule provider's next alarm state to dumpsys.

Bug: 21111868
Change-Id: I389f4a4905a56d6c976f01408f48f87230109aba
2015-05-13 14:48:02 -04:00
Chad Brubaker
83ce095c84 Add keystore onUserAdded/Removed methods
(cherry-picked from commit 31c2897105e6d71f8e6edeab312d2147bbdbaeb1)

Change-Id: I73fe9344ec5660e58425d5c85d14381820533d57
2015-05-13 10:57:42 -07:00
Wei Liu
8e4799ad45 resolved conflicts for merge of f0c4f0dd to mnc-dev
Change-Id: I16df088016c010aa25ee73ea8e68b3db8c0449e3
2015-05-13 09:57:33 -07:00
Stefan Kuhne
4d89374483 Merge "Ensure activity visiblity when moving task" into mnc-dev 2015-05-13 16:04:46 +00:00
John Spurlock
e1d0188b69 Merge "Zen: Map external ringer mode = silent to zen = alarms." into mnc-dev 2015-05-13 15:49:32 +00:00
Yohei Yukawa
05fe90c10b Merge "Show IME switcher also when hardware keyboard is connected." into mnc-dev 2015-05-13 15:25:22 +00:00
John Spurlock
05715ecd4c Zen: Map external ringer mode = silent to zen = alarms.
Bug: 21109517
Change-Id: I0e9506dad05ce4edf709ee879367b9f6aeba8dfd
2015-05-13 11:19:19 -04:00
John Spurlock
e7a835bc9d NoMan: Specify all users for noman broadcasts.
Change-Id: I347bc25b09506dd5fd695e68f23e9654bab8103c
2015-05-13 10:47:05 -04:00
Stefan Kuhne
54714cd21e Ensure activity visiblity when moving task
There was a visibility problem when multiple already running
activity got resized at the same time.
Only the last activity launched that got focus was shown and all others
were not.

The problem arose when a new ActivityStack got created and the
(existing) window got attached which led to the divergence of the
visibility states in different objects. The WindowState thinks
that it is visible, but the AppWindowToken thinks that it is not.
Subsequent calls to WindowState::ShowLw ignore calls to show the window
and the application logic enters the GONE state until it recieves focus.

Bug: 20692085

Change-Id: Ifc0e3686398ccd1d1ff32e1a266163b8db5b7f26
2015-05-13 14:07:57 +00:00
Lorenzo Colitti
de803d3af5 Merge "Fix a race when removing from LegacyTypeTracker." into mnc-dev 2015-05-13 06:31:38 +00:00
Jeff Sharkey
44b4add4ce Merge "New "sm" shell tool to call StorageManager." into mnc-dev 2015-05-13 05:27:30 +00:00
Amith Yamasani
3fec527782 Merge "Allow exemption to idle apps at periodic intervals" into mnc-dev 2015-05-13 01:22:58 +00:00
Svet Ganov
221ffb2662 Merge "Runtime permissions for system components not revokable - framework" into mnc-dev 2015-05-13 00:17:46 +00:00
P.Y. Laligand
ba4d9162ba Merge "DO NOT MERGE - Allowing only a subset of display attributes to get overridden." into mnc-dev 2015-05-13 00:15:11 +00:00
Svet Ganov
b3f22b48bb Runtime permissions for system components not revokable - framework
Change-Id: I5b1d7bb1618ffa8d1231618ece47d0905c82f7bf
2015-05-12 16:49:19 -07:00
Amith Yamasani
520d8f2ac6 Allow exemption to idle apps at periodic intervals
Triggers are device idle mode changing as well as
internal delayed message handlers.

Bug: 20066058
Change-Id: I0627cfbcc16cfc2b8ac7d298fd2c681a5a6571dd
2015-05-12 16:08:50 -07:00
Jeff Sharkey
7d2af54a98 New "sm" shell tool to call StorageManager.
Surface basic StorageManager commands through shell tool, like
simple listing of disks and volumes, and commands like mounting and
partitioning.

The output is designed to be parsed by host-side testing tools,
instead of relying on fragile dumpsys parsing.

Bug: 19993667
Change-Id: I993e92ecf57996678965945f0ae648b392a77ea2
2015-05-12 15:52:43 -07:00
Yohei Yukawa
c6c7cd2736 Show IME switcher also when hardware keyboard is connected.
As per discussion with UX team, we start showing IME switcher UI
not only when there are multiple IMEs are enabled but also when
a hardware keyboard is connected.

This CL also simplifies needsToShowImeSwitchOngoingNotification()
by renaming it with shouldShowImeSwitcherLocked() and unifying
related condition checking into that method.

Bug: 19496012
Change-Id: Id44724a2a46190382c283a52ece8edffb740807d
2015-05-12 15:05:45 -07:00
Mike Lockwood
62975ae43d Merge "MidiManager: Address API Council feedback:" into mnc-dev 2015-05-12 22:02:45 +00:00
Jinsuk Kim
6dda58e7ac Merge "CEC: Let playback device send <Standby> upon power off" into mnc-dev 2015-05-12 21:34:31 +00:00
Adrian Roos
51cfdd622f Merge "Only dispatch systemUiVisibility when it actually changes" into mnc-dev 2015-05-12 21:16:24 +00:00
Adrian Roos
389beec68d Only dispatch systemUiVisibility when it actually changes
Bug: 19000727
Change-Id: I9302746281188186d18256d45fee681bd2ab50d5
2015-05-12 14:12:40 -07:00
Mike Lockwood
7eb441cb4a MidiManager: Address API Council feedback:
Rename MidiDeviceInfo.getPortList() to getPorts()

Rename MidiManager.getDeviceList() to getDevices()

Rename MidiReceiver.onReceive() to onSend()

Replace MidiManager.DeviceOpenCallback and BluetoothOpenCallback
with new interface MidiManager.OnDeviceOpenedListener

Add MidiSender.onConnect() and onDisconnect()

Add MidiReceiver.onFlush()

Ensure that MidiReceiver max message size is immutable

Bug: 21044677
Change-Id: I7711734a45e831e9744849a6f569e906feff9f80
2015-05-12 13:39:56 -07:00
Jeff Sharkey
bf6fbb0040 Merge "Ignore abandon after install relinquished." into mnc-dev 2015-05-12 20:22:44 +00:00
Jeff Sharkey
497c05218a Ignore abandon after install relinquished.
We recently changed the install flow to fully dexopt before renaming
the staging directory.  This exposed the ability for the session owner
to abandon and destroy the stage contents while dexopt was still
happening.

Due to SELinux rules, the abandon would fail to clean up the stage
directory, and PackageManager would "successfully" rename and install
that stage, which now only contained the oat/ directory.

To avoid this case, we now ignore abandon requests once we've passed
the "point of no return" and relinquished our stage over to
PackageManagerService.

Bug: 20175072
Change-Id: I4ad5b1eba0e38f1315b8330bd95be6e3bc6c635a
2015-05-12 13:21:16 -07:00
Dianne Hackborn
f931e3c284 Merge "Always use REGISTERED_ONLY when appropriate." into mnc-dev 2015-05-12 20:17:19 +00:00
Wale Ogunwale
f99bde92c2 Merge "Determine if TaskRecord is privilaged from creating ActivityInfo." into mnc-dev 2015-05-12 20:03:56 +00:00
John Spurlock
e66ba47366 Merge "Zen: Ringer mode integration fixes." into mnc-dev 2015-05-12 19:54:48 +00:00
Chris Craik
6af2857ae0 Merge "Revert "Fix build - Revert "Revert "Use default constructor to get anti-aliasing"""" into mnc-dev 2015-05-12 19:40:26 +00:00
Wei Liu
f0c4f0ddb6 am 3d76e2f3: Merge "Create GpsLocationProvider only if GPS is supported." into lmp-mr1-modular-dev
* commit '3d76e2f35ae5e4557979c053aa35c3cf3b02f1c3':
  Create GpsLocationProvider only if GPS is supported.
2015-05-12 19:06:06 +00:00
Wale Ogunwale
a7afaa211d Determine if TaskRecord is privilaged from creating ActivityInfo.
It is not reliable to try to get it from the process since it might
not be running yet.

Bug: 20016740
Change-Id: If3e748a97015c6623741d9374ab4ed1ed5f4b11f
2015-05-12 11:54:42 -07:00
Wei Liu
3d76e2f35a Merge "Create GpsLocationProvider only if GPS is supported." into lmp-mr1-modular-dev 2015-05-12 18:54:11 +00:00