27440 Commits

Author SHA1 Message Date
Robin Lee
f180fe31de Merge "Legacy VPN calls to require a userID" into mnc-dev 2015-07-10 19:05:38 +00:00
Paul Jensen
3b9ce37b51 Fix build break.
Automatic merge commit caused breakage due to someone else's
intervening change adding a call site of a function whose last
parameter I removed.  Function in question is
ConnectivityService.rematchAllNetworksAndRequests.
Changes that merged badly are 85cf78e and 8d48252.

Change-Id: I8fd32e1a187236a65c1b7c0ecdf17b817d108fd0
2015-07-10 12:29:23 -04:00
Paul Jensen
bbce221eec Merge "Fallback to Cellular if WiFi fails to validate" into mnc-dev 2015-07-10 15:51:38 +00:00
Paul Jensen
d8cdba0d71 Merge "Prepare some ConnectivityService logic for fallback to Cellular change" into mnc-dev 2015-07-10 15:51:23 +00:00
Paul Jensen
00c64f7ca5 Merge "Add android.net.CaptivePortal class for captive-portal-handling-app callbacks" into mnc-dev 2015-07-10 14:57:13 +00:00
Adrian Roos
83e9525c61 Merge "Fix premature clearing of clearable sysui flags" into mnc-dev 2015-07-10 01:24:48 +00:00
Svet Ganov
171fe6ac0a Merge "Add an API for apps to query if a permisison is denied by policy." into mnc-dev 2015-07-10 00:32:12 +00:00
Adrian Roos
4d8134c1b9 Merge "Fix black keyguard / missing status bar" into mnc-dev 2015-07-10 00:01:20 +00:00
Adrian Roos
01f2d1ac7e Fix premature clearing of clearable sysui flags
Fixes a bug where all clearable flags would be cleared even if
only a subset actually changes; new behavior is clearing only
the flags that actually got cleared.

Bug: 22331526
Change-Id: Icbb12121c977e48457692c054571521c6f6eb730
2015-07-09 16:22:24 -07:00
Todd Kennedy
d80cf9109a Merge "Allow codepath changes for new OTA packages" into mnc-dev 2015-07-09 23:17:40 +00:00
Adrian Roos
76d2fe4288 Fix black keyguard / missing status bar
The status bar window was stuck in the READY_TO_SHOW state
because it was not policy visible, whereas the policy
was waiting for the window to become HAS_DRAWN.

Now BarController also updates states if the window
is READY_TO_SHOW, which in turn allows the window to
become visible and HAS_DRAWN.

Bug: 22072099
Change-Id: I1836c276723ee2205d7d5759be079f02aaa23e2e
2015-07-09 16:09:48 -07:00
Dianne Hackborn
782d498268 Fix issue #22328792: Fix scalability issues in AssistStructure
We can now stream the AssistStructure across processes, avoiding
IPC size limitations for large structures.  There is also a new
API that gets called on the VoiceInteractionSession if there is
a failure retrieving the assist data.

Also fix issue #22351981: Runtime restart due to ANR in system server,
getting rid of a deadlock.

And also tweak object lifecycles to try to avoid keeping around
in an app the previous AssistStructure after we request a new one.

Change-Id: Ifb136a0d31a14e56a8db6b90768d9fc65557a17f
2015-07-09 14:06:47 -07:00
Jeff Brown
2a67840c3c Fix a bad merge.
Change-Id: Ib722459a25c189bb800eb85d48b80bdc91a2b7db
2015-07-09 13:36:41 -07:00
Jeff Brown
c1aebfa02c Merge "Clean up USB Manager and fix ADB." into mnc-dev 2015-07-09 20:03:29 +00:00
Jeff Brown
460a146eb8 Clean up USB Manager and fix ADB.
Moved functions which parse the USB functions list into one common
place on UsbManager.

Deleted the no longer supported USB_FUNCTION_MASS_STORAGE.

Ensured that the UserManager.DISALLOW_USB_FILE_TRANSFER rule is
consistently applied during user switch and when changing the
current USB functions and make sure it only affects MTP and PTP.

Collapsed the boot completed and user switched receivers to
ensure consistent ordering of side-effects.

Validate the list of functions passed to setCurrentFunction() so
that the separation of concerns is clearer.  It was somewhat
ambiguous as to whether functions such as ADB could / should be
enabled through that interface.  Improved the docs for clarity.

Fixed a bunch of broken stuff related to the USB config
persistent property (list of default functions) that could cause
ADB and other functions to not work at all.  Added new failsafes
to ensure that we reliably get back into a happy state.

Bug: 22206076
Change-Id: I02915ddfce7193a8f67a14f0d76bab22fc575dfa
2015-07-09 12:55:56 -07:00
Jorim Jaggi
3cc5c24b83 Merge "Fix assist for hardware long-press" into mnc-dev 2015-07-09 19:19:05 +00:00
Amith Yamasani
5d21f4168e Merge "Dispatch onUserSwitched callbacks on handler thread" into mnc-dev 2015-07-09 17:56:50 +00:00
Amith Yamasani
f64cb18038 Dispatch onUserSwitched callbacks on handler thread
This avoids multiple threads calling beginBroadcast on the observers
list.

Bug: 22339693
Change-Id: I78a154415ccd17c9460b25589d46dadcdb850941
2015-07-09 10:40:44 -07:00
Todd Kennedy
056d6b0069 Allow codepath changes for new OTA packages
When an OTA contains a new package, the system performs some gymnastics
to ensure that we use the most up-to-date version of the package in
either the system image or user directory. But, during boot, we enforce
a package's codepath will never change. This prevents a user-installed
package from ever overriding the system provide package [regardless of
version]. In this one, specific instance, we allow a package's codepath
to change.

Bug: 22179337
Change-Id: I2c29a87801fb5960ffbd2268231446895ad1868f
2015-07-09 10:27:10 -07:00
Christopher Tate
607a040dae Merge "Add a mechanism for products to specify default active app linkages" into mnc-dev 2015-07-09 17:18:05 +00:00
Robert Greenwalt
b091695bd9 Merge "Revive NetworkInfo's SUSPENDED state." into mnc-dev 2015-07-09 17:09:17 +00:00
Jeff Sharkey
ee4a534b7b Merge "Timeout when partitioning takes too long." into mnc-dev 2015-07-09 16:59:16 +00:00
Jeff Sharkey
edcdaf6463 Timeout when partitioning takes too long.
Otherwise we leave user hanging in wizard forever, instead of
telling them that something went wrong.

Bug: 20914299
Change-Id: Ib9ff3a8c316976c6a1dfdaffa10762abbea0c229
2015-07-09 09:45:39 -07:00
Paul Jensen
49e3edff51 Add android.net.CaptivePortal class for captive-portal-handling-app callbacks
This new class replaces the awkward string token and ConnectivityManager APIs
used by apps handling captive portals.

Bug:21343774
Change-Id: I1a2c69edb17322715bf8422bb4216b0ea60bfd59
2015-07-09 10:47:34 -04:00
Paul Jensen
e098854c41 Fallback to Cellular if WiFi fails to validate
Previously, once a network validated, for the purposes of comparing networks
to select the default network, we always considered it validated.
With this change if a network later fails to validate, we'll take this latest
validation result into account.  This means if WiFi and cellular are up
(e.g. if we recently switched from cellular->WiFi, and cellular is now
lingering) and both are validated, but for some reason WiFi fails a validation,
cellular will become the default network connection.

Bug:20896761
Change-Id: I858aa10c1aaec5cd9032067f960963409107bdb1
2015-07-09 10:26:17 -04:00
Paul Jensen
85cf78edc9 Prepare some ConnectivityService logic for fallback to Cellular change
Reduce the duplication of some logic so when falling back to Cellular
when WiFi fails to validate is enabled, there's less chance for bugs
and failures:
1. De-duplicate several Network vs NetworkRequest matching functions
2. Remove the very tricky nascent logic by adding a simple "lingering" bit.

Bug:20896761
Change-Id: I21da9e827eec9cfd6835fcaa650192b9186ed053
2015-07-09 10:26:08 -04:00
Kenny Guy
7d170797ac Merge "Mute correct user from device policy manager." into mnc-dev 2015-07-09 10:06:25 +00:00
Robert Greenwalt
8d48252b80 Revive NetworkInfo's SUSPENDED state.
This got lost in the multinetwork work for L.  It means
that if telephony stops having the ability to pass packets for a while
the rest of the platform doesn't know.

Telephony enters the suspended state if it enters a telephony call
while using certain radio access technologies, or if it switches to
one of those RATs while in a call.  It also can enter this state if
it temporarily loses contact with the network - the modem will
not report the loss of the data call for an indeterminant time in
the hope that regaining the network will restore the connection
without harm to any ongoing ip layer interactions.  For example
passing through a tunnel or taking an elevator trip may use this
mechanism.

bug: 19637156
Change-Id: If9fde68175e8561c19323c81fbfcb02a6e5a00fb
2015-07-08 20:42:55 -07:00
Adam Lesinski
7fb1655a89 Merge "BatteryStats: Fail gracefully on corrupt battery stats" into mnc-dev 2015-07-09 01:15:15 +00:00
Svet Ganov
ad3b297557 Add an API for apps to query if a permisison is denied by policy.
bug:22177216

Change-Id: I32227f55097fae997f33743fd1eee06cb18f47f1
2015-07-08 18:12:58 -07:00
Adam Lesinski
9ae9cba020 BatteryStats: Fail gracefully on corrupt battery stats
Bug:22328963
Change-Id: Id0b4c6334706e58483d5fdfd2c1137bfb821c409
2015-07-08 17:35:42 -07:00
Christopher Tate
01e186437f Add a mechanism for products to specify default active app linkages
We now have a new tag type in the existing SystemConfig XML files:

    <app-link package="..." />

Packages mentioned here are treated as though the user had instructed
the system to always open the app rather than a browser when touching
an HTTP/HTTPs URL that is handled by the app.  This default state can
of course still be turned down by the user if they choose.

Bug 21595872

Change-Id: I2824064a891bba3867ee86f81d609d22e83aef7a
2015-07-08 17:27:11 -07:00
Svetoslav
6638c18263 Merge "Fix reset permissions on clear data and package uninstall." into mnc-dev 2015-07-08 23:58:01 +00:00
Svetoslav
4a5f4a2bc7 Fix reset permissions on clear data and package uninstall.
If the user clears data for an app we reset the permission but
only the changes made by the user. We do not modify syste or
policy flags and also ensure the permission that were granted
by default are granted after the data wipe. This is the same
as starting with a clean slate.

If the package whose data is cleared is a part of a shared user
we resent to initial state only the permissions that the cleared
package contributed. Hence, if another package also declared the
permission as used we do not clear the permission state as it is
still in use.

When a package is deleted for a user but still present for another
user we reset its permissions to their inital state follwoing
above described strategy.

Lastly when a preinstalled package wtih an upgrade is diabled
(triggers upgrade uninstall) and this package is a part of a
shared user, we do not drop permission state (grants and flags)
for permissions used by the shadowed system package. This ensures
that we do not drop runtime permission state (such state is
default grants and user changes).i

bug:22248525

Change-Id: I3a3007476d2cb9f4ff824e1e137a6e1a4d04408b
2015-07-08 16:52:42 -07:00
Jack Yu
6b7a07848b Merge "Grant SMS permissions to Cell Broadcast receiver which emergency/non-emergency broadcast messages from the network." into mnc-dev 2015-07-08 23:46:36 +00:00
Amith Yamasani
705ba96063 Merge "Qualify the uid with the userId when granting permissions" into mnc-dev 2015-07-08 23:44:55 +00:00
Wale Ogunwale
dad62b9f99 Merge "Finish already paused activity if it should be finished after pausing" into mnc-dev 2015-07-08 23:34:31 +00:00
Sasha Levitskiy
12328ef422 Merge "Fingerprint: Add post enroll interface." into mnc-dev 2015-07-08 22:59:51 +00:00
Jim Miller
e6fd76c235 Merge "Don't use fingerId when creating names" into mnc-dev 2015-07-08 22:58:23 +00:00
Amith Yamasani
6b53c16210 Qualify the uid with the userId when granting permissions
Calls to remountUid() for secondary users was not using the
correct uid. This would prevent providing the required
storage permissions to default apps.

Discovered when investigating bug: 22356546

Change-Id: I98c8f6da724e46331c1c90b95969ca0871ef4fe9
2015-07-08 15:57:24 -07:00
Sasha Levitskiy
e0943cf566 Fingerprint: Add post enroll interface.
Bug: 22007124
Change-Id: I9b74edd8e34eaf9ab559b6dc20030a95fa3ce321
Signed-off-by: Sasha Levitskiy <sanek@google.com>
2015-07-08 15:38:07 -07:00
Vineeta Srivastava
99b8820fd7 Use fingerid 0 when checking failed attempts.
It is valid to have finger id as Hex value which is not necessarily less than 0.
Always compare with finger id 0 to make sure we are not locking out user.

Bug: 22354158
Change-Id: I19ded12ae4ee335621fd278163c652fc154be6cf
2015-07-08 22:36:15 +00:00
Jorim Jaggi
165ce066b7 Fix assist for hardware long-press
Activating the assistant will now route through SysUI, so
we have the logic whether to start an activity or to start a voice
interaction session in one single place.

Bug: 22201770
Change-Id: I0f4699533aea2a1e595ee25a844434c82f548c01
2015-07-08 22:26:24 +00:00
Jack Yu
ed79bf5d74 Grant SMS permissions to Cell Broadcast receiver which emergency/non-emergency broadcast messages from the network.
bug: 22229152
Change-Id: Ide02f0c3faafd37b8205f92df8a33a0bc95dd3d7
2015-07-08 15:22:47 -07:00
Jeff Sharkey
9d587a97b9 Merge changes I9971c466,Ib42474fd into mnc-dev
* changes:
  Kill MediaProvider during drastic changes.
  Use best volume description for MTP.
2015-07-08 21:55:54 +00:00
Jeff Sharkey
c66b90fecd Merge "Generate stable MTP storage IDs." into mnc-dev 2015-07-08 21:55:15 +00:00
Wale Ogunwale
bef8a3e393 Finish already paused activity if it should be finished after pausing
If the app requests its activity to be finished allow it to be finished
immediately if the activity is already paused.

Bug: 22170595
Change-Id: I1ecc0d5f3b85fd80cbe8cdc1d4e32d5c6a50b20c
2015-07-08 14:19:44 -07:00
Jeff Sharkey
14cbe52150 Kill MediaProvider during drastic changes.
Sadly MediaProvider makes a ton of assumptions about storage paths
not changing.  To ensure that it picks up radical storage changes,
kill it and let it restart to pick up new paths.

Also give ourselves a longer timeout when benchmarking.

Bug: 20275423
Change-Id: I9971c4667dabdc685cb23528443f085f152c461d
2015-07-08 14:06:40 -07:00
Kenny Guy
70e0c58c22 Mute correct user from device policy manager.
Add per user versions of mute methods so
device policy manager can mute the correct
user.
Just persist change if the calling user
isn't the current user.
Treat calls to audio manager coming from uid
1000 as if they were coming from current user
rather than user 0 so that the correct user's
user restriction is checked.

Bug: 21782066
Bug: 21778905
Change-Id: I51469b741096d8a2ffdc520eaf5b3fd754f2c819
2015-07-08 19:33:13 +01:00
Chris Wren
32c4802a8a Merge "provide a cleaner notification dump" into mnc-dev 2015-07-08 14:46:32 +00:00