On low RAM devices, there can be potentially OOM issues when
APEXs are too large, causing large buffers to be allocated when
computing the SHA256 digest of those APEX packages.
This change introduces the usage of DigestInputStream with
different buffer sizes according to the state of device (whether
it is a low ram device or not) to cap the memory usage.
Buffer size is currently derived experimentally at either 1kB or
1MB.
Bug: 217596264
Test: Manual.
Change-Id: I1964ef9d7047496a758c7f427910f116be89fc51
Add entries for the files that the Android time team have to update
occasionally.
Bug: 218802673
Test: None
Change-Id: I1255ac04e91c37051bdf4f72acea5cae4aca99db
- Make UI show on the settings by default.
- Remove icon of system language entry.
Bug: 219384592
Test: local
Change-Id: I0d6dff0461d3e8c5cdfe1329cdd6592dd053ea43
This is more correct. Android devices, even under ideal conditions,
don't track UTC (which contains leap seconds and uses the SI definition
of a second) but use a clock based on Unix epoch time (no leap seconds,
but clocks may skip/stop or smear around leap seconds to ensure a fixed
number of second increments per calendar day when leap seconds are
applied to UTC).
Bug: 218802673
Test: Compile only
Change-Id: I0c557e2231f87ea1b99e3935f79af15bccf91da4
In Android T - large screen device, we're going to hide the back button for
all secondary layer pages in the Settings app.
Bug: 219000314
Test: See flag in developer page.
Change-Id: I8a8151cd4a534bc1707e1dd19398acf9a2b5fe9d
This works by separating an app launching to 2 phases
(similar to legacy fixed rotation). First it launches
the app into a different rotation. Once the animation
finishes it creates a new seamless display-rotation
transition.
Because we have displayRotation in windowconfiguration,
we can directly rotate a window's surface instead of
checking explicitly for fixedRotationState. Since the
second-phase is a transition, we don't (ab)use
seamlessRotator. Once the display lines-up, the
surfaces and configurations automatically update.
Since we still want to explore shell-transitions style
rotation (single-transition), add a system property
to turn it off and on.
Bug: 217560545
Test: existing tests and manual tests
Change-Id: I0b34b32ff5b2650a519d3c195df452de446cf515
Hide dark theme bedtime settings from the settings because the
preinstalled Digital Wellbeing hasn't supported that yet.
Test: manually check the visibility of dark theme bedtime settings in
the settings app after toggling the corresponding feature flag
Bug: 217866453
Change-Id: I71704bb6d09176e0854c527dc86a6a0041d01140
The "legacy" fs-verity was introduced in P in Pixel 3 kernel. During
fs-verity upstream to Linux, the API has changed. During Pixel 4 / Q
development, fs-verity was upstreamed to Linux kernel. By setting
ro.apk_verity.mode = 2, device vendors such as Pixel 4 can opt in to
enable the support. The feature has become mandatory for new devices
shipped with R.
Since Pixel 3 family is no longer supported, it's time to remove the
dead code.
Bug: 120629632
Test: m
Test: TH
Change-Id: I6dacd9bbd38b502ee510ff12970e76342d7b72dd
Merged-In: I6dacd9bbd38b502ee510ff12970e76342d7b72dd
* changes:
Clean <plurals> in DateTimeView
Clean <plurals> in CertificateMonitor
Clean <plurals> in FillUi
Clean <plurals> in BugreportProgressService
Clean <plurals> in keyguard
Clean <plurals> in ChooserActivity
Clear <plurals> in TextUtils
Clean <plurals> in FindActionModeCallback
Clean <plurals> in ZenModeConfig
Add util class for plurals
* changes:
Expose the bg restriction exemption list as an internal API.
Add an action button to the notification for bg battery abusive apps
Exempt certain app behaviors for their background battery usage
Add tracking on abusive broadcast and service binding requests
Add exemption cases for app background restrictions
Monitor long-running foreground services
Post notification on abusive background current drain
Allow limited alarms/jobs when background restricted
Cap the LRU position of broadcast receivers in bg restricted apps
Add a tracker on background current drains for each uid
Add background restriction levels definition and its controller
If the app is hosting media playback or location foreground services,
or has active media session, the background battery usage during that
will be excluded from the abusive background battery usage monitoring.
Bug: 200326767
Bug: 203105544
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: I7ddeffe3490608ee3f005af6f4722270756085a3
On detecting excessive battery usage of a background uid, we may
move the background restriction of the apps running in this uid to
more restrictive levels.
Bug: 200326767
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: I6c2d41e44367a283d8aa9491be683018a80a810c
The "legacy" fs-verity was introduced in P in Pixel 3 kernel. During
fs-verity upstream to Linux, the API has changed. During Pixel 4 / Q
development, fs-verity was upstreamed to Linux kernel. By setting
ro.apk_verity.mode = 2, device vendors such as Pixel 4 can opt in to
enable the support. The feature has become mandatory for new devices
shipped with R.
Since Pixel 3 family is no longer supported, it's time to remove the
dead code.
Bug: 120629632
Test: m
Test: TH
Change-Id: I6dacd9bbd38b502ee510ff12970e76342d7b72dd
This CL adds the definition of background app restriction levels.
The existing various system background app restriction features will
be mapped into the levels here, including app standby buckets,
background restrictions (forced-app-standby) etc. Future CLs may
apply restrictions to background apps accordingly.
BYPASS_INCLUSIVE_LANGUAGE_REASON=Legacy API name
Bug: 200326767
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: Icf82031c572e7b8e82e6528402e9df4de5b7a675
The test config takes longer than 900 seconds to run. Move it to a
dedicated group for running slow presubmit Test Mapping test.
Some more context is in the referenced bug, e.g, b/174495337
The group will work exactly the same as presubmit for now.
Bug: 174654670
Bug: 174495337
Fix: 215431363
Fix: 215549069
Test: treehugger
Change-Id: Id9769bbc625b42257af603d69098ae69c0fabb80
Merged-In: Id9769bbc625b42257af603d69098ae69c0fabb80
(cherry picked from commit ccc91c4fa9)
This method is used for accumulation of long values: if
the key does not exist, one is created. If one already exists,
the passed value is added to the previous value.
This method is similar to the existing
SparseDoubleArray.incrementValue() method
Bug: 215427055
Test: atest FrameworksCoreTests:SparseLongArrayTest
Change-Id: I771d9bc2bdd12ca4260b20186ced70f5862b6f56
This reverts commit 331be9a643.
Reintroducing ag/16366278 since it seems unrelated to b/214053959 (more details on b/214053959#comment55).
Original commit message:
Migrate unsafe parcel APIs in framework-minus-apex
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()
This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).
A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.
Bug: 195622897
Change-Id: I272432e6e082a973f7a50492ec35d79c2b577c93
Test: TH passes
This facilitates exposing the Parsed_ classes as
@SystemApi(client = SYSTEM_SERVER) while keeping everything inside
services.jar rather than having it split across both jars.
This reverts getPackageArchiveInfo to use legacy PackageParser, since
framework.jar can no longer access the moved classes.
Bug: 214038417
Test: presubmit, no logic changes
Change-Id: I152d70fb4f643d32efb012cfb20b0fbc5f88f2d8
Currently, 'dumpsys activity' can dump the state of some managers:
- AutofillManager
- ContentCapturemaanger
- UiTranslationController
But the support for these custom dumping is hardcoded into
Activity itself, which makes it harder to extend. For example,
automotive builds provide an app-side Car object, which currently
cannot be dumped.
This CL makes the mechanism more flexible by providing a couple new
public / SystemAPIs that let Automotive (or other mainline modules)
extend it.
Examples:
$ adb shell dumpsys activity com.android.car.carlauncher/.CarLauncher --list-dumpables
$ adb shell dumpsys activity com.android.car.carlauncher/.CarLauncher --dump-dumpable CarUserManager
$ adb shell dumpsys activity service com.android.systemui/.SystemUIService CarUserManager
NOTE: this CL only adds the new APIs; a follow-up CL will change the
existing managers to use them.
Test: see above
Test: m update-api
Bug: 149254050
CTS-Coverage-Bug: 149254050
Change-Id: I6920ff3542d3d75edd667c2c7658e9d0a7af534f