Commit Graph

12000 Commits

Author SHA1 Message Date
Anna Trostanetski
33e09a3630 Merge "Add support for LoggingOnly changes" 2020-03-09 10:53:02 +00:00
Christian Wailes
3bc5168281 Merge "Teaches the ProcessCpuTracker about USAPs." 2020-03-06 18:11:53 +00:00
Automerger Merge Worker
627bfca085 Merge "Start process of next activity with top priority in advance" am: efbcd6752d
Change-Id: I8e8dd0f20cd3a783e49468a7657e571812bca3eb
2020-03-04 23:54:10 +00:00
Treehugger Robot
efbcd6752d Merge "Start process of next activity with top priority in advance" 2020-03-04 23:41:40 +00:00
Chris Wailes
03c842dd30 Teaches the ProcessCpuTracker about USAPs.
This CL updates the ProcessCpuTracer.getName method to force a refresh
of the process name when the current state indicates that it was named
either 'usap32' or 'usap64'.  This will prevent false attribution of
process statistics to system service processes.

Bug: 146614089
Test: Treehugger
Change-Id: Ieca4715b7aeb44ef7d1ec98773b25bdfa0a9fc6b
2020-03-04 13:40:28 -08:00
Riddle Hsu
364f2500e5 Start process of next activity with top priority in advance
In common cases, to resume the next activity we need to wait for the
current one to be paused. Since starting a process for activity is
asynchronous, if we already know the process of next activity has not
started yet, we can start the process earlier so the time waiting for
the pause to complete can be saved.

Also if the launching activity is going to be the top app, we can set
the top schedule group right after its process is started so the start
time before actually launching the activity can be improved.

Although before the current activity is paused, the next top activity
may still change and results some empty processes. That should not be
a common case and the process is still useful when going back the stack,
and the empty background processes are easier to be reclaimed.

Bug: 123043091
Test: AppLaunchTest
Test: Launch calculator from launcher, the event log am_proc_start will
      show "pre-top-activity".
Test: Cold launch a top activity, the system log should not show
      "not expected top priority".
Test: Use startActivities to start serveral activities in a sequence.
      Check "adb shell cat /proc/$pid/task/$pid/cgroup" for each process.
      Only the last one has top-app, others are background.

Change-Id: I9601b66e7cc0855fd7c2b573ded31fcf8d0711ae
Merged-In: I9601b66e7cc0855fd7c2b573ded31fcf8d0711ae
2020-03-03 16:36:46 -08:00
Automerger Merge Worker
a397dcf462 Added telephony display info support am: 987b8df24d
Change-Id: I28a8a4445b9daf4f9f34abf003bc2d4245692875
2020-03-03 21:20:57 +00:00
Jack Yu
987b8df24d Added telephony display info support
Added the new APIs allowing clients like System UI to display
network icons correctly based on the provided telephony display
info.

Test: Telephony sanity tests
Bug: 148540139
Change-Id: I4dfb6eb7a313539e0565a4239d555426f12e503e
Merged-In: I4dfb6eb7a313539e0565a4239d555426f12e503e
2020-03-03 11:21:05 -08:00
atrost
ce6f5d3857 Add support for LoggingOnly changes
Throw an exception if someone tries to add an
override for a logging only change. Incorporate the restriction in the
OverrideValidator.

Test: change one change to be logging only, flash device, adb shell
dumpsys platform_compat
Test: atest com.android.server.compat.CompatConfigTest
Test: atest com.android.server.compat.OverrideValidatorImplTest
Bug: 148009004

Change-Id: I379c63f8b5c54500d9066be9363a186efd55d200
Merged-In: I379c63f8b5c54500d9066be9363a186efd55d200
2020-03-03 15:18:39 +00:00
Automerger Merge Worker
55e52fcf66 Merge "Delete size limitation for ContrastColorUtil.isGrayScale() method. loss of performance is tiny because, image will be resized at ImageUtil.isGrayscale() method." am: 8157fac634
Change-Id: I3abd10637d164a5501d380af70ae2a98afbc84bb
2020-03-02 18:55:28 +00:00
e.min
3daed10832 Delete size limitation for ContrastColorUtil.isGrayScale() method.
loss of performance is tiny because, image will be resized at ImageUtil.isGrayscale() method.

Test: situation that one notification is sended to other resoltion devices, ex) using DEX mode,
Test: notification can be inflated at different resolution context.
Test: and app can have notification icon that is made dynamically.
Test: (it doesn't have resource for each resolution. ex: calendar notice icon with number)
Test: at this moment, judgement for grayscale can be differed from each device.
Change-Id: I2755c56869aba58287137f683a81ec4ddfd3d7c1
2020-02-25 10:53:09 +09:00
Automerger Merge Worker
951e7254cb Merge changes Ie5fa2605,Ia092e896 am: 140049bce8
Change-Id: I20fd969e2124c228506e11540bdea04676684530
2020-02-20 23:03:24 +00:00
Automerger Merge Worker
9e8e0a546c Use bpf data when available for per-UID cpu stats am: 57635c976b
Change-Id: I1cba7c38a846793d2e019a68ea246bdee1f3f36a
2020-02-20 23:03:18 +00:00
Connor O'Brien
140049bce8 Merge changes Ie5fa2605,Ia092e896
* changes:
  Use bpf data when available for single-UID cpu stats
  Use bpf data when available for per-UID cpu stats
2020-02-20 22:45:53 +00:00
Automerger Merge Worker
310c1b76ea Merge "Check argument in PowerProfile.getNumCoresInCpuCluster" am: 74952231df
Change-Id: Id1bf2fa710c24ba76efbc5ad9b83dab63b8c334a
2020-02-20 10:47:24 +00:00
Treehugger Robot
74952231df Merge "Check argument in PowerProfile.getNumCoresInCpuCluster" 2020-02-20 10:36:46 +00:00
Automerger Merge Worker
ff39b8ba90 Merge changes from topic "settings-vpn" am: 70f90282ef
Change-Id: If7e8310306889b38527bfab65316a50807814372
2020-02-19 07:51:20 +00:00
Benedict Wong
70f90282ef Merge changes from topic "settings-vpn"
* changes:
  Minor cleanup
  Add support for starting IKEv2/IPsec VPNs from settings
  Add always-on VPN support for platform VPNs
2020-02-19 07:39:41 +00:00
Benedict Wong
24a2be8275 Add support for starting IKEv2/IPsec VPNs from settings
This commit allows the startLegacyVpn() call to start Platform VPN
profiles, allowing Settings to use the IKEv2/IPsec VPN options

When using an aliased private key, the
Ikev2VpnProfile.KEYSTORE_ALIAS_PREFIX must be prepended to the front of
the alias. This will in turn result in the fromVpnProfile() function to
pull the key from the KeyStore, as opposed to the inline-key that the
VpnManager API uses.

Bug: 148991741
Test: FrameworksNetTests passing, new tests added in subsequent CL
Test: Manually tested
Change-Id: Icbca695c353b2e12e99305676404dbf1a4495949
2020-02-19 02:44:34 +00:00
Connor O'Brien
cd834de67c Use bpf data when available for single-UID cpu stats
Update KernelSingleUidTimeReader to read BPF data rather than per-UID
proc files when the BPF data is available. This is implemented by
calling libtimeinstate functions via JNI.
Extend KernelSingleUidTimeReaderTest to exercise both the BPF and proc
file code paths.

Bug: 138317993
Test: KernelSingleUidTimerTest passes
Test: no regression in BatteryStatsTests
Change-Id: Ie5fa2605007e8c5f70a0383bf8adbd81d479abfe
Merged-In: Ie962ddd9e30d96aa0fab6104a4164af9ad02f55e
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-02-19 00:22:14 +00:00
Connor O'Brien
57635c976b Use bpf data when available for per-UID cpu stats
Update KernelCpuUidTimeReader and its subclasses to support reading
frequency, active & cluster times from BPF maps rather than proc files
on devices that support this approach. BPF-based accounting offers
improved accuracy as it can detect every context switch, whereas the
proc files attribute a full tick period to whatever happens to be
running when the tick occurs.
Add a KernelCpuUidBpfMapReader class modeled on
KernelCpuProcStringReader, with singletons for reading each distinct
set of data. These follow the locking approach used by
KernelCpuProcStringReader to ensure thread safety, but they collect
data by calling libtimeinstate functions via JNI rather than reading
text from proc files. They also provide a getDataDimensions() function
to retrieve information currently provided by the header rows of the
proc files, such as the list of available freqs or the number of cores
on each cluster.
Extend the KernelCpu*TimeReaderTest classes to exercise the BPF path
for each reader class, and add a KernelCpuUidBpfMapReaderTest modeled
on KernelProcStringReaderTest.

Bug: 138317993
Test: KernelCpu*TimeReaderTests and KernelCpuUidBpfMapReaderTest pass
Test: no regressions in BatteryStatsTests
Change-Id: Ia092e896028e5f647f6c182de05fa76c7e2e3180
Merged-In: Ie7c0b11a47289e16f72fd6868de4185e858c7e4f
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-02-19 00:20:52 +00:00
Treehugger Robot
28c43860ea Merge "Consume health HAL 2.1 values from framework" am: 217aadd0c2
Change-Id: I5cf49ce94dcb28566bb37edb2583a300630f618e
2020-02-18 21:12:32 +00:00
Evgenii Stepanov
79b70781fd Merge "Refactor NativeHeapTagging compat feature." am: 077e78a71f
Change-Id: I6e51200ae57c78c45c503d481ef66b14eb8544c3
2020-02-18 20:53:51 +00:00
Treehugger Robot
217aadd0c2 Merge "Consume health HAL 2.1 values from framework" 2020-02-18 20:45:15 +00:00
Evgenii Stepanov
077e78a71f Merge "Refactor NativeHeapTagging compat feature." 2020-02-18 18:47:55 +00:00
Stephane Lee
90bf87449f Consume health HAL 2.1 values from framework
Bug: 148816661
Test: Ensure that there are no issues with the time to full when
charging
Change-Id: Ie21d451432cd65a91303a8faf40df64935f5c4bb
2020-02-15 16:51:02 -08:00
Calin Juravle
7d3380d672 Merge "Pass system server class loader context when asking GetDexOptNeeded" am: d42527b844
Change-Id: I3d8b53f7e039d8d6eb3c8cf7e9bf8e5662ccff49
2020-02-15 01:37:12 +00:00
Calin Juravle
d42527b844 Merge "Pass system server class loader context when asking GetDexOptNeeded" 2020-02-15 01:18:03 +00:00
Calin Juravle
4cae6f7fd0 Pass system server class loader context when asking GetDexOptNeeded
Test: reboot and check system server jars are not dexopted
Bug: 147208643
Change-Id: I6a612d04b08be23984b04e71e1c8938025d5e4ea
2020-02-14 15:05:38 -08:00
Ivan Lozano
cd3df3eeeb Merge "Remove execute-only memory related code." am: 615ef33216
Change-Id: I7cb27a466c9260f2243e24ac57c4d3b31e7acf80
2020-02-14 20:11:57 +00:00
Ivan Lozano
0d496a7107 Remove execute-only memory related code.
The kernel no longer enforces XOM layouts, and the build system no
longer generates XOM binaries. As a result, the zygote code to mark XOM
sections of memory readable for apps with targetSdkVersion<Q.

Bug: 147300048
Test: m -j
Change-Id: I0abb0abb54f8f5a538da9194a900e6a64e574bfe
Merged-In: I0abb0abb54f8f5a538da9194a900e6a64e574bfe
2020-02-14 18:43:24 +00:00
Evgenii Stepanov
fc27d03bef Refactor NativeHeapTagging compat feature.
Move the logic to startProcessLocked so that it can use app info/flags.

Bug: 135754954
Test: NFC
Change-Id: I50cfb8d0ec4ce1f79dec56b8bef09752a1b37490
Merged-In: Ief86185c6866640700e2548259df9ba1fb617e4d
(cherry picked from commit 5750d3b153)
2020-02-14 10:43:18 -08:00
Automerger Merge Worker
aee51d9eab Merge "Do not disable tracing in zygote." am: 88be2985c4
Change-Id: If850e4ff9da2b0c1259a366caac1fd95a8eb1c3c
2020-02-13 16:07:04 +00:00
Florian Mayer
5845bdf66e Do not disable tracing in zygote.
We now use the sequence number of the atrace tag rather than a Binder
transaction, so zygote can observe changes to the tags.

Test: m
Bug: 137366208
Bug: 147667830

This is a cherry-pick of e38797be84.

Change-Id: I50e32a19c538dd255097c035836504b4746b172b
Merged-In: I50e32a19c538dd255097c035836504b4746b172b
2020-02-12 17:35:15 +00:00
Automerger Merge Worker
3e07b3a7f3 Merge changes I5a01d709,I1b7da86d am: 95d9c6164b
Change-Id: I7079ddf41c18c3c073e3a0234fbd15f40a339315
2020-02-06 01:10:49 +00:00
Benedict Wong
95d9c6164b Merge changes I5a01d709,I1b7da86d
* changes:
  Add Skeleton Ikev2VpnRunner class
  Add VpnRunner abstract class
2020-02-06 00:55:05 +00:00
Benedict Wong
e0b672d117 Add VpnRunner abstract class
This change adds a VpnRunner superclass to the LegacyVpnRunner in
preparation for the PlatformVpnRunner

Bug: 144246767
Test: FrameworksNetTests passing
Change-Id: I1b7da86d59c34f5d8c1ac13fb621f2e5d3bf8d26
2020-02-04 21:17:37 +00:00
Automerger Merge Worker
5f603929da Merge changes Icb062ffb,I66c4e8f5,I85247411,Id47c19b7,Ib713c4ae, ... am: 0b32981970
Change-Id: I6b601f88b8411de9d1a5551d9b9b6c3e329087f4
2020-02-04 13:30:03 +00:00
Chalard Jean
0b32981970 Merge changes Icb062ffb,I66c4e8f5,I85247411,Id47c19b7,Ib713c4ae, ...
* changes:
  [NS A36] Add a test for lost trusted capability
  [NS A35] Send updated scores to factories at the end.
  [NS A34] Still more simplification
  [NS A33] Unify changing the default network
  [NS A32] More simplification
  [NS A31] Simplification
  [NS A30] Note linger out of the rematch loop
  [NS A29] Call LOST callbacks at the end of the rematch.
  [NS A28] Move setting the default network out of the rematch loop.
2020-02-04 13:14:27 +00:00
Chalard Jean
9f0e8ddad5 [NS A28] Move setting the default network out of the rematch loop.
Bug: 113554781
Test: FrameworkNetTests NetworkStackTests
Change-Id: I02d85f17bf0ea37ae173f306f5a47d7551773c3a
2020-02-04 16:23:58 +09:00
Automerger Merge Worker
12dbda915d Merge "ims:rcs uce update Add call composer, standalone chatbot feature tags for UCE" am: b20182a741
Change-Id: I13834d78aca6739151935b8730370ca79e0088c1
2020-02-04 07:20:32 +00:00
Treehugger Robot
b20182a741 Merge "ims:rcs uce update Add call composer, standalone chatbot feature tags for UCE" 2020-02-04 07:08:51 +00:00
Automerger Merge Worker
a8116d930c Merge "Minor refactor of ChangeReporter and PlatformCompat" am: 55d16fac97
Change-Id: I691696fa0ffa50c87bb3afb26173f4cc595453a2
2020-02-03 12:46:12 +00:00
Treehugger Robot
55d16fac97 Merge "Minor refactor of ChangeReporter and PlatformCompat" 2020-02-03 12:37:48 +00:00
Automerger Merge Worker
c9f42024cd Merge "Fix comments on ChangeId." am: 74e47edc82
Change-Id: I4c10072f6d20071cefb08338c9903275ba6ad69e
2020-02-01 16:00:13 +00:00
Automerger Merge Worker
892e354de9 Merge "Remove try-catch from LocationPermissionChecker" am: 497afcff0c
Change-Id: Iba17dc925db09447e71e766c5fac254128f820d1
2020-01-31 16:43:37 +00:00
atrost
e0c0823569 Fix comments on ChangeId.
This allows them to be used in doc generation.

Test: m -j offline-sdk-docs
Bug: 144927670
Change-Id: I849975c8bf880433490b42d514f3c8089029b497
2020-01-31 14:50:43 +00:00
Andrei Onea
1220afbd75 Minor refactor of ChangeReporter and PlatformCompat
Move all StatsLog generated constants into ChangeReporter, to make
re-submitting http://ag/10194708 easier.

Bug: 145952197
Test: atest PlatformCompatTest ChangeReporterTest
Change-Id: Iccff9582099c58f070a6b6aeb1d2588b0fafa90a
2020-01-31 14:30:28 +00:00
Qingxi Li
0b61b3d716 Remove try-catch from LocationPermissionChecker
Since LocationPermissionChecker#checkLocationPermission will be
used in ConnectivityService and the try-catch style will end up
in unwinding the stack. This CL remove the try-catch block from
this check function.

Bug: 148460709
Test: atest LocationPermissionCheckerTest
Change-Id: Ia97b3d8b1a96aca10fd87876969c290818e7e758
Merged-In: Ia97b3d8b1a96aca10fd87876969c290818e7e758
2020-01-31 01:06:17 +00:00
Qingxi Li
df40c6dd2f Merge "Update location permission check for ConnectivityUtil"
am: 1e5d7a9020

Change-Id: Ic9a61ab57335f778c856ec226ded08a86dc22fc0
2020-01-27 15:21:59 -08:00