Commit Graph

14448 Commits

Author SHA1 Message Date
Dmitri Plotnikov
9fca835a97 Add OWNERS for BatteryStats related files
Test: N/A

Change-Id: I6b17062eaf538849389528619067504f18e7b2ab
2021-09-09 18:24:17 -07:00
Hall Liu
f4fe3ac665 Update and expose ModemActivityInfo
Update ModemActivityInfo to present a nicer API surface and expose it as
a SystemApi. Also change clients in BatteryStats to match the new
surface.

This is part 1. Part 2 will modify the methods in TelephonyManager to
use a more up-to-standards threading model.

Bug: 170427831
Test: atest ModemActivityInfoTest
Change-Id: I762ed949342861c75d94eafce88335e7bd8c9139
Merged-In: I762ed949342861c75d94eafce88335e7bd8c9139
2021-09-07 11:40:55 -07:00
Treehugger Robot
0fa9d2ef6b Merge "Add suppressLintAnnotation on state.java" 2021-09-07 15:51:39 +00:00
wescande
4d65834880 Add suppressLintAnnotation on state.java
Test: Build
Merged-In: I02aa127e8e07f239561f4f2a3bbdfc6fccb82f7f
Change-Id: I5a22ebe6473fbf38494e20d629e763c331b1e1e6
2021-09-07 16:43:09 +02:00
William Escande
a6fb9459cc create library for mainline module
This library is a temporary work to link all mainline module using
statemachine.
Once this is done, we will be able to move the library to
frameworks/libs/modules-utils

also fix some typo in state* files

Bug: 198418216
Tag: #refactor
Test: None
Change-Id: I1bec7c7bdb25bf3397a742a356aa1f18fddf7d89
2021-09-06 15:28:09 +00:00
Daniel Norman
ada5fb65b5 Merge "Allow APEXes permission XMLs to declare features." 2021-08-30 19:09:21 +00:00
Daniel Norman
5f0797723c Allow APEXes permission XMLs to declare features.
This allows APEXes to include permission XMLs like the NFC XMLs in
frameworks/native/data/etc which declare NFC features.

(This also enables `unavailable-feature` declarations.)

Bug: 197680726
Test: Include an NFC permission XML in an APEX.
      Observe feature is set correctly in logs and by
      enabling NFC in Settings app.
Change-Id: Ied425b8897ab80df250d42cfbf0525634ed948aa
2021-08-26 11:57:23 -07:00
Orion Hodson
5e1c9fe7fc Merge "Drop system_server dexopt in ZygoteInit" 2021-08-26 14:35:24 +00:00
Jooyung Han
e53a76adec telephony: suppress warnings in AIDL
This was missed in 133879b683.

Emergency number list is internally represented as Map<Integer,
List<EmergencyNumber>>, which is not supported by AIDL.

Bug: 192615532
Test: m
Change-Id: I5dc8b0f94b13b6625bb31933c6488dc87c9db713
2021-08-25 15:17:56 +09:00
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
Jeff DeCew
1cbc573b93 Add notifications team as OWNERS of notification-related utilities and their tests
Change-Id: I153ab4e182a0843706c25f03c891a92eb48eea9c
2021-08-16 14:56:48 +00: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