Commit Graph

6530 Commits

Author SHA1 Message Date
Gavin Corkery
254b0d5a7f Log watchdog-initiated rollback reason
To help with monitoring Mainline releases, log the reason
for a watchdog-initiated rollback. This may be due to
native crashes, app crashes, ANRs or explicit health check
failures.

Add a mapping from PackageWatchdog failure reason to the
new metrics.

Bug: 146415463
Test: atest PackageWatchdogTest
Test: atest StatsdHostTestCases
Change-Id: Ia3e73d955508297004591eac762555665c557b8a
Merged-In: Ia3e73d955508297004591eac762555665c557b8a
(cherry picked from commit dd1dabaef7)
2019-12-18 14:39:16 +00:00
Automerger Merge Worker
c06564375b docs: Removing most of the intro to PowerManager API am: 3fea8d1042 am: f92878e651
Change-Id: I07ea69318879ad5c70c99880c6cc6c57a348d76a
2019-12-17 20:18:50 +00:00
Automerger Merge Worker
f92878e651 docs: Removing most of the intro to PowerManager API am: 3fea8d1042
Change-Id: I25c41e4998197ef1df2c95fb1f2360360970389f
2019-12-17 19:58:53 +00:00
Andrew Solovay
3fea8d1042 docs: Removing most of the intro to PowerManager API
The intro text says PowerManager is discouraged, and almost
all the available wakelock options have long been deprecated.
Given that, I think it makes sense to remove most of that
intro and just point devs to FLAG_KEEP_SCREEN_ON instead.

Staged to:
go/dac-stage/reference/android/os/PowerManager

Test: make ds-docs
Bug: 145699347
Change-Id: I517366903f3d9743166d7edaddc08471af0803d9
2019-12-16 22:05:12 +00:00
Automerger Merge Worker
eb179fa342 Merge "docs: Delete duplicate word." into qt-dev am: 54a4bdccc4 am: 9480139340
Change-Id: I1027bb9b9a2dd830cbdf99f03369e08a464a3279
2019-12-02 23:13:37 +00:00
Automerger Merge Worker
9480139340 Merge "docs: Delete duplicate word." into qt-dev am: 54a4bdccc4
Change-Id: I8a2aa5bc892412471324f3ec5edfa2aa6d39d62c
2019-12-02 23:03:04 +00:00
Nick Cook
4ca501a6bf docs: Delete duplicate word.
Change-Id: I09fcceda7a7b0fd291c57a3005d4e027ecb99bcc
bug: 145259639
2019-11-27 22:03:43 +00:00
TreeHugger Robot
69b6876c58 Merge "Don't hold sProxyLock while retrieving interface descriptors." into qt-qpr1-dev 2019-11-21 12:42:42 +00:00
Jovana Knezevic
8de98aef28 Merge "DO NOT MERGE: Fix several issues with precreated users." into qt-qpr1-dev 2019-11-11 23:13:57 +00:00
jovanak
debb009a2c DO NOT MERGE: Fix several issues with precreated users.
1. Prevent UserManager from destroying storage for precreated users.
2. Modify UMS.getUserIds to exclude precreated users.
3. Remove pre-created users if the system has upgraded.
4. Read permissions during conversion to a "real" user. Permissions should have been granted during the pre-creation. If we cannot read permissions, re-grant them for the user.

Fixes: 143464654
Fixes: 143463955
Test: Repeated subsequent boots; observing logs; boot systrace; applied OTA, verified user cleanup
Change-Id: I75b031105b2622a8a28e84cf2394e43ec93e4174
2019-11-07 16:39:50 -08:00
Martijn Coenen
730e04453a Don't hold sProxyLock while retrieving interface descriptors.
Since we can't guarantee apps won't call back into us while calling
getInterfaceDescriptor() (even though that's a *really* bad idea),
don't hold any locks while doing so, to protect us from deadlocks.

Bug: 140603195
Test: adb shell am dump binder-proxies
Change-Id: I6289c799aa7027f80792cb751fe1dc437552ea58
2019-11-07 10:19:21 +01:00
Kevin Hufnagle
6288754ef9 Merge "docs: Added perm req for getUserCount()" into qt-dev am: c949db391d
am: f58949bd0e

Change-Id: Ifbced59e15c2ad19ad94b93af05d28ccfbccd255
2019-11-06 15:04:13 -08:00
Kevin Hufnagle
f58949bd0e Merge "docs: Added perm req for getUserCount()" into qt-dev
am: c949db391d

Change-Id: Ib9f6f7561cc6dd365537cf169d45c2eb191f514a
2019-11-06 14:57:13 -08:00
Kevin Hufnagle
c949db391d Merge "docs: Added perm req for getUserCount()" into qt-dev 2019-11-06 22:44:46 +00:00
Kevin Hufnagle
5813a8c567 docs: Added perm req for getUserCount()
Test: make ds-docs -j32

Bug: 31091793

Change-Id: Ib1cae91795b0c054f2ae95af6376a8f01d839d9f
2019-11-01 18:09:14 +00:00
Felipe Leme
0b3863f4ac Added new (hidden) UserManager API to get all users, including pre-created ones.
Bug: 140750212
Test: manual verification

Merged-In: Iaef9db6216a7b18bf6f1f3e19f4a7428ec99f1da
Change-Id: Iaef9db6216a7b18bf6f1f3e19f4a7428ec99f1da
(cherry picked from commit 09a7f2df68)
2019-10-18 11:05:09 -07:00
Felipe Leme
7ad2f6bdad Added option to pre-create user templates to optimize first user creation time.
Initial user creation is slow because the system must prepare per-user data (like storage and
permissions) whose cost is proportional to the number of pre-installed apps. On automovive's
reference implementation, it can take more than 10s, which is a bad user experience.

This change lets OEMs pre-create some users , so that high initial-creation cost is "paid" during
the initial boot. On automotive, it improves the creation of an additional user (or guest user)
in about 7s (from ~17s to 9s).

Bug: 111451156
Bug: 132111956
Bug: 140750212
Bug: 140868593

Test: manual verification
Test: atest FrameworksServicesTests:UserControllerTest#testStartTemplateUser_background

Merged-In: I81de1b5376dc9c42b63be8853d7204c88826401f
Change-Id: I81de1b5376dc9c42b63be8853d7204c88826401f
(cherry picked from commit c1ca4410e1)
2019-10-18 11:05:06 -07:00
Kevin Hufnagle
e9c81c3e2f Merge "docs: Updated SECURITY_PATCH field description" into qt-dev am: 3c92f24adb
am: 7b02dd8342

Change-Id: I342ac4968830434af50e7523ba785089d78c3ca9
2019-10-08 12:08:13 -07:00
Kevin Hufnagle
7b02dd8342 Merge "docs: Updated SECURITY_PATCH field description" into qt-dev
am: 3c92f24adb

Change-Id: Ieb7549bb38439ad297bba0f5a4b64870919651a7
2019-10-08 12:00:20 -07:00
Kevin Hufnagle
d9c7b449fe docs: Updated SECURITY_PATCH field description
Test: make ds-docs -j32

Bug: 127625306
Change-Id: I052bb647ebb36ea3c9a788be592e7de9cd969e10
2019-09-20 00:59:33 +00:00
Varun Shah
667db1bea5 Merge "Use language tags to store Configuration's locale list." into qt-dev am: 6dfa267f91
am: 6947f255e4

Change-Id: Ic1954896252b758e8360c7fdf7cdeddb184bab03
2019-09-10 23:36:07 -07:00
Varun Shah
6947f255e4 Merge "Use language tags to store Configuration's locale list." into qt-dev
am: 6dfa267f91

Change-Id: Ia7f30abab7396bc36eb2d69990129143601b028b
2019-09-10 23:29:10 -07:00
Varun Shah
5e67462971 Use language tags to store Configuration's locale list.
Instead of storing each Locale within a Configuration object's locale
list by its language, country, variant, and script to proto, store the
entire locale list by its language tags representation which accurately
describes each locale.

Bug: 140197723
Test: atest ConfigurationTest
Test: atest UsageStatsDatabaseTest
Test: manually with bad data
Merged-In: I53946ed4e31de0ffe9c84875c391a7dec6f5375a
Change-Id: Idaae690f79a5c680ad0059a52be62160d9dfb5e7
2019-09-10 19:53:57 +00:00
Colin Cross
c09f17d559 Merge "Revert "Use language tags to store Configuration's locale list."" into qt-dev am: dd67a548b2
am: 18bf694f3c

Change-Id: I9481fb2063b8a38a86dd52867c4c9ad52e9b8c7a
2019-09-10 12:36:03 -07:00
Colin Cross
18bf694f3c Merge "Revert "Use language tags to store Configuration's locale list."" into qt-dev
am: dd67a548b2

Change-Id: I0aaee5386c85bf33b292cfa9241c3a0c62dedd29
2019-09-10 12:29:07 -07:00
Varun Shah
68cdb74d91 Revert "Use language tags to store Configuration's locale list."
This reverts commit ff43f4e6a6.

Reason for revert: b/140813780

Change-Id: Id5988b9ec959ca9b294f6bd5caa30c8156238d0a
2019-09-10 18:30:47 +00:00
Varun Shah
6540f10816 Merge "Use language tags to store Configuration's locale list." into qt-dev am: bdfd7d6adb
am: ec466c0a8e

Change-Id: If5fbf5869ebed425d2df0d5472d7bbe859fb6505
2019-09-10 10:17:23 -07:00
Varun Shah
ec466c0a8e Merge "Use language tags to store Configuration's locale list." into qt-dev
am: bdfd7d6adb

Change-Id: I2ed88e4ce5bd3a00cc9ea951815c17c57a6599a2
2019-09-10 10:10:25 -07:00
Varun Shah
ff43f4e6a6 Use language tags to store Configuration's locale list.
Instead of storing each Locale within a Configuration object's locale
list by its language, country, variant, and script to proto, store the
entire locale list by its language tags representation which accurately
describes each locale.

Bug: 140197723
Test: atest ConfigurationTest
Test: atest UsageStatsDatabaseTest
Test: manually with bad data
Change-Id: Id0e63ae4a7be578d1e93838b371320f86a787e0e
2019-09-09 22:41:54 +00:00
Blake Kragten
cf1268a5f5 Merge "Connection change and high tx power Q port Changed missed Q merge back in April" into qt-qpr1-dev 2019-09-06 17:03:30 +00:00
Blake Kragten
bc75c727b7 Connection change and high tx power Q port
Changed missed Q merge back in April

Cherrypicking change into Q for better metrics.

Batterystats: "none" Data connection state should reflect only out of service

Moved only out of service to unknown type position and added other
network type.

BUG: 128629695
Test: flashed on target and tested in out of service mode. Ran
dumpsys/bugreport. adb shell dumpsys batterystats

Cellular high tx power bug

Previous implementaion was not correctly registering tx high power
sections. To fix this we can send a clear flag after we send a
+cellular_high_tx_power. We need to do this so in the volta historian
data we only see a small segment to where the tx power was at before
this.

This will generate less confusion with the cellular_high_tx_power

Bug: 127640604
Test: Compiled and flashed onto device. Tested uploading long video to
google photos. This created a high tx power use case for me to test that
the feature was reporting correctly.

Bug: 139947280
Merge-Merged-6bf8ef5
Change-Id: I6a438c9fed411a49b1f36a8085863803ff53737b
2019-08-30 15:06:03 -07:00
Kevin Hufnagle
13a441d648 Merge "docs: Improved tick/click effect descriptions" into qt-dev am: a7496671da
am: 40a40c73d7

Change-Id: I4227eebb2a74fbcecdc15dff56d26bdbbbaca027
2019-08-29 19:00:15 -07:00
Kevin Hufnagle
40a40c73d7 Merge "docs: Improved tick/click effect descriptions" into qt-dev
am: a7496671da

Change-Id: Id33aa9b90e3a62751a9fa7a4074a44737d7a95e3
2019-08-29 18:52:02 -07:00
Kevin Hufnagle
86b17d2523 docs: Improved tick/click effect descriptions
Test: make ds-docs -j32

Bug: 139888074
Change-Id: I939aaa4cf81ddab1705611222c12a60823493d38
2019-08-29 19:30:42 +00:00
Peiyong Lin
7797b4de46 Add manifest flag to enable prerelease driver.
Add manifest flag to prevent applications from using prerelease driver
accidentally. In this patch we also allow any debuggable device build to load
prerelease driver for all non-system and non-privileged applications.

BUG: 138132808
Test: Verified with prerelease driver.
Change-Id: If0abc89f709c8e34bd83a5c09c3c2047300b5ef2
2019-08-22 10:38:41 -07:00
John Reck
1775a48935 Merge "Fix regression in PFD#fromData" into qt-r1-dev 2019-07-29 21:23:57 +00:00
bsears
868ac4f3a1 Merge "Revert "SharedMemory: break Cleaner reference cycle." Bug: 138422309" into qt-dev
am: d4b0c9348a

Change-Id: Icef464ff04de9d1e300161383251e35d557ca973
2019-07-26 16:35:31 -07:00
bsears
de6bfd230c Merge "Revert "SharedMemory: clear file descriptor when explicitly closed." Bug: 138422309" into qt-dev
am: 480f1db9bc

Change-Id: Ib346fb19a7be0635fe9e15d0fc6a307a614fb1c5
2019-07-26 16:31:52 -07:00
John Reck
12ea937f8f Fix regression in PFD#fromData
Don't rely on the GC to clean up FD resources when they can
just be cleaned up immediately. We know the MemoryFile isn't
going to be used any further, so just close it.

Bug: 138323667
Test: Repro steps in bug. Verified addresses FD leak in system_server from repeatedly opening & closing settings.
Change-Id: Ic82006c9cb48f580aaad942c4679e774186382c9
2019-07-26 23:19:05 +00:00
Adam Seaton
b16411f83a Revert "SharedMemory: break Cleaner reference cycle."
Bug: 138422309

This reverts commit 390d9e6a18.

Reason for revert: crashes documented in b/138422309

Change-Id: I235f727d0fe87c09f6f05dddcae7759bab64dfd8
2019-07-26 17:17:16 +00:00
Adam Seaton
5966196515 Revert "SharedMemory: clear file descriptor when explicitly closed."
Bug: 138422309

This reverts commit 20ab1e3427.

Reason for revert: crashes documented in b/138422309

Change-Id: Ic9e33fdb24bad2b30f0eb357d6752c1834df41d5
2019-07-26 17:17:03 +00:00
Josh Gao
036d594c69 Merge changes I8bdb4c74,I613a7d03 into qt-dev
am: a09ee2d39f

Change-Id: I6ae25d6b3aa39ef6f9ed1ffcf6fce6e5920a5578
2019-07-25 16:54:20 -07:00
Josh Gao
20ab1e3427 SharedMemory: clear file descriptor when explicitly closed.
We run the Cleaner in close, but after the fix in commit 6ca916a6, this
no longer clears the value stored in the FileDescriptor, which means
that subsequent operations on an explicitly closed SharedMemory will
operate on a bogus fd number. Clearing the FileDescriptor value in close
is sufficient, because Cleaner.clean is idempotent, and the only other
case where it executes is when the FileDescriptor is phantom reachable,
which means no one can access it to get its integer value.

Bug: http://b/138392115
Bug: http://b/138323667
Test: treehugger
Change-Id: I8bdb4c745466532a0712976416184c53fcf0dbf6
(cherry picked from commit a7641806dd)
2019-07-25 14:08:58 -07:00
Josh Gao
390d9e6a18 SharedMemory: break Cleaner reference cycle.
Previously, the Cleaner we create to close the ashmem file descriptor
used a thunk that held a strong reference to the FileDescriptor we
wanted to clean up, which prevented the Cleaner from ever running.

Break the cycle by storing the integer value of the file descriptor
instead.

Bug: http://b/138323667
Test: treehugger
Change-Id: I613a7d035892032f9567d59acb04672957c96011
(cherry picked from commit 6ca916a657)
2019-07-25 12:13:15 -07:00
Andrew Lewis
65ded6c655 Merge "Redact ISOBMFF boxes with 'free'" into qt-dev
am: f68a201ebc

Change-Id: I4755c6f884958dce01e06aa5a889f06e035f1f1c
2019-07-11 06:26:42 -07:00
Andrew Lewis
4ec5fda3d6 Redact ISOBMFF boxes with 'free'
Test: atest MediaStore_Video_MediaTest android.os.RedactingFileDescriptorTest
Bug: 135499138
Change-Id: Idaa8ad30300d5427f91bb2543be3152881018cf6
2019-07-10 19:46:48 +01:00
Mathew Inwood
68d07b7d6b Merge "Restore some greylist entries." into qt-dev
am: f76bdce6e0

Change-Id: I7636cbdbd4177461c56103a6a8e7d87498c9ba13
2019-06-28 08:19:19 -07:00
TreeHugger Robot
f76bdce6e0 Merge "Restore some greylist entries." into qt-dev 2019-06-28 12:02:43 +00:00
Mathew Inwood
3a75f264a8 Restore some greylist entries.
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
  information added

So they are being moved back to the greylist for Q.

Test: Treehugger
Bug: 136102585
Change-Id: I5ac8b8b9b23c3789d80239cf456072cc7dfa1203
2019-06-28 10:15:37 +01:00
Tim Joines
4ecc6562f6 Merge "Disable USAP by default on devices" into qt-dev
am: 6c3bbf9e93

Change-Id: I131b75b45e43b185266ebb54f49815896fc67ffe
2019-06-27 09:22:21 -07:00