Commit Graph

6639 Commits

Author SHA1 Message Date
Jon Spivack
3ef1b5e544 Merge "Made libbinder's waitForService accessible in java" 2019-10-12 00:50:43 +00:00
Jon Spivack
9e45fde5e9 Made libbinder's waitForService accessible in java
waitForService is used to lazily start AIDL services

Bug: 138756857
Test: Manual (tested starting gsiservice with this function)
Change-Id: I7ff16b014052d3845bd4b1baa8fc9843e7975a16
2019-10-11 15:15:02 -07:00
Xin Li
019d9d0bf7 Merge "DO NOT MERGE - Merge QP1A.191005.007 into master" 2019-10-11 02:56:40 +00:00
Xin Li
8efb8c35f1 DO NOT MERGE - Merge QP1A.191005.007 into master
Bug: 142297020
Merged-In: Ifc7254ab3a5272b056cbc75233aa2dfa8219ea84
Change-Id: Ib4566cec52912a8daa86c317fd99d6d60ef1524f
2019-10-10 00:28:04 +00:00
Daniel Colascione
c94b8c3dcc Apply JNI optimizations to HwParcel
This change reduces the JNI overhead of binder calls by about 160ns
per parameter.

Test: boots
Change-Id: Ie3acdbf9f3ad48c884042ada5e63bd9757c6b2e6
2019-10-08 14:12:48 -07:00
Peiyong Lin
f605363ce4 Merge "Add owners for GraphicsEnvironment.java." 2019-10-07 16:43:11 +00:00
Peiyong Lin
92aecf1884 Add owners for GraphicsEnvironment.java.
BUG: N/A
Test: N/A
2019-10-04 17:58:36 -07:00
Kyeongkab.Nam
73fde3809a Use ParcelFileDescriptor over FileDescriptor
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
2019-10-04 17:58:11 +09:00
Treehugger Robot
d34e18c036 Merge "zygote: respond and wait for reply to --boot-completed." 2019-10-03 17:43:22 +00:00
Josh Gao
273613653f zygote: respond and wait for reply to --boot-completed.
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
2019-10-03 17:18:04 +00:00
Nicolas Geoffray
0567cd4c7b Adjust and update dumpsys meminfo output.
Adjust for JIT zygote.

Test: dumpsys meminfo
Bug: 119800099

(cherry picked from commit 08fcd7588c)

Change-Id: I84e0d41619558ff3528d7ac8670b1fac04afd34e
Merged-In: Ie0e7d6b938b6ee81c01191d6830f1196fa2121c1
2019-10-03 12:09:50 +01:00
Treehugger Robot
417aed2c61 Merge changes from topics "dsu_ashmem", "dsu_clean_up"
* changes:
  Use Ashmem to reduce buffer copies
  Clean up usage on deprecated GSID methods
2019-09-28 11:45:28 +00:00
Treehugger Robot
a828ee6442 Merge changes from topic "system_ext"
* changes:
  Consider overlay in system_ext as system's
  Support /system_ext partition
2019-09-26 22:18:07 +00:00
Treehugger Robot
1ae4c5b781 Merge "Add documentation for *.sysprop" 2019-09-25 03:01:21 +00:00
Jiyong Park
09c730b197 Add documentation for *.sysprop
Bug: 141246285
Test: N/A
Change-Id: Ia90dd8fc75a9caa3b90c4e3adfb1252a5b1c19c4
2019-09-24 14:52:36 +09:00
Mike Ma
a11beeca12 Merge "Add an API to dump incident report for dumpstate" 2019-09-24 01:07:25 +00:00
Mike Ma
15f83a3118 Add an API to dump incident report for dumpstate
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
2019-09-23 16:20:53 -07:00
Jeongik Cha
f6629839d1 Support /system_ext partition
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)
2019-09-23 22:00:50 +00:00
Treehugger Robot
6265eea819 Merge "Document that SystemProperties.set() can throw RuntimeException" 2019-09-20 05:53:03 +00:00
Tom Cherry
39373b2e81 Document that SystemProperties.set() can throw RuntimeException
Bug: 140148206
Test: n/a
Change-Id: I32df2ed4979edcc0d9abc46830ebd3defc431c57
2019-09-19 08:41:44 -07:00
Victor Hsieh
3c68afee05 Mirror fs-verity ownership UID to Java
This has been done in system/core, so mirroring for later use.
https://android-review.googlesource.com/c/platform/system/core/+/1115493

Test: compile
Bug: 112038744
Change-Id: I2d7f5d38caae0b6ada1f208b3d71d937d527716e
2019-09-18 14:33:54 -07:00
Yifan Hong
bc45ac13ef Merge "VintfObject: Fix getHalNamesAndVersions doc" 2019-09-16 23:58:51 +00:00
Varun Shah
57213b0ce5 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
(cherry picked from commit 5e67462971)
2019-09-16 20:56:34 +00:00
Kyeongkab.Nam
77f1aac15d Add nullability anotations
Add missing nullability for applyPayload.

Test: manual
Change-Id: Iafce9091767bd7a31937b0be329ede6639239d73
2019-09-12 11:33:39 +09:00
Yifan Hong
0cdba3256c VintfObject: Fix getHalNamesAndVersions doc
Test: CTS device info collect
Bug: 140832836
Change-Id: Iddc3c36d15370baa661e485b76c490a5d2b7815c
2019-09-11 11:07:43 -07:00
Treehugger Robot
59566aba2e Merge "Fix regression in PFD#fromData" 2019-09-09 19:21:04 +00:00
Howard Chen
ae615b32cd Use Ashmem to reduce buffer copies
Use android.os.MemoryFile to allocate Ashmem and use gsid.setAshmem and
gsid.commitGsiChunkFromAshmem to submit data.

Bug: 138976291
Test: adb shell am start-activity \
    -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
    -a android.os.image.action.START_INSTALL \
    -d file:///storage/emulated/0/Download/system.raw.gz \
    --el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
    --el KEY_USERDATA_SIZE 8589934592

Change-Id: I6df718a8cc3f4e5835c9d20d0bf5bf8bb0daee22
Merged-In: I6df718a8cc3f4e5835c9d20d0bf5bf8bb0daee22
2019-09-09 18:14:48 +08:00
Howard Chen
c44ee158b9 Clean up usage on deprecated GSID methods
change: Add a oneShot argument to setEnable

remove: commit() and replace it with enableGsi

rename: removeGsiInstall -> removeGsi
rename: disableGsiInstall -> disableGsi

Bug: 138969329
Test: adb shell am start-activity \
    -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
    -a android.os.image.action.START_INSTALL \
    -d file:///storage/emulated/0/Download/system.raw.gz \
    --el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
    --el KEY_USERDATA_SIZE 8589934592

Change-Id: I680013c8b1181599f0b858222bd92e31c5f085fd
Merged-In: I680013c8b1181599f0b858222bd92e31c5f085fd
2019-09-09 18:14:29 +08:00
Steven Moreland
d6b5bdf07d Merge changes from topic "wait-for-aidl" into stage-aosp-master
* changes:
  PowerManagerService: use waitForService.
  ServiceManagerProxy: add APIs.
2019-08-30 17:54:37 +00:00
Aurimas Liutikas
00be951a08 Add missing nullability annotations.
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
2019-08-30 00:14:44 +00:00
Steven Moreland
3ffad04add ServiceManagerProxy: add APIs.
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
2019-08-29 13:53:47 -07:00
Luke Huang
a3ddee80fd Merge "Support enable/disable dns forwarding of dnsmasq when start tethering"
am: 6fecb94292

Change-Id: I8f5c67fa1e045c9fd4a5e7a753df285d1111c1d2
2019-08-28 06:06:44 -07:00
Xin Li
a770df1d2e DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master
Bug: 139893257
Change-Id: I94fce9c5c0b35cbb88ee27fa4cd037927964d2cd
2019-08-24 05:22:23 +00:00
Luke Huang
b0d52464f1 Support enable/disable dns forwarding of dnsmasq when start tethering
Bug: 128782815
Test: built, flashed, booted
Change-Id: Ic6ee985b42cbe77e8f2208fba62108604fc7bbcf
2019-08-20 20:42:13 +08:00
John Reck
371c5e6343 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
(cherry picked from commit 12ea937f8f)
2019-08-14 23:24:57 +00:00
Xin Li
1702a9da19 DO NOT MERGE - Merge pie-platform-release (PPRL.190801.002) into master
Bug: 139369544
Change-Id: I835905a51836e7218f0be8c25335b9548ae6b2d3
2019-08-13 16:36:37 -07:00
Nicolas Geoffray
6b9ab57b2d Merge "Notify the ART runtime when boot is complete."
am: f83748ae28

Change-Id: Iea67d64570657173832ee0d61288dc97af11496b
2019-08-08 05:11:55 -07:00
Nicolas Geoffray
f83748ae28 Merge "Notify the ART runtime when boot is complete." 2019-08-08 11:58:06 +00:00
David Srbecky
6d0d7066cf Notify the ART runtime when boot is complete.
Needed for jit-zygote performance improvements.

Test: device boots
Bug: 119800099
Change-Id: I1e46f49d94440384473430d8afebe29fbee9c68e
2019-08-08 07:57:35 +00:00
Nandana Dutt
b745860a3e Merge "Remove obsolete methods from DumpstateListener implementations"
am: cbdb10f982

Change-Id: Ia746b0cdadd0c4d652c373763f7a12266b080e3b
2019-08-07 07:08:27 -07:00
Nandana Dutt
47c5ecc50a Remove obsolete methods from DumpstateListener implementations
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
2019-08-06 17:43:11 +00:00
Dan Zhang
ea493e4c77 Merge "Fix the reference leak on RemoteCallbackList"
am: be30d27a8a

Change-Id: Ibf79be3f125ab58c8048c15f3f6f3a3e693295e7
2019-07-31 22:19:30 -07:00
Dan Zhang
be30d27a8a Merge "Fix the reference leak on RemoteCallbackList" 2019-08-01 05:03:03 +00:00
Josh Gao
cdca6b559c Merge changes I9350ec13,I809d9191,I235f727d,I1930f3ba
am: a0c949d5de

Change-Id: I1633d9eae6f162e338990766e62e3aa3873df606
2019-07-31 21:46:23 -07:00
Josh Gao
75f730abaf SharedMemory: use fdsan to protect our fd.
Bug: http://b/138422309
Test: booted, saw the GraphicsStatsService fd misacquisition
Change-Id: I9350ec13e523e1bf86797a1231769d890f277008
2019-07-31 15:19:11 -07:00
Josh Gao
9fdb8f9910 Revert "Revert "SharedMemory: break Cleaner reference cycle.""
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
2019-07-31 15:19:11 -07:00
Adam Seaton
9428f73436 Revert "SharedMemory: break Cleaner reference cycle."
Bug: 138422309

This reverts commit 390d9e6a18.

Reason for revert: crashes documented in b/138422309

Change-Id: I235f727d0fe87c09f6f05dddcae7759bab64dfd8
Merged-In: I235f727d0fe87c09f6f05dddcae7759bab64dfd8
(cherry picked from commit b16411f83a)
2019-07-31 15:19:11 -07:00
Josh Gao
a4a7c1a0a5 Merge "SharedMemory: clear file descriptor when explicitly closed."
am: e33db449d8

Change-Id: I699605f2c6c7f0e24f9646d692b45c71dd88fc91
2019-07-26 15:08:05 -07:00
John Reck
7f20b0d148 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: none
Change-Id: Ic82006c9cb48f580aaad942c4679e774186382c9
Merged-In: Ic82006c9cb48f580aaad942c4679e774186382c9
(cherry-picked from commit d201b44032cdd86177406051dcc07f4625ed3b69)
2019-07-26 14:38:49 -07:00
Adam Seaton
90a3bc3372 Revert "SharedMemory: break Cleaner reference cycle."
Bug: 138422309

This reverts commit 390d9e6a18.

Reason for revert: crashes documented in b/138422309

Change-Id: I235f727d0fe87c09f6f05dddcae7759bab64dfd8
(cherry picked from commit b16411f83a)
2019-07-26 17:35:49 +00:00