1. Create intent receiver in StatsCompanionService to listen to shutdown
events.
2. Create StatsWriter class to handle disk writes and deleting files.
3. Update StatsLogProcessor, ConfigManager, and StatsService to handle
files on disk using StatsWriter.
4. Add a wrapper for ConfigMetricsReport.
Still TODO is to be able to add a guardrail to prevent accumulating
excessive amount files on disk, which will be followed up by another
change.
Test: statsd, statsd_test
Change-Id: Ia0b3af315af545daa8b0078b3700c600aa7c285f
Parse flags are often used confusingly to control policy during
APK parsing. Additionally, some flags [such as PARSE_IS_PRIVILEGED
or PARSE_IS_SYSTEM] aren't always determined based upon APK location
[they change based upon which apps are installed]. This means we
have to perform some gymnastics to set them correctly _before_
parsing a package.
Instead, these should be scan flags that can be determined at a
later point during package parsing. Then, based upon the scan flag
we apply policy on the package object to create the resulting
data structures.
Bug: 63539144
Bug: 69663125
Test: Manual; it builds, runs and applications can be installed / removed
Test: bit FrameworksServicesTests:com.android.server.pm.
Change-Id: I53fb18e58544e0a39f35eb6fb53c950e5c696aee
This patch uses the recently added MacAddress class in WakeupEvent and
WakeupStats for replacing the byte array representation of dest mac
addresses in packet wakeup events.
Bug: 28806131
Test: runtest frameworks-net
Merged-In: I5a3c76498a4b720f0d9308a65b5dd4b32377d0d1
(partial cherry pick from 884970e0ba)
Change-Id: I878d51d4cc53c6d9a2cc3c55faa15b86156afbd7
Foreground uids can run their jobs immediately given other constraints
are met. Other jobs will be delayed by 3 seconds when coming out of
doze to ensure imminent user tasks like screen-on can use resources.
Also added an API to allow apps to indicate their job is important to
the user enough that it is allowed to run when the app is in the
foreground or on the temp whitelist regardless of the dozing state of
the device.
Test: cts-tradefed run singleCommand cts-dev -m JobScheduler -t \
android.jobscheduler.cts.DeviceIdleJobsTest
Bug: 64291952
Bug: 64071030
Change-Id: Id52cb4386e683d4f8297e873b3a68c573e5be743
Adds publicly-visible API for compile SDK version and codename. AAPT2 does
not support these yet, but that will be included in a follow-up CL.
Also refactors the Unsupported Display Size dialog out to a generic app
warnings manager class and fixes a bug there where the "always show"
preference was not persisted.
Improves documentation around threading and concurrency guarantees.
Bug: 64107584
Fixes: 68995409
Test: CtsActivityManagerDeviceTestCases
Change-Id: Ic86efa554b8b1caf80e5e004fda897d3483a68e8
It is now just a shell of itself. :)
Also brings in a few fixes to never try to open files from the system
process.
Test: manual
Change-Id: Ia8187196af597046fd2e7092dbf19ce1dc1ea457
After Change-Id: Ibaba2ddd4f94fced1a2a7bfcfb91189302ec7f3a was merged,
KeyChain, by default, made keys installed in it not user-selectable,
which means users could not choose those keys in the Certificate
Selection prompt.
This is the correct behaviour (secure by default), but means the
DevicePolicyManager has to explicitly set keys as user-selectable
to be compatible with the previous behaviour.
This CL does the following:
* Adding an installKeyPair variant to the DevicePolicyManager to
allow specifying user-selectability of the key.
* Make old installKeyPair variants delegate to the new variant,
with the default of setting installed keys user-selectable.
* Modify the DevicePolicyManager service definition and service to
take the extra user-selectability parameter and set the value
in KeyChain.
Note that the reason the CTS test started failing is not related to
this change but a CTS Verifier test should catch the problem this
CL is solving.
Part of the fix for b/69337278
Bug: 69337278
Test: cts-tradefed run commandAndExit cts-dev -a armeabi-v7a -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testKeyManagement
Change-Id: Ifc240ed4a20a9d00bc6140dfb45bd1140e1f8260
So that apps can disable/enable receivers/jobs/etc. that
would only need to run to post notifications to the blocked
channel(s).
Additionally let apps retrieve an individual group so they
can inspect blocked state.
Change-Id: I733b70c62cd0482d0cf9692ea9b00cf313ad7b81
Fixes: 36530302
Test: runtest systemui-notification, cts
Schedule a job for idle + charging to kick off
writing out brighness slider events.
While writing events discard ones outside our
time window.
Bug: 69405990
Test: Manual using adb to kick off job.
Test: runtest -c com.android.server.display.BrightnessTrackerTest frameworks-services
Change-Id: Ibc79d1c80ced26827d6f985bc70ae165df106a42