27363 Commits

Author SHA1 Message Date
Jorim Jaggi
588932a53e Always wait for the main app window before starting a transition
When waiting for all the windows that belong to an activity, we
skipped the main window, in case it didn't had a surface yet. This
was a problem because with SurfaceViews: They set it's visibility
extremely early in the app visibility change cycle. Then, they use
another thread to draw content. Thus, they have drawn their first
frame pretty fast, where the main thread might still be in the
activity lifecycle phases. Then, we don't even have a surface for the
main window yet, but we start the app transition already because we
think the only interesting window for this app token is the
SurfaceView, which has already drawn.

Bug: 22207948
Change-Id: I708add3aab00575ae1707b25622b9b4614472892
2015-07-07 19:27:29 +00:00
xin He
053b407b74 Merge "wifi: Fix softAP turn-ON issue in statically loaded driver" into mnc-dev 2015-07-07 18:13:58 +00:00
Adam Lesinski
61db88fc8b BatteryStats: Remove isolated UIDs from /proc/uid_cputime when they are not in use anymore
Bug:22225933
Change-Id: I384a3c37ad45af981cca5fc3e92643da948d48d0
2015-07-06 15:36:46 -07:00
Dianne Hackborn
5c8498db21 Merge "Add easy way to get device idle whitelist." into mnc-dev 2015-07-06 22:24:51 +00:00
Dianne Hackborn
1b13968707 Add easy way to get device idle whitelist.
Change-Id: I28b0df69e7fb16b5d7542b1eae626bbfdd9a4c1c
2015-07-06 15:13:37 -07:00
Jorim Jaggi
c5af4f8421 Don't prevent windows from drawing when they are just moving
Bug: 21292010
Change-Id: I0cf459d75e9749afa58a4b8649457b3908c8adeb
2015-07-06 21:12:49 +00:00
Jim Miller
cb7d9e9332 Only allow fingerprint auth for the current user
This prevents fingerprint access from activities
for a user that isn't the current user.

Fixes bug 20223481

Change-Id: I360f90972fe63f5066f701a3efda355a7cb11338
2015-07-06 11:38:52 -07:00
Jeff Sharkey
7fd3c296f1 Merge "Permission to view shared storage for all users." into mnc-dev 2015-07-06 17:59:11 +00:00
Jeff Sharkey
246d698499 Merge "Handle missing migration source volume." into mnc-dev 2015-07-06 17:57:52 +00:00
Jeff Sharkey
38cae6c8bc Merge "Reconcile private volumes when mounted." into mnc-dev 2015-07-06 17:57:46 +00:00
Jeff Sharkey
32e80d7588 Permission to view shared storage for all users.
Typical apps are restricted so they can only view shared storage
belonging to the user they're running as.  However, a handful of
system components need access to shared storage across all users,
such as DefaultContainerService and SystemUI.

Since WRITE_MEDIA_STORAGE already offers this functionality by
bypassing any FUSE emulation, reuse it to grant the "sdcard_rw" GID
which is no longer handed out to third-party apps.  Then we change
the FUSE daemon to allow the "sdcard_rw" GID to see shared storage
of all users.

Bug: 19995822
Change-Id: I504c2a179ba74f142ed0d32da5baa69f4212cd82
2015-07-06 10:54:28 -07:00
Dianne Hackborn
dcd96ead84 Merge "Maybe fix issue #22283836 -- package manager NPE." into mnc-dev 2015-07-06 17:50:28 +00:00
Dianne Hackborn
167d588b8b Maybe fix issue #22283836 -- package manager NPE.
Change-Id: I0383b9a4f1e0b872b3b427e6ad42fd8aa309b7ab
2015-07-06 09:52:59 -07:00
Amith Yamasani
a72eac60c7 Fix a typo causing NPE in restricted profiles
Bug: 22287398
Change-Id: Iec19d890c7b0b7ffed3381dc3f5a9b3e761362a7
2015-07-06 09:24:08 -07:00
Svet Ganov
10c111ed35 Merge "Show basic feature warning for default granted permissions" into mnc-dev 2015-07-06 15:52:01 +00: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
Jeff Sharkey
ef10ee0145 Handle missing migration source volume.
Users can try migrating primary storage while the current location
is missing/unmounted.  Fail gracefully instead of runtime restarting.

Bug: 21927076
Change-Id: I40645f8ccea05154e7cbacd188f6cba5f4dbbdc4
2015-07-05 14:34:13 -07:00
Ian Pedowitz
9139b29ca6 Fixing log typo. s/realted/related
Bug: 22273408
Change-Id: I756f56ee80d5840bd734249826eb658cbf472921
2015-07-05 01:12:34 +00:00
Jeff Sharkey
6dce4964b4 Reconcile private volumes when mounted.
Many things can happen while a private volume is ejected, so we need
to reconcile newly mounted volumes against known state.

First, user IDs can be recycled, so we store the serial number in the
extended attributes of the /data/user/[id] directory inode.  Since a
serial number is always unique, we can quickly determine if a user
directory "10" really belongs to the current user "10".  When we
detect a mismatched serial number, we destroy all data belonging to
that user.  Gracefully handles upgrade case and assumes current serial
number is valid when none is defined.

Second, we destroy apps that we find no record of, either due to
uninstallation while the volume was unmounted, or reinstallation on
another volume.

When mounting a volume, ensure that data directories exist for all
current users.  Similarly, create data directories on all mounted
volumes when creating a user.  When forgetting a volume, gracefully
uninstall any apps that had been installed on that volume.

Bug: 20674082, 20275572
Change-Id: I4e3448837f7c03daf00d71681ebdc96e3d8b9cc9
2015-07-04 17:08:42 -07:00
Svet Ganov
77ab6a888a Show basic feature warning for default granted permissions
bug:22174223

Change-Id: Ie8209e1f678ac459893151b5125e86eb5025aad8
2015-07-03 12:19:02 -07: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
Ravi Joshi
593e8da3df wifi: Fix softAP turn-ON issue in statically loaded driver
SoftAP fails to turn-ON on some statically loaded driver
models in which the network interfaces are not available
until the firmware is reloaded in the AP mode. This change
provides the fix to load the firmware earlier in the softAP
start sequence to make wlan0 interface available.

b/22236507

Change-Id: If2c4b28c704bc6e5acb2be70d5d9d84d6e98f747
2015-07-01 17:51:43 -07: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