This allows us to generate precompiled layouts for installed applications.
If the system property view.precompiled_layout_enabled is set, then
PackageMannager will also automatically generate precompiled layouts for apps at
install or upgrade time.
Bug: 111895153
Test: manual
Change-Id: If6455e1b9b0542a36882af9f3e29d0185a53393c
PackageManager.queryIntentActivities() handles browser intent
differently when there is a default browser, and only returns the
default browser. Previous code for querying all the browsers all
passed in the PackageManager.MATCH_ALL flag and filtered the result
manually, so we move that logic into RoleBehavior.
Bug: 110557011
Test: build
Change-Id: I928f13d27aca64d49f625dd1ffbd3262b42a06cd
This reverts commit 8b45da9025.
Reason for revert: Local TOT is crashing with framework restarts, with the following stacktrace:
01-18 12:22:51.536 9326 9352 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: android.bg
01-18 12:22:51.536 9326 9352 E AndroidRuntime: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.intent.action.PACKAGE_CHANGED dat=package:com.verizon.mips.services flg=0x5000010 (has extras) } in com.android.server.pm.LauncherAppsService$LauncherAppsImpl$VouchesChangedMonitor@c231445
01-18 12:22:51.536 9326 9352 E AndroidRuntime: at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0(LoadedApk.java:1554)
01-18 12:22:51.536 9326 9352 E AndroidRuntime: at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
01-18 12:22:51.536 9326 9352 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:873)
01-18 12:22:51.536 9326 9352 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
01-18 12:22:51.536 9326 9352 E AndroidRuntime: at android.os.Looper.loop(Looper.java:209)
01-18 12:22:51.536 9326 9352 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:65)
01-18 12:22:51.536 9326 9352 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to read from field 'android.os.Bundle android.content.pm.PackageItemInfo.metaData' on a null object reference
01-18 12:22:51.536 9326 9352 E AndroidRuntime: at com.android.server.pm.LauncherAppsService$LauncherAppsImpl.updateVouches(LauncherAppsService.java:485)
01-18 12:22:51.536 9326 9352 E AndroidRuntime: at com.android.server.pm.LauncherAppsService$LauncherAppsImpl.updateVouches(LauncherAppsService.java:481)
01-18 12:22:51.536 9326 9352 E AndroidRuntime: at com.android.server.pm.LauncherAppsService$LauncherAppsImpl.access$200(LauncherAppsService.java:121)
01-18 12:22:51.536 9326 9352 E AndroidRuntime: at com.android.server.pm.LauncherAppsService$LauncherAppsImpl$VouchesChangedMonitor.onPackageModified(LauncherAppsService.java:916)
Change-Id: If22d2355e17101bbf3e958b42ee101828f3ec532
Before ag/4829987, if a drawable.xml was misplaced in res/color, but was loaded as a drawable, ResourcesImpl would correctly load it as drawable instead of a color.
Post those changes, the file name is checked, and all res/color files are forcibly loaded as colors. This adds a fallback such that if loading as color fails, an attempt is made to load as a normal drawable.
Bug: 122025886
Test: validated using test application loading layer-list inside res/colors
Change-Id: Ieed9b4d22bc85fdc7390de700fad7b03c9aad511
Adds android:targetName to the overlay manifest attributes and
PackageParser reads the name into PackageInfo. Specifying
android:targetName on an overlay allows the overlay to be associated
with a particular set of overlayable resources. The overlay can only
override the values of the resources defined within the target
overlayable element.
Test: idmap2_tests
Bug: 119390855
Bug: 110869880
Change-Id: I1128274af4cae983f61ae15cdfcbface63233ff2
Changed CrossProfileApps#startAnyActivity to #startAcitivty.
Updated documentation for the usage of startActivity vs startMainActivity.
Also clarified that the INTERACT_ACROSS_PROFILES permission is a two-way
channel between personal and managed profiles.
Bug: 122886462
Test: n/a (documentation changes only)
Change-Id: I67772aef0cf24110432a2dbde0f87c91354fd4a0
Permissions READ_DEVICE_CONFIG and WRITE_DEVICE_CONFIG are required to
use DeviceConfig API. Actual checks for new permissions are not added
as we are waiting for gmscore to include them into manifest.
Also added "configurator" protection flag.
Test: atest FrameworksCoreTests:DeviceConfigTest
atest FrameworksCoreTests:SettingsProviderTest
atest SettingsProviderTest:DeviceConfigServiceTest
Bug:109919982
Bug:113100523
Bug:113101834
Bug:117663715
Change-Id: I66c256b57c5491201c6c7834620a287b6c81c23c
This API will be used by Android Studio layout inspector to
query where a given resource attribute originated from to allow
developers to have an easier way to find what needs to be changed
to affect a given resource attribute.
Test: CTS added in the topic
Bug: 111439551
Change-Id: Ifbb52b39912ed0444030a86164290a1cd4155250
In addition to supporting manifest declared codenames of the form
"[codename]", also support codenames of the form "[codename].[fingerprint]".
Also makes cosmetic changes to PackageParserTest to produce better
failure messages when the test fails.
Test: PackageParserTest
Change-Id: If5e38614a1a3aa04035f14acfda41d0c1cd86e15
So it can be used in CTS.
Bug: 110956953
Test: atest PermissionPolicyTest#testPlatformPermissionPolicyUnaltered
Change-Id: I1682376845dfa390f01b0e869444c307e6c3d3be
This is a missed change in 4e54b521bc.
Test: adb install, check that libs are really not extracted.
Bug: 112037137
Change-Id: I0b819d656eb427c4b7b35e027808b87f3aad3c15
After an AssetManager.FindEntry call is made, either directly or from any of the resource entry calls, a stack of the steps taken to resolve the resource is saved. Those steps can be retrieved as a log later on by calling AssetManager.GetLastResourceResolution, which returns a formatted string of the resource ID/name and path taken, including the configs and package names of each step.
Logging and the saving of the steps to memory can be enabled/disabled with the @hide .setResourceResolutionLoggingEnabled() method on AssetManager.
Bug: 122374289
Test: cases for single and multi ApkAssets loaded
Test: case for no resolution made
Test: made test app to display log on device
Test: added debugging call to source and ran through on-device apps
Change-Id: I6a32b8d4020c3f8510032ff7f431510089fff43f
Grant location permission to extra packages configurated in xml config
file. This is necessary as pre-grant happens right after system starts,
before location provider sets the *real* location extra package.
Bug: 119225658
Test: Manual, atest GtsPermissionTestCases:com.google.android.permission.gts.DefaultPermissionGrantPolicyTest
Change-Id: Ibbfbfb78aa062fa6dc013a1001ea3486d62f4331
This change adds Intent.ACTION_MANAGE_DEFAULT_APP and
Intent.EXTRA_ROLE_NAME for managing a single default app, which will
be launched from Settings' App info page. The new
Intent.EXTRA_ROLE_NAME also replaces RoleManager.REQUEST_ROLE_NAME.
Bug: 110557011
Test: build
Change-Id: Ice81150b0e960d050d24d963ade04254852a4ee4
Let an activity show on top of the lock screen if the activity behind
this can be shown on top of the screen. This is pre-requisite for
showing permission dialog on top of the lock screen only when it makes
sence.
Bug: 109754623
Test: atest server.am.KeyguardTests
Change-Id: Ideaa2b77519649a70c682bc95277e451e149adad
Test: builds and tested in local theme picker
Bug: 121328713
Commands executed:
$ make system-api-stubs-docs-update-current-api
$ make api-stubs-docs-update-current-api
Cts tests to follow
Change-Id: Id26d32f482c1bbab3497b517b7a553d145a1e3df
Signed-off-by: Hyunyoung Song <hyunyoungs@google.com>