27393 Commits

Author SHA1 Message Date
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
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
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
Chris Wren
32c4802a8a Merge "provide a cleaner notification dump" into mnc-dev 2015-07-08 14:46:32 +00:00
Zoltan Szatmary-Ban
a2de7fc9fc Merge "Prevent accidental unlocking of USB data transfer." into mnc-dev 2015-07-08 11:44:35 +00:00
Zoltan Szatmary-Ban
8959276036 Merge "Expose time-interval detail query on INetworkStatsSession" into mnc-dev 2015-07-08 11:33:00 +00:00
Wale Ogunwale
06bdab9b90 Merge "Set AppErrorDialog result during dismissal if it isn't already set" into mnc-dev 2015-07-08 03:32:33 +00:00
Jeff Sharkey
5af1835d67 Generate stable MTP storage IDs.
It ends up that MediaProvider is persisting MTP storage IDs in its
database, so we need to make sure we generate stable IDs over time,
otherwise we can end up looking into a black hole.

Bug: 22256092
Change-Id: I6a75c239aac1b71fd5f6df0df69b24971079a086
2015-07-07 17:46:16 -07:00
Dianne Hackborn
a90c8def2c Add new "preinstalled" permission flag.
This allows you to specify that a permission can be granted to
any pre-installed system app (not just privileged ones).

And as long as I am doing this, clean up the old "system" permission
flag, renaming it to "privileged" which is what it really is today,
deprecating the old names.  And switch the platform's permission
declarations to use the new name.

Change-Id: Iabf484746af232144786851ec7fe90e3de9dddb2
2015-07-07 17:25:25 -07:00
Wale Ogunwale
31dd3a74c1 Set AppErrorDialog result during dismissal if it isn't already set
The system watch dog was triggering because all binder threads were
waiting for AppErrorResult#set() to be called which never happened.
One situation where this can occur is if a process continues to crash
and the activity manager marks the process as bad there by causing it
to kill the process immediately which causes a binder death
notification that automatically dismisses the app error dialog before
the user ACKs it.
We now set the result during dialog dismissal if it isn't already set.

Bug: 22141958
Change-Id: If3ac116df5e29c6fba43ee556a859ad3c84c66f3
2015-07-07 17:24:54 -07:00
Svetoslav
3e07ee078d Merge "Grant installer and verifier install permissions robustly" into mnc-dev 2015-07-07 23:44:34 +00:00
Christopher Tate
15bb16fb48 Merge "App linking: permit overlapping link handling" into mnc-dev 2015-07-07 23:35:51 +00:00
Adrian Roos
38586bfff9 Merge "Fix bug that prevented waking from dream" into mnc-dev 2015-07-07 23:22:23 +00:00
Adrian Roos
bee63000ed Fix bug that prevented waking from dream
If a device was securely locked, FLAG_TURN_SCREEN_ON failed to
wake the device from dreaming even if FLAG_SHOW_WHEN_LOCKED
was set. The fix allows SHOW_WHEN_LOCKED activities that are about
to turn the screen on to show even if they're not currently the top
most window with SHOW_WHEN_LOCKED set (which in this case would always
be the dream)

Bug: 21719374
Change-Id: I8d7bce05d95ed9de50b5a52b0973562b070aca5a
2015-07-07 14:55:52 -07:00
Christopher Tate
050aee2365 App linking: permit overlapping link handling
Allow multiple apps to be enabled as link handlers even their set of
accepted domains overlaps.  Also, allow app linking to be turned on
even for unverified apps if the user wishes.

Bug 21817604

Change-Id: I8bc7f1764318e5d4bb6ce93c66483fe07e922b1d
2015-07-07 14:07:00 -07:00
Svetoslav
3e7d977ff7 Grant installer and verifier install permissions robustly
bug:22248271

Change-Id: I3a47ae9a112ba7d88b421fcb5f9651d1168ba7a5
2015-07-07 14:02:51 -07:00
Wale Ogunwale
880a54f6d8 Merge "Cleaned-up logic for determining clip rect for transitions animations." into mnc-dev 2015-07-07 21:00:43 +00:00
Jeff Sharkey
dafaa45c0e Merge "Split app move into separate copy/delete steps." into mnc-dev 2015-07-07 20:46:36 +00:00
Chris Wren
e4b38805d6 provide a cleaner notification dump
Respond to --stats by generating a cleaner, easier to parse dump.
Optional argument tells historical stats when to start aggregating.
Don't emit debug information about current notification status.

Bug: 20451514
Change-Id: Ie3d25b674421caa6c9e093f5643cb18d4138a7c8
2015-07-07 16:34:50 -04:00
Jeff Sharkey
6b7bb60457 Split app move into separate copy/delete steps.
App movement now has three distinct stages: copying, scanning, and
cleanup.  Previously, a battery pull late in the move process would
end up with packages.xml pointing at the old location which had been
torn down.  Now, we update packages.xml to point at the new location
as the "source of truth" before we start deleting the old location.

Bug: 21831336
Change-Id: I6f57f37a8cb335127db9ebb7c6b6cfe5755ada99
2015-07-07 13:32:14 -07:00
Makoto Onuki
53d17aeee0 Merge "Give fixed READ_PHONE_STATE permission to calllog provider" into mnc-dev 2015-07-07 20:23:26 +00:00
Vineeta Srivastava
9d918db350 Merge "UsbDeviceManager: Add back support for persistent property" into mnc-dev 2015-07-07 20:13:46 +00:00
Christopher Tate
7bc8f51aa6 Merge "Clean up obsolete pending timeout after restoring package metadata" into mnc-dev 2015-07-07 19:54:20 +00:00
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
Ajay Dudani
84dce3c9a8 UsbDeviceManager: Add back support for persistent property
Take into account the value of persist.sys.usb.config when updating
sys.usb.config. The persistent prop can hold information regarding
additional enumerations required for the device.

Bug: 21929369
Change-Id: Ic11ebf62ce114f2d0a097ad4405de71173b23139
2015-07-07 11:51:15 -07: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
Christopher Tate
2fe00adc02 Clean up obsolete pending timeout after restoring package metadata
Bug 22040047

Change-Id: I460dbcc50a45d794392beb9ff4a4358c05c87e07
2015-07-07 10:46:10 -07:00
Zoltan Szatmary-Ban
72027d2e42 Expose time-interval detail query on INetworkStatsSession
Also, force polling when a session is opened for NetworkStatsManager.

Bug: 21864554
Bug: 21754685
Change-Id: I24ea822c2d5bc1421ec7ee65d0cfe27cf02dd69e
2015-07-07 17:36:54 +01:00
Wale Ogunwale
35a57f81a9 Cleaned-up logic for determining clip rect for transitions animations.
Previous logic led to several edge cases which fixes sometimes broke
other edge cases. New logic uses the clip rect provided by the
transformation as-is and doesn't try to adjust it based on window
flags. Correct clip rect is set in
WindowManagerService#applyAnimationLock using the content insets
before the animation is loaded.

Bug: 21727851
Bug: 20652683
Bug: 19523205
Bug: 15046646
https://code.google.com/p/android/issues/detail?id=161362
Change-Id: I2d4ed6196edb8ee8c401fe9a242aec70d3494574
2015-07-07 08:40:43 -07:00
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
Makoto Onuki
7a4082edc4 Give fixed READ_PHONE_STATE permission to calllog provider
Calllog provider lives in the same APK as contacts provider.

Bug 22300894
Bug 22297735

Change-Id: I77f3ee18f093b5adb819308c113062c490a3b54b
2015-07-06 16:59:36 -07: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