27345 Commits

Author SHA1 Message Date
Zoltan Szatmary-Ban
b2eb6b9049 Prevent accidental unlocking of USB data transfer.
When DISALLOW_USB_FILE_TRANSFER is in effect, there must be no chance to
unlock data transfer over USB.

Bug: 22291579
Change-Id: I990fedbfeecd90e7dd26981034d0352b83dc694e
2015-07-07 13:24:59 +01:00
Lorenzo Colitti
b0b3d0bcfb Fix two parsing bugs in new DHCP client.
1. We don't parse PAD options properly, leading in failure to
   parse packets sent by DHCP servers that put the end of options
   marker after pad options and at an odd offset.
2. We get the DhcpResults vendorInfo from the wrong option type
   (60 instead of 43).

Fix these and add unit tests for the offer packets sent by a few
different DHCP servers.

Bug: 21955617
Bug: 22281295
Change-Id: I5d13f1a6a3ff0b53112f18f3db8792fa32ad2da3
2015-07-06 13:50:53 +09:00
Ian Pedowitz
9139b29ca6 Fixing log typo. s/realted/related
Bug: 22273408
Change-Id: I756f56ee80d5840bd734249826eb658cbf472921
2015-07-05 01:12:34 +00:00
Lorenzo Colitti
71e3d079d6 Merge "Make the VPN notice connectivity changes on stacked interfaces." into mnc-dev 2015-07-03 02:37:46 +00:00
Svet Ganov
2799767886 Merge "Grant the default gallery app storage permissions" into mnc-dev 2015-07-02 21:37:58 +00:00
Svetoslav
212bd4280d Merge "Make granting default SMS and Phone permissions robust" into mnc-dev 2015-07-02 21:37:33 +00:00
Alex Chau
be6307606e Merge "Clear "profile wiped" notification when a new porfile is created" into mnc-dev 2015-07-02 14:37:04 +00:00
Nicolas Prevot
60373e8060 Merge "Fix the case where an intent bounces several times between users." into mnc-dev 2015-07-02 10:27:58 +00:00
Lorenzo Colitti
1b60d11b8f Make the VPN notice connectivity changes on stacked interfaces.
Currently, the VPN code only looks at base interfaces, so if
464xlat is in use, it will never disconnect when its underlying
network has disconnected. Use getAllInterfaceNames().contains()
instead of just comparing the base interface name.

Bug: 19336810
Change-Id: Id1ba2c80a09cec5098c6f512acdc0a05a939e9f3
2015-07-02 13:03:03 +09:00
Svet Ganov
200d494b93 Grant the default gallery app storage permissions
bug:22127986

Change-Id: I1ecd49d57d410bf10734fea4e0c92e6e5028d648
2015-07-01 20:46:06 -07:00
Svetoslav
a5a0d94023 Make granting default SMS and Phone permissions robust
The default dialer and sms apps are provided by the telecomm
stak which is brought up asynchronously as a service to which
the system binds. Hence, by the time we grant default permissions
this service is not bound and we do not know the default dialer
(accidentally the default SMS app is available before the service
is up). Now the default permission grant code is robust to handle
both cases of the default sms and phone apps being available
at grant time or asynchronously.

bug:22208642

Change-Id: I6385a0432368731aa9caea046d57eccbfb5abac0
2015-07-01 20:00:32 -07:00
Filip Gruszczynski
9f8e1f5d04 am aabc9869: am 03850591: Handle outsets when resized is called due to rotation.
* commit 'aabc9869a95928660271b7022e2756fff2654013':
  Handle outsets when resized is called due to rotation.
2015-07-02 00:59:48 +00:00
Filip Gruszczynski
aabc9869a9 am 03850591: Handle outsets when resized is called due to rotation.
* commit '03850591954faf5280fd581dd04cd6958eda0124':
  Handle outsets when resized is called due to rotation.
2015-07-02 00:47:48 +00:00
Jeff Sharkey
a5ed2c4dd3 Merge "Better handling of trim/benchmark results." into mnc-dev 2015-07-02 00:09:16 +00:00
Svet Ganov
68ffcf883c Merge "Teach receivers, activities, providers, and services app ops." into mnc-dev 2015-07-01 23:59:21 +00:00
Svet Ganov
99b6043dad Teach receivers, activities, providers, and services app ops.
Perform app op check in addition to the permisison check for all four
paltform components - activities, content providers, broadcast receivers,
services - if they are guarded by a permssion that has an associated app
op. This ensures that legacy apps will behave correctly if the permission
of the caller has been revoked, i.e. the app op for that permission was
disabled.

bug:22199666

Change-Id: Ia22d1c38d58b3cd6aabdc655cb7c7bddd85da7a2
2015-07-01 16:20:00 -07:00
Jeff Sharkey
e8a4b66960 Better handling of trim/benchmark results.
Request benchmarking of devices once per week during normal fstrim
maintenance window.  Tunable parameter gives us the ability to change
frequency through global setting.

Track individual benchmark and trim results for each volume, and
use scrubbed volume identifier (based on adoptiong age) when logging
stats to drop box.  Track last benchmark and trim time for each
volume separately.

Bug: 21831325
Change-Id: I53b3ed788f7820c2e5bceb2840339f5b4aada3f0
2015-07-01 15:48:34 -07:00
Dianne Hackborn
36e52cdcd3 Merge "Device idle fixes: issue #22209630 and issue #22225665" into mnc-dev 2015-07-01 22:33:49 +00:00
Dianne Hackborn
6cc53743f5 Merge "Fix issue #20672970: Notifications are not dismissed on hot word detection" into mnc-dev 2015-07-01 22:31:18 +00:00
Adrian Roos
47e9b1489d Merge "Trust: Track separate user has authenticated since boot" into mnc-dev 2015-07-01 22:30:54 +00:00
Dianne Hackborn
76664d9dcf Merge "Work on issue #21589105: Scope WRITE_SETTINGS and SYSTEM_ALERT_WINDOW..." into mnc-dev 2015-07-01 22:21:10 +00:00
Dianne Hackborn
3b16cf4f47 Device idle fixes: issue #22209630 and issue #22225665
Issue #22209630: Only allow whitelisted apps to put apps on the temp whitelist

We now check whether the calling app is a system uid or in the whitelist
and, if not, throw an exception.

Issue #22225665: Alarm still goes off in idle mode (doze)

Fix a bug where we were not clearing the calling identity when coming
through the dump command to the service, and as a result when we would
eventually call out to the alarm manager it wouldn't do what we want.
This was only broken when being controlled by the shell.

Also adjust the network policy manager service's handling of device
idle transitions to only toggle the device idle state, which gets rid
of the long delay we have coming out of idle mode.  And add in a bit
of logging around going in/out of idle mode to try to understand where
things may be slow in the future.

Change-Id: I4a41f790e9b0bb31330314b94111557d479f2ba5
2015-07-01 15:05:04 -07:00
Christopher Tate
61d7acae0c Merge "Clear default browser setting when a new browser app is installed" into mnc-dev 2015-07-01 21:16:25 +00:00
Christopher Tate
7841eb8995 Clear default browser setting when a new browser app is installed
Even if you have explicitly named a default browser app, when you
add a new browser app to the system it now assumes that perhaps you
might want that to be the new default, so it puts you into the
explicit ambiguity state.

Also fix a bug in the factory-default-browser handling; it was not
examining the set of available browsers.

Bug 22120412

Change-Id: I183ed87a51be1e4aa65457f05b98e406bb7b495d
2015-07-01 14:05:38 -07:00
Dianne Hackborn
4e88bcd399 Fix issue #20672970: Notifications are not dismissed on hot word detection
Add new VoiceInteractionSession.closeSystemDialogs() API that closes
everything except the session itself.

Change-Id: If45f1e120d8ca095b6c8055b6485acb5e710820e
2015-07-01 13:41:03 -07:00
Jorim Jaggi
1eecf4701a Merge "Use correct starting size for clip reveal transition" into mnc-dev 2015-07-01 20:28:55 +00:00
Carlos Valdivia
88817de840 Merge "Tweak GET_ACCOUNTS behavior and improve memory." into mnc-dev 2015-07-01 20:15:45 +00:00
Jorim Jaggi
b00dbd47e3 Use correct starting size for clip reveal transition
Bug: 22174716
Change-Id: I807837d0c52f1e266204bb08391f8224dc3ff8c7
2015-07-01 20:06:51 +00:00
Dianne Hackborn
de15edaa9b Work on issue #21589105: Scope WRITE_SETTINGS and SYSTEM_ALERT_WINDOW...
...to an explicit toggle to enable in Settings

Add a new permission flag, saying the permission can be automatically
granted to pre-api-23 apps.  Apply this to SYSTEM_ALERT_WINDOW.

Change-Id: I24a0ceabe7e9f5e458a864d30eda2696ad14a699
2015-07-01 12:37:00 -07:00
Svetoslav
2956363244 Merge "Grant permissions to headless system calendar/contacts sync adapters." into mnc-dev 2015-07-01 19:26:14 +00:00
Svet Ganov
abbdc864f0 Merge "Clear binder identity when grantint permisisons to carrier apps" into mnc-dev 2015-07-01 19:21:11 +00:00
Miao Chou
658bf2fa6d Add BluetoothService to reduce resuming time after reboot
As a subclass of SystemService, BluetoothService wraps around
BluetoothManagerService to unlock Auto-enabling Bluetooth earlier by overriding
onBootPhase() and removes the need to wait for BOOT_COMPLETED message.

Bug:21705209
Change-Id: I2acc41370a750d8416e11e662e06392326741d2c
2015-07-01 19:09:44 +00:00
Filip Gruszczynski
0385059195 Handle outsets when resized is called due to rotation.
Rotation might change while the wallpaper is displayed. If outsets are
present, this must trigger a resized callback and the wallpaper must
take these accounts immediately into account before requesting relayout.

Bug: 22209764

Change-Id: I97f2670f384ccac792e7c2727eb0ef017ec66188
2015-07-01 10:23:47 -07:00
Filip Gruszczynski
d40c423b1c Merge "resolved conflicts for merge of 300ccf4a to mnc-dev" into mnc-dev 2015-07-01 17:03:03 +00:00
Nicolas Prevot
107f7b7bec Fix the case where an intent bounces several times between users.
An intent may bounce several times between users.
In this case, we want mContentUserHint to refer to the original
user.

BUG:19656340
Change-Id: I22a35fab0c228140dcb223899f5e38ff33ee5aed
2015-07-01 17:05:18 +01:00
Chris Wren
c58d169530 Merge changes from topic 'tron' into mnc-dev
* changes:
  remove double count of panel open
  report notification load on panel reveal
2015-07-01 15:33:32 +00:00
Paul Jensen
72a77993bd Merge "Log DNS results for network validation attempts" into mnc-dev 2015-07-01 12:43:15 +00:00
Paul Jensen
35daa43e5d Merge "Reducing logging in NetworkMonitor to avoid getting muted" into mnc-dev 2015-07-01 12:42:07 +00:00
Svet Ganov
ca58d80f41 Clear binder identity when grantint permisisons to carrier apps
bug:22204562

Change-Id: I79dc2e102d227c991adc849e1cbda8572ee14905
2015-06-30 19:40:21 -07:00
Carlos Valdivia
c37ee22714 Tweak GET_ACCOUNTS behavior and improve memory.
Related to recent permissions and system health changes. This change
will make it so that calls to AccountManager#getAccountsByType will work
for the owning account authenticator even if they don't have
permissions. This is pretty fundamental to having a working
authenticator and it doesn't make sense to have it be disabled (or have
authenticators hack around the framework).

Also changed how TokenCache works so that memory usage is still
predictable (no more than 64kb) but token caching won't be at the mercy
of garbage collection. This is important for writing stable cts tests.

Change-Id: Ib31b550616b266ee5a04eb26b04ba0023ca0cb83
2015-06-30 19:30:36 -07:00
Christopher Tate
2438c9b2e7 Merge "Fix dispatch of onRestoreFinished()" into mnc-dev 2015-07-01 01:25:54 +00:00
Svetoslav
0010b70bea Grant permissions to headless system calendar/contacts sync adapters.
bug:21861781

Change-Id: I5f9905a23ba1b23e387adf2cea842172d34207b0
2015-06-30 18:22:20 -07:00
Christopher Tate
758de809b9 Fix dispatch of onRestoreFinished()
The agent instance wasn't properly being conveyed from the generic
restore engine implementation to the state machine handling the
lifecycles.  On top of that, the lifecycle wasn't advancing to the
restore-finished callback phase properly in the full-data restore
case.

Bug 22194736

Change-Id: Ic649d6a196adbd21a4a0f3083c7eed2fff383e52
2015-06-30 17:58:27 -07:00
Yohei Yukawa
63c4a7185c Merge "Reland "Fixed constant window switching on lock screen..."" into mnc-dev 2015-07-01 00:51:36 +00:00
Jeff Sharkey
fc2740ae57 Merge "Hand out storage to more system apps." into mnc-dev 2015-07-01 00:42:44 +00:00
Jeff Sharkey
7186dd3a30 Hand out storage to more system apps.
Grant storage access to the Storage Access Framework provider that
offers to delegate access to storage devices.  Also grant to the
default music app.

Bug: 22104872
Change-Id: I8cf7dceec8b4c1e31f8ddd40b094ccd4ecb1caf8
2015-06-30 17:32:48 -07:00
Yohei Yukawa
d1a092218b Reland "Fixed constant window switching on lock screen..."
This is a manual reland of I3680256d41793f62def42fda00e26db1dcc9,
which was certainly merged into lmp-mr1-dev then auto-merged into
master but silently lost there for unknown reasons when
I8c42a1e6091b0fe1253e90265ac248087e was auto-merged into master.

Changes in WindowAnimator.java was already covered by
I2933eaf0ab55fe31cb382c46c411033e33a756e0 so this CL does not
include that change.

Bug: 18021493
Bug: 22158649
Change-Id: Ib1bf9f5bef44d0400230afc32231f7d1f3a1c98b
2015-06-30 16:22:05 -07:00
Amith Yamasani
2b64ec470c Merge "Don't allow non-admins to adopt sd card for internal storage" into mnc-dev 2015-06-30 23:00:08 +00:00
Filip Gruszczynski
2987f616fa resolved conflicts for merge of 300ccf4a to mnc-dev
Change-Id: Ia315e314bfde0c066a2c25d93f8cbdc71fee0a14
2015-06-30 15:03:30 -07:00
Svet Ganov
1aaad610df Merge "Do not hold a lock when calling API to grant default permissions" into mnc-dev 2015-06-30 21:44:34 +00:00