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
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
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
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
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
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
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>
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>
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
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)
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
This change adds a VpnRunner superclass to the LegacyVpnRunner in
preparation for the PlatformVpnRunner
Bug: 144246767
Test: FrameworksNetTests passing
Change-Id: I1b7da86d59c34f5d8c1ac13fb621f2e5d3bf8d26
* 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.
Move all StatsLog generated constants into ChangeReporter, to make
re-submitting http://ag/10194708 easier.
Bug: 145952197
Test: atest PlatformCompatTest ChangeReporterTest
Change-Id: Iccff9582099c58f070a6b6aeb1d2588b0fafa90a
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