This change adds logging for debuggable and test-only apps when they are
the caller and visibility of another app is blocked due to app
enumeration.
It also adds an adb command to turn logging on and off for other apps to
help developers while debugging issues.
Test: atest AppsFilterTest AppEnumerationTests PackageManagerPerfTest
Bug: 145623959
Change-Id: I1fa930ef40bf08b00c41f51aa25c50b2189395bf
Instead of using Bundle, explicitly specify params when initializing a data loader.
BUG: 150406132
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: I2f89d3c3ea1058fdbd689da0d5cb801bf4d9a0b4
Was lost in a rebase.
Bug: 150398686
Test: atest com.android.cts.devicepolicy.QuietModeHostsideTest
Test: manual verify no other ParsingPackage changes were lost
Change-Id: I3e17796433686ef38e24492c3255f5ccba1f431c
The UnsupportedAppUsage annotation was accidentally removed in
e6d7a2d022. Restore the method
signature/annotation.
Bug: 150681392
Test: none
Change-Id: I6c46a777c0dbd53fa67d6e1c3e09248f636fe82b
PackageInfoWithoutStateUtils is designed for use in core when
the caller doesn't have a PackageSeting.
Because its generic generateApplicationInfo method does a simplified
checkUseInstalled check without the PackageSetting, this fails whenever
state must be taken into account.
This introduces method variants which skips the checks and defers to
PackageInfoUtils's own check.
Bug: 150328400
Test: manual verify call into PackageManager#setSystemAppState with
SYSTEM_APP_STATE_UNINSTALLED and verify
PackageManager#getApplicationInfo throws NameNotFoundException
without fix and succeeds with fix
Test: atest com.android.server.pm.parsing
Test: TODO PackageInfo(WithoutState)Utils test in follow up change
Change-Id: Ie00984c2e1b80d2a3948923dc1293fbfddf01037
There are cases where an app can ship overlays for itself,
but the "signature" policy as described would open up
a vulnerability by allowing the system actor to create
and sign any arbitrary overlay that will apply to the target.
To prevent this, redefine "signature" as target package only,
and introduce "actor" for checking against the actor signature.
Any app that wishes to use both can include both policies.
Bug: 130563563
Test: m aapt2_tests idmapt2_tests and run from host test output
Test: atest libandroidfw_tests
Change-Id: I1c583a5b37f4abbeb18fc6a35c502377d8977a41
with appOp as String and options as Bundle
Bug: 139077993
Bug: 146423958
Test: Build
Change-Id: I5325e08d60016741139251813a5df9b42f2efc82
Merged-In: I5325e08d60016741139251813a5df9b42f2efc82
For the initial pass, everything was interned to take a
conservative approach.
But the time needed to intern every string has caused a significant
fixed cost every time the package is read from cache at boot.
This manually checks each string and removes interning from those
that are generally unique or don't have a significant benefit to
being interned.
Bug: 135203078
Bug: 141922546
Test: atest AndroidPackageParsingEquivalenceTest
Test: atest ScanTests
Test: atest PackageParserTest
Test: manual verify with PackageParsingPerfTest; see bug
Change-Id: I815bb92ec29d2ca38e8614d44937bc738599be55
4579c0aea2 changed the method signature
of the constructor of ResourcesKey, which is marked
UnsupportedappUsage. Restore the previous signature and provide a new
constructor that is hidden.
Bug: 147359613
Test: none
Change-Id: I391167e9064b1d88f4ad75200a190e5e3b0968cf
ApplicationInfo now automatically tries to "squash" the same instances in a
Parcel.
NOTE: This CL still does *not* optimize the package manager APIs that return a
list. e.g. PM.queryContentProviders() still return duplicate AppInfo's.
We can optimize them by making ParcelableListSlice call "allowSquashing",
but that *could* have negative side effects, so I'm not doing it in this CL.
I think we can do that for S.
Bug: 148588589
Test: atest CtsContentTestCases # except for two preexsiting failures:
- android.content.pm.cts.PackageManagerTest#testGetIcon
- android.content.pm.cts.PackageManagerTest#testGetPreferredActivities
Test: Use the debugger and make sure bindApplication() is not receiving
duplicate AppInfo's in the provider list.
Change-Id: I3ba2c047a469169340c0f75c36bdfd394bc5d627
(cherry picked from commit 7d09275d70)
Serialising package restrictions uses synchronous disk access; callers
of these methods should probably use background threads for this.
Bug: 149216360
Test: TreeHugger
Change-Id: I6607a7225bf7daaad8a78e4d1e4c585ba5ac3efc
Signed-off-by: Julius D'souza <jdsouza@google.com>
We use the package settings class as a central point for invalidating
on package information changes; for permission changes, we invalidate
from inside the individual permission data objects.
Bug: 140788621
Test: boots, package tests (pending)
Change-Id: Iec14d4ec872124e7ef4612c72d94c89a7319ace0
Make obtaining a visual service from non-visual Context instance
report a strict mode violation and print the stacktrace.
Make calling getDisplay() throw an exception if called on an instance
that is not associated with a display. For existing usages introduce
a new internal method that does not perform the verification until
the usages are properly fixed.
Bug: 128338354
Test: StrictModeTest#testIncorrectContextUse_GetSystemService
Test: StrictModeTest#testIncorrectContextUse_GetDisplay
Change-Id: Id25d590eca6e10066e55d7ed6436d3bc9e433beb
* changes:
Remove AndroidPackageWrite
Migrate to new ParsedComponents and ParseResult
Split ParsedComponents
Add ParseResult infrastructure
ParsingPackage/ParsedPackage test code migration
ParsingPackage/ParsedPackage split source migration
Important migration for new ParsingPackage/ParsedPackage split
Separate ParsingPackage into core and ParsedPackage into server