The receiver of the broadcast would likely want to query the rolled back
packages via RollbackManager regardless, and it's not clear which
package to put when an atomic set of packages is rolled back.
Bug: 112431924
Test: atest RollbackTest
Change-Id: Ic8db00b62d8993e00a0dd2cb79ae68c430b45bb8
Rather than defining a new custom PackageRollbackInfo.PackageVersion
type.
Also clean up PackageRollbackInfo API by replacing public fields with
methods and picking better names.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I68a91e07b8745df9c5ecb22fdccbfcd76385814a
To make it easier to specify what rollback to perform when a rollback is
executed.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I860ad443848341fbb99169a05b084fa797c5e08c
The Permissions Hub will use this to control the default time filter.
Bug: 63532550
Test: Pass argument to intent.
Change-Id: Iac607853f7020acdb50a20d82c7b8b9e1a0bd32e
In pi-dev, those annotations were added out of band in
tools/metalava/manual/master.txt. The annotations were also
supposed to be added to master, but for some this did not happen.
Bug: 123221743
Test: m api-stubs-docs-check-last-released-api
Change-Id: Ia7589dfcc7f63923890e609dbf03175d2b035d29
The only significant missing piece of functionality is the
handling of credential encrypted data in the case where one
or more users haven't unlocked their device. This will be handled
in a follow-up change.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I4582018337ce0344379f6f73d6fd6c9ce31c58a0
Disable certain APIs which require secure lock screen if the device
doesn't have the feature.
Make sure one cannot set the password/PIN if there is no secure lock
screen, because the password/PIN wouldn't be really used afterwards
while the password strength checks would succeed, creating a false
sense of security.
Allow setting password strength requirements in DPM - test if the
current password is sufficient will fail automatically if there is
no secure lock screen.
Bug: 111072170
Bug: 111071972
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases
Test: cts-tradefed run cts -m CtsAdminTestCases
Test: frameworks/base/core/tests/utiltests/runtests.sh
Test: adb shell am instrument -w -e class com.android.internal.widget.LockPatternUtilsTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: atest SyntheticPasswordTests
Test: atest LockSettingsServiceTests
Test: atest LockSettingsShellCommandTest
Test: atest DevicePolicyManagerTest (for servicestests)
Change-Id: Ie46b0de6cb03c26dd05c05711c5c3b5e36a872df
Mark NEW_OUTGOING_CALL broadcast as deprecated and document that callers
should use the CallRedirectionService API.
Test: Build APIs.
Bug: 64959558
Change-Id: I9192b50b16be2ff0cdc0f864ee99b42b83e261e9
Normal applications do not have permissions to use this method.
Test: m
Bug: 112869080
Merged-In: I693b3bf56f3be71f0790776e3aad5694717786ef
Change-Id: Ibe91c1bc4c94883a313e799cb0a37db7696fc62e
Test: atest com.android.server.pm.LauncherAppsServiceTest
Test: Able to boot in marlin, sailfish, walleye
Bug: 120904599
Change-Id: Ibfa58d1d8de3b182451da3edebf3e8e4e552899d
This should be generated properly from the AndroidManifest,
but for now this is helpful to proceed with APEX testing.
Test: build
Bug: 123086053
Change-Id: I0e7182e4924c0bc26cee9c9bed520acaffccf905
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
Currently, ApexInfo.packageName is directly fed into PackageInfo. However,
this is wrong because ApexInfo.packageName is from apex_manifest.json,
not AndroidManifest.xml. Name in apex_manifest.json is the internal ID
of an APEX while the name in AndroidManifest.xml is the public
externally-visible name.
Fixing the issue by parsing the AndroidManifest.xml in the apex file
via PackageParser.
This change also fixes the problem that signature is not included in the
PackageInfo for APEX. It is included when GET_SIGNATURES is specified.
Bug: 123029986
Bug: 123028426
Test: adb shell cmd package list packages --apex-only --show-versioncode
Shows com.google.* names
Change-Id: I0021b302f3f4e843f79dd6d40716cefd531c5628
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