Commit Graph

14438 Commits

Author SHA1 Message Date
Orion Hodson
c3e8e916eb Drop system_server dexopt in ZygoteInit
system_server artifacts should be present in the system image or
generated by on-device signing.

Bug: 187711479
Fix: 163019104
Test: m & boot
Change-Id: I19094e1a60b903d04cf7ba23e65cc9ef10f7f243
2021-08-23 10:52:41 +01:00
lucaslin
4396c1b244 Fix Ikev2 vpn cannot establish through startLegacyVpn()
Settings will also call startLegacyVpn() to bring up Ikev2 VPN,
so it's needed to add a vpn type check in startLegacyVpn().
Otherwise, UnsupportedOperationException will be thrown when
Settings tries to bring up Ikev2 VPN.

Bug: 191937302
Bug: 188749090
Bug: 189808606
Test: 1. make gts && gts-tradefed
      2. run gts --module GtsNetworkStackHostTestCases
Change-Id: I752c39bd1bf953a11bdf62e6f02f99f48fef23c4
Merged-In: I752c39bd1bf953a11bdf62e6f02f99f48fef23c4
2021-07-30 06:25:21 +00:00
Treehugger Robot
54c9ff981e Merge "Added Ble scan APIs to BatteryStatsManager" 2021-07-19 15:32:41 +00:00
Remi NGUYEN VAN
8608d0626e Merge "Rename FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT" 2021-07-19 09:47:21 +00:00
Etienne Ruffieux
29cb9a7c90 Added Ble scan APIs to BatteryStatsManager
Added missing service functions to manager to prevent directly
calling BatteryStatsService from Bluetooth package. Updated
system-current.txt accordingly.

Tag: #feature
Bug: 190442794
Test: Manual
Merged-In: Ie6c6d3688d2da45956d57ea1dbc2cc4430f27783
Change-Id: Ie6c6d3688d2da45956d57ea1dbc2cc4430f27783
2021-07-15 16:40:57 +00:00
Wang Han
3688f9590c Use tmpArgBuffer correctly when argBuffer is null
* Seems to be a typo and can cause NPE.

Change-Id: I7e253c97e02767a076d9450e88ccea08c5122bb1
2021-07-11 08:13:30 +00:00
paulhu
670abcd53d Rename FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT
As API review feedback, rename Build#VERSION#FIRST_SDK_INT to
Build#VERSION#DEVICE_INITIAL_SDK_INT. As well as update all usage
in frameworks and tests.

Bug: 184735771
Test: m
Merged-In: I72660959cb4e638a8e80fcf2f4e96ea172969f44
(cherry-pick with minor conflicts)

Change-Id: I72660959cb4e638a8e80fcf2f4e96ea172969f44
2021-07-05 14:10:16 +09:00
Siim Sammul
75d6665597 Fix process source propagation for binder calls stats settings so that
it is correctly reported in the pushed atom BinderLatencyReported.

This is a direct cherrypick from sc-dev: https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/15054863

Bug: 180584913
Test: unit test
Change-Id: Ifbdd96c73276546fb2a05213f71e1de088e1fe1e
Merged-In: Ifbdd96c73276546fb2a05213f71e1de088e1fe1e
2021-06-25 16:28:12 +00:00
Orion Hodson
8be0de5892 Merge "Revert^2 "Zygote: Load system server code early"" 2021-06-25 09:09:01 +00:00
Orion Hodson
d0d23f5a2b Revert^2 "Zygote: Load system server code early"
This reverts commit 6be3b0e117.

Bug: 180949581
Test: atest odsign_e2e_tests
Change-Id: I7a7dd5b475af4502dc9671d2dce02ee3673ddf81
2021-06-24 20:09:56 +00:00
Victor Chang
9a285e79f3 Revert "Refactor StructCapUser{Header,Data} and StructLinger for API review"
Revert the class rename in master as discussed in http://b/183513856#comment19,
because the API has landed Android S.

This reverts the commit fa36bdff9f

Bug: 183513856
Test: m droid
Change-Id: I38bd8b7a9dad85d993dd432ab8f72995a23550fc
2021-06-23 17:31:35 +01:00
Treehugger Robot
f334f4ed31 Merge "Allow app zygote preload to retain files across fork" 2021-06-22 15:32:40 +00:00
Egor Pasko
ed10978de1 Allow app zygote preload to retain files across fork
The bug proposes to 'move' the /proc/self/fd/ readlink/stat/etc checks
performed by the FileDescriptorAllowlist from before-fork to an earlier
stage.

The original aim was to allow the app zygote Preload hook to open
ashmem/memfd read-only regions to save more RAM (around 5MiB on aarch64)
via sharing more across processes. Potentially other files/sockets can
be opened - the app zygote takes responsibility of managing file
descriptor access controls across its own processes. App Zygote Preload
does not run 3rd party code.

Unfortunately a straightforward move of the checks to
just-before-preload has disadvantages:
* opens more codepaths for potential accidental misuse (the zygote
  accepts commands between preload and fork, there are valid usecases
  for extending these commands)
* this way FileDescriptorAllowlist would need to support more file
  descriptor types (sockets and maybe pipes), which is not needed now
  because these FDs are closed right before forking

The solution proposed here is to:
1. Determine the set of file descriptors open before preload
2. Run the preload hook
3. Determine FDs opened by the hook and allow them to remain open across
   fork
4. Hypothetical new attempts to preload (if ever supported) will not
   affect the allowed FDs - the preload will be able to toss its own FDs
   the way it wants, but not open the new-new ones

Bug: 184808875
Test: Manual: unreleased Chrome patch: while in app zygote preload,
      create ashmem region, passes it to 'untrusted_app' (=browser
      process), and call mmap(2) on it.
Change-Id: Ie302eabca83a0e4f409cb131e4308b73e5f6a580
2021-06-18 17:06:11 +02:00
Xin Li
48e70ad8bc DO NOT MERGE - Merge ab/7272582
Bug: 190855093
Merged-In: I81c036a8484d14683db9450b55bd379c7a728d73
Change-Id: I71fe9744d88740a8d95235ddb4c8ab91881473ce
2021-06-14 22:01:46 -07:00
Treehugger Robot
e2ddd9d277 Merge "Do not canonicalize overlay config test paths" 2021-06-04 17:04:49 +00:00
Ryan Mitchell
2c9685573f Do not canonicalize overlay config test paths
Some devices may not have certain partitions available and the
OverlayConfigTests use hardcoded paths to test OverlayConfig
functionality. This change ensures that the temporary directory
created to test OverlayConfig has all of the partitions defined in
PackagePartitions#SYSTEM_PARTITIONS within it.

Bug: 187020117
Bug: 187020675
Test: atest OverlayConfigTest
Change-Id: I511e24b7ccfe82e6e89ceea7107457439793ef77
2021-06-02 21:12:18 +00:00
Treehugger Robot
9c8ba975b6 Merge "Revert "Use BinderDeathDispatcher for alarm listeners"" 2021-05-28 00:45:37 +00:00
Todd Kennedy
769ea23166 Add OWNERS
Change-Id: Ia152457b8d86275b4b9e4e4c2fe55b0bd2667900
Mergec-In: I4b29dab263d02a79d7b1593d35ae28101d33679a
2021-05-26 21:22:35 +00:00
Suprabh Shukla
616e234464 Revert "Use BinderDeathDispatcher for alarm listeners"
This reverts commit 715ecc2bac.

Reason for revert: Causes IAlarmListener objects to leak: b/189091551

Change-Id: I9008db537affb4041be36905c317bdcb5368edc9
Merged-In: I390d9bba37a4040b7e789e0ae04f9980fbed5c12
2021-05-26 20:56:43 +00:00
Siim Sammul
6d47f7fb10 Change settings observer for other processes to not pass a userhandle.
This is a direct cherry pick from internal with no changes: https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/14426680

Bug: 180584913
Test: Not a functionality change
Change-Id: Ibf0442f9de45694e33131c0ac327d840eea8fbfe
Merged-In: Ibf0442f9de45694e33131c0ac327d840eea8fbfe
2021-05-26 10:45:16 +00:00
Siim Sammul
8cecd22d29 Add a version of SettingsObserver to BinderCallsStats and make it public so it could be
used to collect binder latency data from bluetooth and telephony.

This is a direct cherry pick from internal with no changes: https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/14236409

Test: latency collection is unit tested, this is just an alternative settings configuration
Bug: 180584913
Change-Id: Ide51afb7eb26a96c7692bceb0a22585a74f08aa7
Merged-In: Ide51afb7eb26a96c7692bceb0a22585a74f08aa7
2021-05-25 15:20:22 +01:00
Siim Sammul
5141d67365 Merge "Add buckets params to the binder latency atom" 2021-05-25 08:02:25 +00:00
Treehugger Robot
da915abc76 Merge "Use BinderDeathDispatcher for alarm listeners" 2021-05-21 23:45:59 +00:00
Yan Yan
94a4cdd4e8 Merge "Improve IKEv2/IPsec VPN by proposing more IPsec algorithms" 2021-05-21 22:00:30 +00:00
Yan Yan
cc258065e1 Improve IKEv2/IPsec VPN by proposing more IPsec algorithms
This commit allows IKEv2/IPsec VPN to propose more algorithms that
newly added in IpSecAlgorithm. Those new algorithms have stronger
security guarantees and better performances.

This commit also removes algorithm name validation because all
algorithms are URL encoded to ensure no special characters create
problems due to their use by VpnProfile for list or field delimiting
(e.g. rfc7539esp(chacha20,poly1305))

Bug: 185265778
Test: atest FrameworksNetTests, CtsNetTestCases
Test: All new algorithms are manually verified
Change-Id: I1de322c95aacc8924e95bcdbcfdbd1ec441de99c
2021-05-21 17:46:54 +00:00
Siim Sammul
039b201f7b Add buckets params to the binder latency atom
Cherry picked from internal: https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/14201550

Test: n/a - no functionality change
Bug: 180584913
Change-Id: I20d8f5632f76774cad64af30a6aa1f1ab172152f
Merged-In: I20d8f5632f76774cad64af30a6aa1f1ab172152f
2021-05-21 15:16:32 +00:00
Siim Sammul
d5dd055c7e Merge "Push the latency histograms to statsd" 2021-05-21 09:41:27 +00:00
Suprabh Shukla
715ecc2bac Use BinderDeathDispatcher for alarm listeners
This ensures only one JNI strong reference for the death recipient when
the same binder is used for multiple linkToDeath calls.

Test: atest CtsAlarmManagerTestCases
atest FrameworksCoreTests:BinderDeathDispatcherTest
atest FrameworksMockingServicesTests:AlarmManagerServiceTest

Bug: 186792832
Change-Id: Ieea2d8f4e495a4c4687378db9d0b8c6949a0406a
Merged-In: Ieea2d8f4e495a4c4687378db9d0b8c6949a0406a
2021-05-20 23:52:32 -07:00
Calin Juravle
95590e1a62 Merge "Update the use of registerAppInfo" 2021-05-20 21:46:00 +00:00
Siim Sammul
086d0dab4f Push the latency histograms to statsd
Cherry pick from master with no changes: https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/14161187

Test: unit tests, verified atom logging with statsd_testdrive
Bug: 180584913

Change-Id: I0b8db72c0cb3b285177bbe402ce37639c468dbf3
Merged-In: I0b8db72c0cb3b285177bbe402ce37639c468dbf3
(cherry picked from commit a28ccaf373)
2021-05-20 16:42:08 +00:00
Jeff Sharkey
ba5fa81923 Merge "add notification team as OWNERS of notification utils" 2021-05-20 13:44:03 +00:00
Siim Sammul
83d1954afe Merge "Include binder stats in battery stats" 2021-05-20 09:46:37 +00:00
Jeff DeCew
ac14604706 add notification team as OWNERS of notification utils
Change-Id: I0c773d253e080aabadc9d15ff945abd7eb2638f3
2021-05-19 20:32:31 +00:00
Patrick Baumann
1ef34e9022 Merge changes I04dfc5c2,Idc7e1f3c
* changes:
  Updates OWNERS files
  Update OWNERS file.
2021-05-18 19:03:06 +00:00
Dmitri Plotnikov
1956f4c700 Include binder stats in battery stats
Cherry picked from internal master: https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/11856226

Bug: 158232997

Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsBinderCallStatsTest
Change-Id: I2234776d710adf73c363bdfa6a334f3a6f36d986
Merged-In: I2234776d710adf73c363bdfa6a334f3a6f36d986
2021-05-18 12:18:05 +01:00
Siim Sammul
e6a97f86a7 Merge "Add plumbing to collect Binder stats for battery attribution" 2021-05-18 09:23:48 +00:00
Dmitri Plotnikov
474354593d Add plumbing to collect Binder stats for battery attribution
Cherry picked from internal master: https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/9966816

Bug: 158232997
Test: atest FrameworksCoreTests:com.android.internal.os.BinderCallsStatsTest

Change-Id: Icbccd26e20bc4ead13ffeac76b851af39269ca89
Merged-In: Icbccd26e20bc4ead13ffeac76b851af39269ca89
2021-05-17 15:42:17 +00:00
Nikita Iashchenko
c1edd696c7 Merge "Refactor StructCapUser{Header,Data} and StructLinger for API review" 2021-05-17 10:46:32 +00:00
Siim Sammul
0dadb6664a Merge "Change BinderLatencyBuckets to use int[] instead of ArrayList to improve performance." 2021-05-17 09:43:41 +00:00
Jeff Sharkey
a469054f27 Merge "Add OWNERS to com.android.internal.app.procstats" 2021-05-14 18:26:22 +00:00
Patrick Baumann
e6c0a4f8ce Updates OWNERS files
Bug: 186864416
Test: Builds
Change-Id: I04dfc5c2c7143825334ebc62742e335b8c889492
2021-05-14 15:45:42 +00:00
Calin Juravle
3e308c6270 Update the use of registerAppInfo
Pass additional parameters to ART to assist with better profiling
and debuggability.

Test: m
Bug: 182793486
Bug: 185979271

Change-Id: Iae0beab92194d75f191147578922c760f04470b9
2021-05-13 07:59:39 -07:00
Siim Sammul
9879f7fc17 Change BinderLatencyBuckets to use int[] instead of ArrayList to improve
performance.

Cherry pick from master with no changes

Test: unit test
Bug: 179999191
Change-Id: Id996b52b5cb69a85f9c6a932ea8d30336fcaf12a
Merged-In: Id996b52b5cb69a85f9c6a932ea8d30336fcaf12a
(cherry picked from commit 9d02e6101e)
2021-05-13 10:49:09 +01:00
Siim Sammul
fff7124d3a Store the collected binder latency samples in buckets to form a
histogram. Add the ability to generate histograms with varying bucket
counts and sizes.

This is a direct cherrypick with no changes

Bug: 179999191
Test: unit tests

Change-Id: I58d3cbdd9ae43c8da121ec41d994b077e29bb371
Merged-In: I58d3cbdd9ae43c8da121ec41d994b077e29bb371
(cherry picked from commit dcd3dc69a1)
2021-05-11 15:52:04 +00:00
Siim Sammul
5e6453dc94 Create BinderLatencyObserver to collect binder call latency stats.
Pushing these as a metric will come in a future change.

This is a direct cherrypick with no changes.

Test: unit tests

Change-Id: I8a123f7aed7c0ce416814372f2287b04a8a04ac0
Merged-In: I8a123f7aed7c0ce416814372f2287b04a8a04ac0
(cherry picked from commit 8d0ecde2b8)
2021-05-10 16:53:05 +00:00
vichang
ffe7986d71 Merge "Copy StringPool to framework" 2021-05-06 11:16:09 +00:00
Nikita Iashchenko
0a632252af Merge "Rename getters and setters android.compat.Compatibility.ChangeConfig" 2021-05-06 09:14:14 +00:00
Tom Natan
b9680bac79 Merge "Add an API method for clearing compat overrides on release builds" 2021-05-05 14:58:41 +00:00
tomnatan
2697018f70 Add an API method for clearing compat overrides on release builds
This will be useful when we want to clear overrides for apps that are no longer needed regardless of the version that is installed on device, e.g., when an app is being uninstalled, when we want to rollback an override, or when we deprecate a change-id.

In addition, rename CompatChanges#setPackageOverride to
addPackageOverrides.

Bug: 183183372
Test: atest FrameworksServicesTests:CompatConfigTest
Test: atest FrameworksServicesTests:PlatformCompatTest
Change-Id: Iff416c8b4c88b5eddc9e21c73219198d23266fa1
2021-05-05 07:10:41 +00:00
Baligh Uddin
3b92756733 Remove annotations that have been relocated
These annotations have been relocated to frameworks/libs/modules-utils.
This CL removes the files and updates necessary build rules.

Bug: 183133670
Test: TH
Merged-In: I024252070bd806d50d54377190fdc5cd5b4445e1
Change-Id: I834b9f5320e0b6fe8cb9feb7194c82085b805e07
2021-05-01 18:56:12 +00:00