Commit Graph

6956 Commits

Author SHA1 Message Date
Makoto Onuki
e335578418 Merge "Optimize UserHandle.of()" 2019-10-07 21:33:51 +00:00
Peiyong Lin
139b067254 Merge "Add owners for GraphicsEnvironment.java." am: f605363ce4 am: da6a180c3c am: 7f20633990
am: 26cbc3235b

Change-Id: Ibfadeb45ea790db0ce9db52d7e008f19eea7fba2
2019-10-07 10:33:47 -07:00
Tao Bao
1b5f5db329 Merge "Use ParcelFileDescriptor over FileDescriptor" am: 56f111e13b am: d0ad6794d4 am: 4e4890a362
am: f4e2a8c352

Change-Id: I1061d467831e006fed7cbe4898c1fb3749a54160
2019-10-07 10:29:45 -07:00
Peiyong Lin
26cbc3235b Merge "Add owners for GraphicsEnvironment.java." am: f605363ce4 am: da6a180c3c
am: 7f20633990

Change-Id: I7d387b6959d9fed06b838f0b129edff07e6daf00
2019-10-07 10:23:10 -07:00
Tao Bao
f4e2a8c352 Merge "Use ParcelFileDescriptor over FileDescriptor" am: 56f111e13b am: d0ad6794d4
am: 4e4890a362

Change-Id: I4ebd814f61585ebd9358fa82cc0478fdb8f8e038
2019-10-07 10:17:26 -07:00
Peiyong Lin
7f20633990 Merge "Add owners for GraphicsEnvironment.java." am: f605363ce4
am: da6a180c3c

Change-Id: I0af9eb50c2f85255620387256770fa7a66858856
2019-10-07 10:17:21 -07:00
Tao Bao
4e4890a362 Merge "Use ParcelFileDescriptor over FileDescriptor" am: 56f111e13b
am: d0ad6794d4

Change-Id: Id53a5c0f7d56b2dcde839052e2e7c040c9751d69
2019-10-07 10:10:20 -07:00
Makoto Onuki
acf3858bf3 Optimize UserHandle.of()
There will be more calls to *ForUser() APIs over time by mainline modules.
Let's avoid creating new objects in common cases.

Bug: 142134660
Fix: 140429319
Test: atest cts/tests/app/src/android/app/cts/UserHandleTest.java
Change-Id: Ie71850bd08a8d9831232ddb40807ae49e3a56841
2019-10-07 10:09:45 -07:00
Peiyong Lin
da6a180c3c Merge "Add owners for GraphicsEnvironment.java."
am: f605363ce4

Change-Id: I443ea03f00258b51d8b536452c0771a985dd1a54
2019-10-07 10:04:25 -07:00
Tao Bao
d0ad6794d4 Merge "Use ParcelFileDescriptor over FileDescriptor"
am: 56f111e13b

Change-Id: I68c75d02a4eb4bc74fb83efe12ec5dce8d41f7f3
2019-10-07 09:57:55 -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
b93899a461 Merge "Added new (hidden) UserManager API to get all users, including pre-created ones." 2019-10-03 20:46:31 +00:00
Felipe Leme
09a7f2df68 Added new (hidden) UserManager API to get all users, including pre-created ones.
Bug: 140750212
Test: manual verification

Change-Id: Iaef9db6216a7b18bf6f1f3e19f4a7428ec99f1da
2019-10-03 11:48:20 -07:00
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