27460 Commits

Author SHA1 Message Date
Fyodor Kupolov
e37520b49d Revert "Allow array of required permissions in sendBroadcast"
This reverts commit b4e7283c9afd9fb15ebd63f6ce9b75c9c1af658b.

Change-Id: Ie8390964bda5bdfa869cee8f46584043d8e7c664
2015-07-14 22:29:21 +00:00
Fyodor Kupolov
b4e7283c9a Allow array of required permissions in sendBroadcast
Added Context.sendBroadcast(Intent intent, String[] receiverPermissions)
method, which allows an array of required permissions to be enforced.

Bug: 21852542
Change-Id: I3b8ff258fa9f3249c344bb8093b820b24eef00c0
2015-07-14 12:50:22 -07:00
Etan Cohen
c09544bb88 Merge "Fix filter on CONNECTIVITY_ACTION updates" into mnc-dev 2015-07-13 18:04:43 +00:00
Amith Yamasani
1578357df7 Merge "Check user state after clearing identity." into mnc-dev 2015-07-13 18:03:20 +00:00
Esteban Talavera
0ec43f89d2 Merge "Use correct user when filtering app link candidates" into mnc-dev 2015-07-13 09:48:48 +00:00
Esteban Talavera
2292160320 Merge "Don't send app links to parent profile if status == never" into mnc-dev 2015-07-13 09:48:21 +00:00
Billy Lau
96d00ab359 Merge "Bug: 21589105 Rescope WRITE_SETTINGS and SYSTEM_ALERT_WINDOW permission" into mnc-dev 2015-07-12 22:02:37 +00:00
Billy Lau
22b3f4cb15 Bug: 21589105 Rescope WRITE_SETTINGS and SYSTEM_ALERT_WINDOW permission
Raised the protection level of WRITE_SETTINGS permission to appop and also
allowed backwards compatibility with pre23 flag. Also made sure that this
permission is not added as RuntimePermission in DefaultPermissionGrantPolicy as
that breaks a lot of gmscore stuff.

Introduced new action to manage write system settings as a new API and
renamed the string that describes the managing of overlay permission.

Change-Id: Ifd25a6ddc06de68ee37015cb9fb23452e4ef10f4
2015-07-12 22:41:00 +01:00
Amith Yamasani
2d42d5f41e Check user state after clearing identity.
This is to fix the case where the caller has GRANT_REVOKE_PERMISSIONS
but does not have MANAGE_USERS permission.

Related to a recent fix for
Bug: 22356546

Change-Id: Id51157abad14a0bdba3a16d7cd168f61ba25e890
2015-07-11 10:24:45 -07: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
Robert Greenwalt
3ac71b7f87 Fix filter on CONNECTIVITY_ACTION updates
Only send for network types which the network supports.

bug:22411968
Change-Id: I97765544eb653caf0ea4fc5d3feec5742d5d88dc
2015-07-10 16:26:40 -07: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
Esteban Talavera
1af7588da2 Use correct user when filtering app link candidates
Bug: 22288835
Change-Id: I29b3ac04e66b5e93f5cf29fd618b98d1c8106f58
2015-07-10 14:59:49 +01: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
Esteban Talavera
3ec12db0f5 Don't send app links to parent profile if status == never
Bug: 22287521
Change-Id: Ic84e57eab74c0e0b89f1b6a3baa54784157fa96b
2015-07-09 19:25:45 +01: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