waitForService is used to lazily start AIDL services
Bug: 138756857
Test: Manual (tested starting gsiservice with this function)
Change-Id: I7ff16b014052d3845bd4b1baa8fc9843e7975a16
The java.io.FileDescriptor object has a poor definition of ownership,
which can result in obscure use-after-close bugs. Instead, APIs should
return or accept ParcelFileDescriptor instances.
Bug: 130209137
Test: manual
Change-Id: Ifb3dd53dc138ec47f416f2d4b46c4668bc8ee1d8
The zygote handles requests by polling on its sockets, and then handling
one request for each active socket. However, it does so by reading from
a socket via a BufferedReader, which means that if multiple requests are
written into the socket before the zygote gets a chance to read them,
the zygote reads multiple requests into its BufferedReader, it handles
one request, and then never responds to the request that's buffered,
leaving its client stuck waiting for a response that will never happen.
For most requests, this can't happen, because the client will wait for a
response to be sent from the zygote before sending another request, but
this isn't true for --boot-completed until this patch.
Bug: http://b/141767463
Test: forrest runs of apct/text/text_native_test-cloud-tf
Change-Id: I8b7a80abfd9443d98f8cf5aedb7669b82c0cb84a
Instead of just relying on the regular iteration through the system
services inside dumpstate, add another API to IIncidentManager
dedicated for dumpstate.
- It is only callable by dumpstate() (check the calling uid)
- It has the same behavior as the current call inside dump()
Advantages:
- More explicit function name, right next to takeIncidentReport will
make it easier to keep them in sync.
- Nobody else can call it, make security easier.
- If dumpstate calls it explicitly, it can skip the 10 second timeout
- The regular dump() call should provide debugging data about
incidentd itself, for example timestamps for the most recent N
incident reports taken and the current state of the work directory,
allowing us to debug incidentd itself.
Bug: 137493082
Test: Manually trigger a bug report, and verify
/proto/incident_log.proto in the zip file.
Change-Id: I19139c765b53ede63d3beb3ea3ac40ada1aba42d
Merged-In: I19139c765b53ede63d3beb3ea3ac40ada1aba42d
This commit is mainly from I7a6a30bf8e8db9f2738594d187bb9148f138b8da, so
test cases and features are mostly same.
We change product_services partition name to "system_ext" because this
partition's purpose changes.
- installing a RRO package for framework from /system_ext/overlay
- installing apps from /system_ext/app
- installing priv-apps from /system_ext/priv-app
- installing permissions from
/system_ext/etc/[default-permissions|permissions|sysconfig]
Bug: 134359158
Test: `mma` under frameworks/base/tests/[libs|privapp]-permissions
adb sync && adb reboot
adb shell cmd package list libraries
=> confirmed com.android.test.libs.system_ext library
adb shell cmd package dump \
com.android.framework.permission.privapp.tests.system_ext
=> confirmed that the package is a priv-app
Change-Id: Ibbccbba64156a7bc464ffb3785fb8fe69ebb973c
Merged-In: Ibbccbba64156a7bc464ffb3785fb8fe69ebb973c
(cherry picked from commit 9ec059ac1d)
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
(cherry picked from commit 5e67462971)
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
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
(cherry picked from commit 12ea937f8f)
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)