If an app was in the TOP state and immediately moved
to a foreground service state, then try harder to keep it
in memory for another 20 seconds before releasing the
memory to bound foreground services. Using an oom_adj value
of 50 which is between "fore" and "vis". So BFGS apps might
get killed ("vis") before this recently FGS'ed app. That
way any app that has a lot of state in memory that it needs
to persist before getting killed has a chance to do so.
Also bind NotificationListeners with a special bind flag
to rank them below FGS (perceptible adj) so that they
can be killed before any other foreground services or
bound services get killed.
Bug: 110969183
Test: Manual for now. Take a bunch of portrait
pictures and hit home, while being under memory
pressure with a bunch of notification listeners.
Change-Id: Ie8934c2331afe6450c582b209869aeca7272f58a
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.
Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.
Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
This is a refactoring that should help us eventually split
DefaultPermissionGrantPolicy away from package manager
Specifically, this CL:
- Removes usages of PM-internal APIs from DPGP, such as
PackageParser.Package and PackageList
- Introduces APIs in PackageManagerInternal to replace the above
- Removes PackageManagerService as a middleman for default
sms and dialer app changes
This intentionally doesn't move DPGP yet, to make it easier to review what actually changed
Test: gts-tradefed run gts -m GtsPermissionTestCases -t com.google.android.permission.gts.DefaultPermissionGrantPolicyTest
Change-Id: Iff5b1a6b97888c496d982cf2ce656b58ed0a31a6
The PermissonController is going to become a mainline module, hence it
has to compile against @SystemApi. Hence all APIs needed have to be
upgraded.
Bug: 110953302
Test: Built
Change-Id: I329e062040bdb6dc20fd65baf71e025338d01c4e
This saves users from having to create a TypedValue, calling getValue, and then pulling out the float manually.
Test: none, just exposing existing functionality
Bug: 37116599
Change-Id: Ie4fcf51d64ec6113148e1fbf3c199cfff028f579
We created this API to make it easy to pass a given UserHandle into
all Managers obtained from a given Context, which works great for
"normal" users, but we should also support special users like ALL
and CURRENT.
Also add an AutoCloseable marker to make try-with-resources easier.
Bug: 112153259
Test: atest android.content.cts.ContextTest
Change-Id: I261dfcc5cfdfc76bda5d70181785e11c2715a558
These two libraries:
android.hidl.base-V1.0-java
android.hidl.manager-V1.0-java
are being removed from BOOT_JARS. This change facilitates linking to them
for libraries or prebuilts in or before P.
Test: atest android.content.pm.AndroidHidlUpdaterTest
Bug: 77307025
Change-Id: Ic0db24cc68d66f5dbfab126ce7e304eec0bfc969
The PermissonController is going to become a mainline module, hence it
has to compile against @SystemApi.
PackageManager#arePermissionsIndividuallyControlled controls how certain
permissions are presented in the UI, hence Permission controller needs
to read it. The value of this API comes from a config option.
Bug: 110953302
Test: Built
Change-Id: If78b1bb594af0c85e92abf70ae8315e7ba3f31fa
No need to create an extra field for a boolean flag. Move the recently
added ApplicationInfo.usesNonSdkApi to one bit in privateFlags.
This also solves an issue where the field was not propagated during
copying of the data structure.
Bug: 113315999
Test: phone boots
Merged-In: I09f8f39454c013a84893ac304904a4412fc542bf
Change-Id: I09f8f39454c013a84893ac304904a4412fc542bf
(cherry picked from commit a5b4df2a89)
No need to create an extra field for a boolean flag. Move the recently
added ApplicationInfo.usesNonSdkApi to one bit in privateFlags.
This also solves an issue where the field was not propagated during
copying of the data structure.
Bug: 113315999
Test: phone boots
Change-Id: I09f8f39454c013a84893ac304904a4412fc542bf