This CL fixes a bug that SharedLibraryInfo.isNative() returns false
even for native shared libraries. This was because when a
SharedLibraryInfo is copied to a new SharedLibraryInfo (to add some
extra info about declaring package, etc.), the native-ness was
mistakenly ignored. Fixing the issue.
Also, the old constructor of SharedLibraryInfo that doesn't accept the
native-ness was removed to prevent similar mistakes.
Bug: 142191088
Test: atest CtsUsesNativeLibraryTest
Test: write an app that calls PackageManager.getSharedLibraries()
and inspect the mIsNative fields in the returned list. Entries for
native shared libs all have mIsNative=false. Will add a testcase to
the CTS test when isNative() becomes an API.
Change-Id: I35d9530f332614e0444448feec70a4461c9bbfa8
1. Add a new permission START_FOREGROUND_SERVICES_FROM_BACKGROUND.
2. Add a new bind flag BIND_ALLOW_FOREGROUND_SERVICE_STARTS_FROM_BACKGROUND
3. BroadcastOptions.setTemporaryAppWhitelistDuration() is currently
protected with CHANGE_DEVICE_IDLE_TEMP_WHITELIST permission, also open
it for START_ACTIVITIES_FROM_BACKGROUND and
START_FOREGROUND_SERVICES_FROM_BACKGROUND permission.
4. Exempt SYSTEM_ALERT_WINDOW permission.
5. if Context.startForegroundService() or Service.startForeground() is
restricted by BG-FGS-launch restriction, and app's targetSdkVersion is S
and above, throw a IllegalStateException.
Bug: 171305836
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsBindingFlagFGS
atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsBindingFlagActivity
atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsStartSystemAlertWindow
atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsStartFromBGException
Change-Id: Iff3ed65e174a8406d4d6045cda42bdde6cecf30d
Instead of returning the package/property name from the
query methods, make it part of the Property object itself.
Bug: 169258655
Test: atest FrameworksServicesTests:PackageParserTest
Change-Id: I1c620cde317dc05fb49367a226a612bc01ae7f55
In preparation for permission BROADCAST_CLOSE_SYSTEM_DIALOGS
(go/close-system-dialogs), which will be signature|recents in order to
lock down Intent.ACTION_CLOSE_SYSTEM_DIALOGS. That intent is used by
recents when it's invoked.
Currently, recents is configured via existing config
config_recentsComponentName, so using that to determine the recents
package in PM.
It's my understanding that the package defined in such config will be
responsible for recents no matter which launcher is active. It's also my
understanding that the package being explicit in the system config means
that package has to come from the system image, hence it's fine to use
ensureSystemPackageName() in PM. Please advise if any of
this is wrong.
Test: Will work on CTS once we agree on the proposal here.
Bug: 159105552
Change-Id: I9f73e1f05d8df26666da156b672e370dce5030de
Initial implementation of the Property class. It's not
used yet, but will be.
Define new <property> tag in manifest
Bug: 169258655
Test: atest FrameworksCoreTests:PackageManagerPropertyTests
Change-Id: I1809a82e5af4bfdd26e375d9038b632947ad91c0
The purpose of this API is to verify whether a context is an
UI context or not. We can also leverage the jetpack WindowManager
to all kinds of UI contexts v.s. Activities only currently by
release this API.
Bug: 170275820
Test: atest ContextIsUiContextTest
Change-Id: I334b63e555331e46d0a94ec9f721bd675f1ab331
Previous changes have applied mechanical refactorings, but this change
hand-migrates the remaining logic which was too complex to identify.
This change should have no behavior change; famous last words.
Bug: 171832118
Test: manual
Change-Id: I73f63cdb84d27e87c2af5a36d043cc225f1c749c
Having a hidden abstract method for a class that can be extended
means that public implementors cannot implement these hidden methods
posing a risk that custom implementations will not have required
abstract methods resulting in an exception.
Bug: 151134792
Test: make update-api
Change-Id: I758d12465fabc671be19bedeeceb16885de23c87
Merged-In: I758d12465fabc671be19bedeeceb16885de23c87
Exempt-From-Owner-Approval: large scale suppression of existing issues,
no-op in terms of behavior
This API will be used by Exo to determine whether the Activity supports
only portrait or landscape.
Bug: 172927807
Test: make
Change-Id: I290b051b645e2bfb9eff9b615b44a08fe439ceca
Having a hidden abstract method for a class that can be extended
means that public implementors cannot implement these hidden methods
posing a risk that custom implementations will not have required
abstract methods resulting in an exception.
Bug: 151134792
Test: make update-api
Change-Id: I758d12465fabc671be19bedeeceb16885de23c87
Exempt-From-Owner-Approval: large scale suppression of existing issues,
no-op in terms of behavior
Additional meta-data associated with the component should only be
filled in if caller sets the GET_META_DATA flag when requesting
the info.
Bug: 171545647
Test: atest PackageManagerTest
Change-Id: I3c4f000043a7db667192ca4379390df5548f8ab0
Connectivity service is going to become a mainline module which
will not able to access hidden APIs. But PermissionMonitor needs
ApplicationInfo#is(Vendor|Oem|Product) APIs to know the package
partition. Thus, expose them as in-process API to support the
usage.
Bug: 170593746
Test: atest FrameworksNetTests
Change-Id: Ie4ffb2b47539786dd51b885ca93c8813d039c4da
This API is not needed because any installed app is startable. See
go/incremental-when-to-freeze for detailed discussion.
BUG: 171299283
BUG: 171920377
Test: atest LauncherAppsSingleUserTest
Change-Id: I665b1005780babd02677a0f4ad8284ac81a5502e