To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.
This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi
Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
This class is hanging around for UnsupportedApiUsage. Adding additional
APIs here which do nothing in order to satisfy the inherited interface.
Bug: 136027762
Test: compile :)
Change-Id: I47b57c6876afd77b47083bf905ade9951ff0b42d
Note that with the new Bugreporting API, SystemServer is the only
expected DumpstateListener implementation. Once we fully migrate Shell
app, we can remove the implementation in BugreportService as well.
BUG: 128980174
Test: bugreport from power menu, observe progress bar
Change-Id: I40d654a70bd9ceb3a29f8a0113b85616100f4ee9
Merged-In: I40d654a70bd9ceb3a29f8a0113b85616100f4ee9
This commit was reverted in Q because it broke things, but we want it in
master.
This reverts commit c36d0765a25d4701980738dc3e2053f19eb3d6b8.
Change-Id: I809d9191eee4909d265d2864ebd523f262f6bb61
Test: treehugger
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: none
Change-Id: Ic82006c9cb48f580aaad942c4679e774186382c9
Merged-In: Ic82006c9cb48f580aaad942c4679e774186382c9
(cherry-picked from commit d201b44032cdd86177406051dcc07f4625ed3b69)
Bug: 138422309
This reverts commit 390d9e6a18.
Reason for revert: crashes documented in b/138422309
Change-Id: I235f727d0fe87c09f6f05dddcae7759bab64dfd8
(cherry picked from commit b16411f83a)
Bug: 138422309
This reverts commit 20ab1e3427.
Reason for revert: crashes documented in b/138422309
Change-Id: Ic9e33fdb24bad2b30f0eb357d6752c1834df41d5
(cherry picked from commit 5966196515)
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)
(cherry picked from commit 20ab1e3427)
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)
(cherry picked from commit 390d9e6a18)
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
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
Due to the restriction of Treble, update_engine cannot access to OTA
packages located on non-core domain area.
(e.g. /data/vendor/upgrade/xxx.zip)
To solve such problem, update_engine needs to accept a file descriptor
(FD) of OTA package file instead of its URI. Accordingly, UpdateEngine
also needs to add a new interface of applyPayload which accepts FD.
Test: Manual update
Bug: 130209137
Change-Id: Ic924445c4abf27fd7dc111c74b972ac7ff9ffa6b
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
NetworkStatsService is the only consumer of the data coming from
NetworkStatsFactory, but the factory itself is instantiated and
owned by NetworkManagementService.
Move it into NetworkStatsService instead.
Test: atest FrameworksNetTests
Change-Id: I52df1e545c646927952579da22845a12d1d7563b