9496 Commits

Author SHA1 Message Date
Adam Lesinski
7fb1655a89 Merge "BatteryStats: Fail gracefully on corrupt battery stats" into mnc-dev 2015-07-09 01:15:15 +00:00
Adam Lesinski
9ae9cba020 BatteryStats: Fail gracefully on corrupt battery stats
Bug:22328963
Change-Id: Id0b4c6334706e58483d5fdfd2c1137bfb821c409
2015-07-08 17:35:42 -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
Wale Ogunwale
dad62b9f99 Merge "Finish already paused activity if it should be finished after pausing" into mnc-dev 2015-07-08 23:34:31 +00:00
Sasha Levitskiy
12328ef422 Merge "Fingerprint: Add post enroll interface." into mnc-dev 2015-07-08 22:59:51 +00:00
Jim Miller
e6fd76c235 Merge "Don't use fingerId when creating names" into mnc-dev 2015-07-08 22:58:23 +00:00
Amith Yamasani
6b53c16210 Qualify the uid with the userId when granting permissions
Calls to remountUid() for secondary users was not using the
correct uid. This would prevent providing the required
storage permissions to default apps.

Discovered when investigating bug: 22356546

Change-Id: I98c8f6da724e46331c1c90b95969ca0871ef4fe9
2015-07-08 15:57:24 -07:00
Sasha Levitskiy
e0943cf566 Fingerprint: Add post enroll interface.
Bug: 22007124
Change-Id: I9b74edd8e34eaf9ab559b6dc20030a95fa3ce321
Signed-off-by: Sasha Levitskiy <sanek@google.com>
2015-07-08 15:38:07 -07:00
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
Jack Yu
ed79bf5d74 Grant SMS permissions to Cell Broadcast receiver which emergency/non-emergency broadcast messages from the network.
bug: 22229152
Change-Id: Ide02f0c3faafd37b8205f92df8a33a0bc95dd3d7
2015-07-08 15:22:47 -07: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
Wale Ogunwale
bef8a3e393 Finish already paused activity if it should be finished after pausing
If the app requests its activity to be finished allow it to be finished
immediately if the activity is already paused.

Bug: 22170595
Change-Id: I1ecc0d5f3b85fd80cbe8cdc1d4e32d5c6a50b20c
2015-07-08 14:19:44 -07: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
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
Jim Miller
ed2ab1cc84 Don't use fingerId when creating names
Rather than using the fingerprintId, choose a unique name
to show in Settings for newly added fingerprints.

Fixes bug 22009865

Change-Id: I88a92ef95f132321a373bd88f6e1eecaf368f551
2015-07-07 19:12:36 -07: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
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
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
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