Commit Graph

6941 Commits

Author SHA1 Message Date
Josh Gao
30641f56c6 Merge "zygote: respond and wait for reply to --boot-completed." am: d34e18c036 am: 15f8fb42d6 am: 332a53756d
am: cca303ecd9

Change-Id: Iaf3ab6f8baa3cf1e57b546fc9d00b428ad2a6811
2019-10-03 11:18:38 -07:00
Chen Xu
fac787d7f2 Merge "telephony annotations part 2" 2019-10-03 18:15:17 +00:00
Josh Gao
cca303ecd9 Merge "zygote: respond and wait for reply to --boot-completed." am: d34e18c036 am: 15f8fb42d6
am: 332a53756d

Change-Id: If284835a381f6f7c300c62edc59d1cf9743ac815
2019-10-03 11:11:44 -07:00
Josh Gao
332a53756d Merge "zygote: respond and wait for reply to --boot-completed." am: d34e18c036
am: 15f8fb42d6

Change-Id: I57ba0d7b301ac4652b3df54672c91dedfe1bb16c
2019-10-03 11:05:21 -07:00
Josh Gao
15f8fb42d6 Merge "zygote: respond and wait for reply to --boot-completed."
am: d34e18c036

Change-Id: I47819fa73d07ecc3507b03ef446f606407830b29
2019-10-03 10:58:24 -07:00
TreeHugger Robot
16660951c8 Merge "Added option to pre-create user templates to optimize first user creation time." 2019-10-03 17:44:02 +00: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
62806139df Merge "Adjust and update dumpsys meminfo output." am: 165050810b am: c2f5e33525
am: 9409ec02a6

Change-Id: I506c914212ee2e2d366c2469a7aecf3d9528b78a
2019-10-03 07:52:06 -07:00
Nicolas Geoffray
9409ec02a6 Merge "Adjust and update dumpsys meminfo output." am: 165050810b
am: c2f5e33525

Change-Id: Ife6a6ffc348f3c0253b843fbd3833727ef0c3e22
2019-10-03 07:40:34 -07:00
Nicolas Geoffray
c2f5e33525 Merge "Adjust and update dumpsys meminfo output."
am: 165050810b

Change-Id: I9c4068fcccedeaf00e2c3d52b8e8f75a2ef033f5
2019-10-03 07:26:57 -07: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
Nicolas Geoffray
0cb92ada28 Merge "Adjust and update dumpsys meminfo output." 2019-10-03 11:05:08 +00:00
Nicolas Geoffray
08fcd7588c Adjust and update dumpsys meminfo output.
Adjust for JIT zygote.

Test: dumpsys meminfo
Bug: 119800099
Change-Id: Ie0e7d6b938b6ee81c01191d6830f1196fa2121c1
2019-10-03 10:25:23 +01:00
Chen Xu
f85cf993d3 telephony annotations part 2
adding missing annotations

Bug: 140908357
Test: Build
Change-Id: I6de632ef7ef01a939971b7d1bacb227ec5ff4048
2019-10-02 13:48:50 -07:00
Felipe Leme
c1ca4410e1 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

Change-Id: I81de1b5376dc9c42b63be8853d7204c88826401f
2019-10-02 08:35:42 -07:00
Jeff Sharkey
f448e212bd Merge "Adjust hasAdoptable() based on debug flags." 2019-10-02 00:42:06 +00:00
Jeff Sharkey
2fea6afc91 Adjust hasAdoptable() based on debug flags.
When a developer has requested "sm set-force-adoptable", adjust the
return value of hasAdoptable() to reflect it.  This ensures that we
run relevant CTS tests.

Bug: 141540368
Test: none
Change-Id: I483c0df1a574021eafcd1663d41a2f4097fe986a
2019-10-01 14:09:19 -06:00
Chen Xu
c9d4ee112e new telephony annotation class
This is a preparatory work for mainline. since Intdef is hidden, so we
have to move some annotations (applied in SDK/system API) to a separate
annotation class and having other module statically link to it.

TODO: include telephony annotation in framework-non-updatable-sources

Bug: 140908357
Test: Build
Change-Id: I37f8a0624bbf27f264870ee9dbf03d3aaa5cadc1
2019-09-30 14:36:11 -07:00
Howard Chen
83500bab17 Merge changes from topics "dsu_ashmem", "dsu_clean_up" am: 417aed2c61 am: 1975c67bdb
am: b2bc8f41a6

Change-Id: I7b4d6f8a4f8ace9afc83d96a3e9afd1a7132e0cf
2019-09-28 05:19:49 -07:00
Howard Chen
b2bc8f41a6 Merge changes from topics "dsu_ashmem", "dsu_clean_up" am: 417aed2c61
am: 1975c67bdb

Change-Id: I1968d2763896fbd62127e0cc5b02b5ca2c1998c0
2019-09-28 05:07:39 -07:00
Howard Chen
1975c67bdb Merge changes from topics "dsu_ashmem", "dsu_clean_up"
am: 417aed2c61

Change-Id: I3382c8a7aca1fadb9e7ef37d050b52e1fff69155
2019-09-28 04:56:30 -07: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
312565f1be Merge "Stop LockSettingsService from calling DevicePolicyManager directly" 2019-09-28 04:49:43 +00:00
TreeHugger Robot
a3dfb5f2c4 Merge "Integrate pooled lambda with systrace." 2019-09-27 17:18:07 +00:00
Felipe Leme
4bc790d232 Integrate pooled lambda with systrace.
Looper traces handler calls by calling Handler.getTraceName(), which when used with PooledLambda
ends up showing just:

"android.os.Handler: com.android.internal.util.function.pooled.PooledLambdaImpl"

That name doesn't help understand what's the real bottleneck, and even worse, could let people
think it's the PooledLambda who's causing it.

Which this change, it will display names like:

com.android.server.appop.AppOpsService$Lambda
com.android.server.wm$Lambda

Fixes: 141172840
Test: manual verification (neither PoolLambda nor Message have unit tests)

Change-Id: I80d2158a50a644b10f3724fb42a4a9c2aee63ae9
2019-09-26 16:45:43 -07:00
Jeongik Cha
cac5791954 Merge changes from topic "system_ext" am: a828ee6442 am: dee02a0fae
am: 6a46c5315a

Change-Id: Ic31f9d12fffda486d36ce427848e04c7755cc531
2019-09-26 16:00:00 -07:00
Jeongik Cha
6a46c5315a Merge changes from topic "system_ext" am: a828ee6442
am: dee02a0fae

Change-Id: If2cc7cfe20182578b4e3c515f42209d9446f6a68
2019-09-26 15:53:32 -07:00
Jeongik Cha
dee02a0fae Merge changes from topic "system_ext"
am: a828ee6442

Change-Id: I2b636d0c54c932342586de47a38c16e93bf978e8
2019-09-26 15:40:26 -07: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
shafik
78fcd5049b Snapshot persist.sys.fuse into sys.fuse_snapshot
This will allow us to receive values from server flags and store them
in persist.sys.fuse without risking flag consistency during a boot.

Test: manual - flip persist.sys.fuse both ways and make sure FuseDaemon
works as expected.
Bug: 140803239

Change-Id: I4424770926f98bccda06dab6a447ee5637e5eb6e
2019-09-26 12:27:04 +01:00
Zimuzo Ezeozue
a56baba8cb Merge "Support a mount mode to bypass FUSE on /storage" 2019-09-25 12:29:38 +00:00
Zim
74a9bbae98 Support a mount mode to bypass FUSE on /storage
When Zygote forks a process with the MOUNT_MODE_PASS_THROUGH
flag, bind mount the pass_through path into /storage for the
process, allowing the process to bypass FUSE.

Bug: 140064376
Test: cat /proc/<pid of app with pass_through flag>/mountinfo shows
the lower fs bind mounted directly on /storage

Change-Id: Ia212c2c71ecfdc1629739ca8af171f332ccfca72
2019-09-25 13:05:30 +01:00
Rubin Xu
0f1e56de1f Stop LockSettingsService from calling DevicePolicyManager directly
This is a violation of layering (LSS is considered a lower level
component than DPM) and source of deadlock due to lock inversion.
This change tries to remove most of the direct calls into DPM from
LSS. After this, there will only be a handful non-critical invocations
remaining:
1. DPM.reportPasswordChanged()
   This is always called on a handler thread so it's OK (LSS does not
   hold any hold while calling out). Consider this as a (asynchronous)
   broadcast.
2. DPMi.reportSeparateProfileChallengeChanged()
   This is now moved to the handler thread, similar to
   DPM.reportPasswordChanged().
3. DPMi.canUserHaveUntrustedCredentialReset()
   This is still a violation but it will soon be removed as we
   remove the caching of syhnthetic password alltogether (deprecating
   old resetPassword()). So I'll leave it for now.

Test: atest com.android.server.locksettings
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Test: atest MixedManagedProfileOwnerTest#testResetPasswordWithToken
Test: atest MixedDeviceOwnerTest#testResetPasswordWithToken
Bug: 37090873
Bug: 141537958
Change-Id: Ie44cb418ab255bd016c5dd448674beabd362b74c
2019-09-25 10:30:57 +01:00
Jiyong Park
f82d3672b1 Merge "Add documentation for *.sysprop" am: 1ae4c5b781 am: 912fabb3e3 am: b5856c3829
am: 0b08ec7040

Change-Id: I7bd95a88ea4873e7ac65c145f11b16a4d2417fb5
2019-09-24 20:49:33 -07:00
Jiyong Park
0b08ec7040 Merge "Add documentation for *.sysprop" am: 1ae4c5b781 am: 912fabb3e3
am: b5856c3829

Change-Id: If87c23e87ae3369bb953109382ce60d2dd02a0e1
2019-09-24 20:41:26 -07:00
Jiyong Park
b5856c3829 Merge "Add documentation for *.sysprop" am: 1ae4c5b781
am: 912fabb3e3

Change-Id: Ib8503fccf2aaef7ba98c1887b2f96651fbead68a
2019-09-24 20:33:25 -07:00
Jiyong Park
912fabb3e3 Merge "Add documentation for *.sysprop"
am: 1ae4c5b781

Change-Id: Ia7dea21a6a0e1cfa1af858cc4b1155687c7a092b
2019-09-24 20:25:24 -07:00
Treehugger Robot
1ae4c5b781 Merge "Add documentation for *.sysprop" 2019-09-25 03:01:21 +00:00
Chen Xu
a56786981e Merge "new TelephonyRegistryManager" 2019-09-24 18:32:48 +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
262a3b0009 Merge "Add an API to dump incident report for dumpstate" am: a11beeca12 am: af1f91a133
am: 3343814a57

Change-Id: I2d4bfdf8537adf1541a78c264a36f95e1384af71
2019-09-23 21:40:26 -07:00
Mike Ma
3343814a57 Merge "Add an API to dump incident report for dumpstate" am: a11beeca12
am: af1f91a133

Change-Id: If72f5dbe140ea5746288204e0de5275087d7709d
2019-09-23 21:28:02 -07:00
Mike Ma
af1f91a133 Merge "Add an API to dump incident report for dumpstate"
am: a11beeca12

Change-Id: If5ca98de9a5a85ae6e2aff90224a80e925ea419c
2019-09-23 21:17:34 -07: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
Chen Xu
288b71c8c1 new TelephonyRegistryManager
today telephonyRegistry lives in system process
this is intended to persists all telephony listeners when
phone process crash. Telephony today notify system server by
using AIDL APIs directly. Instead, we are exposing a proper API
surface: telephonyRegistryManager where only phone app and
carrier privileged apps are allowed to use APIs in
TelephonyRegistryManger to notify telephony related status update.

Bug: 140908357
Test: Build & Manaul
Change-Id: I1b750751148925b4a7bd94553318907654012fc1
2019-09-22 19:56:39 -07:00
Tom Cherry
60311e153f Merge "Document that SystemProperties.set() can throw RuntimeException" am: 6265eea819 am: 14a2b65e4e am: f5269ed927
am: 1a8cd03fbc

Change-Id: I05c785b6f4d653c6f7911765bd2e2b9043488f1a
2019-09-19 23:59:07 -07:00
Tom Cherry
1a8cd03fbc Merge "Document that SystemProperties.set() can throw RuntimeException" am: 6265eea819 am: 14a2b65e4e
am: f5269ed927

Change-Id: I1e6bf1c0e745bb9ed6e5a27ab7285d3dcd650d80
2019-09-19 23:47:30 -07:00