27454 Commits

Author SHA1 Message Date
Amith Yamasani
0fd2d2b124 am 292eb65f: Merge "Fix new user creation regression due to vold remount calls" into mnc-dev
* commit '292eb65f1ee0747e60899c1b1d0b6cb16c9cd37a':
  Fix new user creation regression due to vold remount calls
2015-07-13 22:45:33 +00:00
Wale Ogunwale
6ede9b679e am 26b0f1e4: Merge "Revert "Finish already paused activity if it should be finished after pausing"" into mnc-dev
* commit '26b0f1e420c0590ea5e9c506f4f14ba4b0a873f0':
  Revert "Finish already paused activity if it should be finished after pausing"
2015-07-13 22:29:46 +00:00
Paul Crowley
bac3d0936d Merge "Delete the user key when deleting a user." into mnc-dr-dev 2015-07-13 20:53:57 +00:00
Paul Crowley
9e0e69915a Merge "Use mount service to create user dirs." into mnc-dr-dev 2015-07-13 20:53:09 +00:00
Amith Yamasani
292eb65f1e Merge "Fix new user creation regression due to vold remount calls" into mnc-dev 2015-07-11 02:28:01 +00:00
Wale Ogunwale
26b0f1e420 Merge "Revert "Finish already paused activity if it should be finished after pausing"" into mnc-dev 2015-07-10 22:53:14 +00:00
Wale Ogunwale
12bb956828 Revert "Finish already paused activity if it should be finished after pausing"
This reverts commit bef8a3e39372ca85104b894f7359deddc97a8fec.

Changed caused some existing apps to crash. Reverting to unblock the
build while I investigate.

Bug: 22170595
Bug: 22397812
2015-07-10 15:25:38 -07:00
Jorim Jaggi
0c758805b3 Merge "Fix empty keyguard for once and all" into mnc-dev 2015-07-10 21:16:26 +00:00
Jinsuk Kim
256642aa2f Merge "CEC: Do not switch language if the new one is same as the old one" into mnc-dev 2015-07-10 21:09:14 +00:00
Jorim Jaggi
4474f54f4e Fix empty keyguard for once and all
When a Keyguard exit animation was played while the screen was
turning off, the window animation was cancelled. However, since
we didn't reset mPostKeyguardExitAnimation, we thought we need to
apply it again, with a start time of Long.MIN_VALUE. For some reason,
this animation never ended, and it was stuck at the beginning. Thus,
the alpha was 0 and the user just saw a blank wallpaper.

In addition, we also forbid starting the Keyguard exit animation when
the screen is about to turn off.

Bug: 21124013
Change-Id: Ief022c5bd758a9fedcaab3fe9fc385fa4234b37f
2015-07-10 21:06:44 +00:00
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
Jinsuk Kim
8ea452e3f6 CEC: Do not switch language if the new one is same as the old one
Do not switch language if the new language is the same as
the current one. This helps avoid accidental country variant
switching such as from en_US to en_AU due to the limitation of CEC.

Bug: 22373619
Change-Id: Ia98aff67e37b470b3f550a5c097e8140c1a51ecf
2015-07-10 13:06:20 +09: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
Amith Yamasani
bb054c9dcc Fix new user creation regression due to vold remount calls
When creating a new user, there's no need to call into vold when
setting up default system permissions for storage. This was otherwise
adding 2 seconds to the user creation time, causing a frozen screen
before showing "Switching to user ...".

Fix is to call the permission setup code synchronously and not
call into vold if the user hasn't been initialized yet.

Bug: 22356546
Change-Id: I4c8632813e8c0f2ac90da386691af439521bb25a
2015-07-09 14:16:27 -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
Paul Crowley
7ec733fad3 Delete the user key when deleting a user.
Bug: 19706593

(cherry-picked from commit 85e4e818d83dbc65b1e6e3ed9d39c656188acaec)

Change-Id: Icc6d53a99558317b2ec154f931e481ad9fe64aa3
2015-07-09 17:58:49 +01:00
Paul Crowley
bcf48ed226 Use mount service to create user dirs.
Bug: 19704432

(cherry-picked from commit 9102f5d953fbde03e12f385b2225004edc43d202)

Change-Id: I64a2c85beef115158feed3953deae32f692e750f
2015-07-09 17:57:35 +01: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