This takes the Context#getFeatureId from the calling context and pipes
it all way through to the noteOp calls done by the content provider.
Bug: 136595429
Test: atest CtsAppOpsTestCases (new test added to capture this case)
TelecomUnitTests:CallLogManagerTest
ContentProviderClientTest
TelecomUnitTests:MissedCallNotifierImplTest
TelecomUnitTests:BasicCallTests
MediaInserterTest
PreferencesHelperTest
RankingHelperTest
PinnedSliceStateTest
FrameworksCoreTests:ContentResolverTest
Change-Id: I53b1035626229c920b353509a5bece157b52fb51
Use Math.max rather than min to avoid return giant size thumbnail.
Fix: 143267761
Test: atest FrameworksCoreTests:android.content.ContentResolverTest
Change-Id: Ib7ddc6f4daa364a6402f72852e0b7995a3c9ec0c
Wifi/telephony mainline modules uses IBatteryStats which is an AIDL &
hence cannot be made a @SystemApi. Create a new manager class to wrap
around this AIDL to expose @System Api.
Bug: 138806762
Test: Device boots up & connects to wifi networks.
Change-Id: Ib8816c3df17ccc562b9664e7bea1ef01ab61f697
UsageStats has moved away from XML and is now using protos. This removes
dead XML write functions which should ideally never be triggered. A
warning will be logged when reading XML data and a WTF when some
codepath attempts to write data in XML.
Certain tests are now marked as ignored since the XML write functions are
removed. It was decided to not move those functions into the test context
since the read/write code is so intertwined within the database logic.
Bug: 143187610
Test: atest UsageStatsDatabaseTest
Change-Id: If622b646e0edfe389e49aec9b51accdb9fbf1f45
It's no longer used anywhere except in its tests which are also
deleted. This wasn't removed as part of b/24542768 but there no longer
seems to be any reason to retain it.
Test: Still builds
Change-Id: I08584959a215b37cbca77cd438d42a6db0369ecd
ag/9372503 put the order of reading preCreated from a UserInfo parcel
in the wrong spot. We fix it here.
Test: none
Merged-In: I4502e901ff2aac977c584fa8c5a3d1263be33572
Change-Id: I4502e901ff2aac977c584fa8c5a3d1263be33572
(cherry picked from commit e80af14d33)
Initial user creation is slow because the system must prepare per-user data (like storage and
permissions) whose cost is proportional to the number of pre-installed apps. On automovive's
reference implementation, it can take more than 10s, which is a bad user experience.
This change lets OEMs pre-create some users , so that high initial-creation cost is "paid" during
the initial boot. On automotive, it improves the creation of an additional user (or guest user)
in about 7s (from ~17s to 9s).
Bug: 111451156
Bug: 132111956
Bug: 140750212
Bug: 140868593
Test: manual verification
Test: atest FrameworksServicesTests:UserControllerTest#testStartTemplateUser_background
Merged-In: I81de1b5376dc9c42b63be8853d7204c88826401f
Change-Id: I81de1b5376dc9c42b63be8853d7204c88826401f
(cherry picked from commit c1ca4410e1)
Throw a exception so that no dev assumes that it is.
Test: CtsAppOpsTestCases (the only code calling the API for now)
Change-Id: I8ff2a8288ec908d49ec708b710045a230333e5d0
ContentResolver#openTypedAssetFileDescripor was not passing extras from
the file descriptor when creating the AssetFileDescriptor. This ensures
the extras are passed along as well.
Fixes: 135510219
Test: atest ContentResolverTest
Test: atest ContentResolverWrapTest
Test: atest ContentProviderClientTest
Change-Id: I2a7ed6d1bf0bcd31feb632be5c84baeae15e7024
Currently only used by app-ops, but can be used by other modules too.
AppOps will collect app-ops based on feature. Only the most basic
parts of app-ops are supporting features yet. The rest will be added
later.
Test: atest CtsAppOpsTestCases
atest RunSettingsLibRoboTests
atest com.android.server.wm.ActivityStarterTests
m -j doc-comment-check-docs
Bug: 136595429
Change-Id: Ia664f4ff1c1c2ceea721d76dc491ec50c237e9ce
Updates UserInfo.supportsSwitchToByUser() to support the headless system
user mode.
Fixes: 142492424
Test: Check user picker in UI and see that it works
Change-Id: I46addf60b02025b882c705c292bca3335d0f0596
To avoid boot time regression in tests, as compat doesn't care about
system apps.
Also fix the fallback condition to be correct.
Bug: 30188076
Bug: 142558883
Test: atest google/perf/boottime/boottime-test -v - no binder calls,
no time regression.
Change-Id: I15fd39ad7e0ed70fcd880a13cffa40d70c5bba55
Introduce a platform_compat_native service that just calls the
platform_compat service.
The new service is needed as it needs a slightly different (more
limited, no ApplicationInfo in cpp) aidl API, and a class can only
extend one stub.
Test: Call the service from dumpsys.cpp (http://aosp/1142055)
Bug: 138275545
Change-Id: Ic46cc34b4c1dd4ebc6bcc996fb3f8503607214ac
1. decouple IOnSubscriptionChangedListener AIDL from telephonyMainline
2. other refactor. moving APIs which will not be included in
telephony mainline to frameworks/base/core/java/android/telephony.
Moving internal classes like AIDL which will not be included in
telephony mainline to
framework/base/core/java/com/android/internal/telephony
Bug: 140908357
Test: Build & unit test
Change-Id: I9413ef758cceadd251d03f3b5ea1054cc48ef044
Auto-documentation adds nullability info for parameters in docs. The
manual info about nullability causes confusion and might not always be
up to date so remove it from the ContentProvider docs.
Fixes: 140541978
Test: n/a
Change-Id: I3847bbb35601f516c11370e74dd8b6734c289f68
Create a new class which will hold persisted information about how an
app was installed that cannot be modified, even by the installer of
record or an app with INSTALL_PACKAGES permission.
Add a first field to hold the package name of the app that initiated
the install session.
Plumb this into SessionParams, PackageInstallerSession, InstallParams,
InstallArgs, PackageSettings, PackageProto, ActiveInstallSession etc.
Various minor refactorings along the way.
Bug: 134746019
Test: atest -p services/core/java/com/android/server/pm
Change-Id: I96d9b5034bc98af8c63088df2341e6d4a1fb1b6e
Wifi mainline module needs some permissions which are currently only
granted to signature components. Since mainline modules are not going to
be signed with OEM's signature, we need a new protection level to grant
some of these permissions to the wifi mainline APK.
Bug: 142234604
Test: Verified that wifi can get INTERACT_ACROSS_USERS_FULL permission
Change-Id: I26b0edff62497b5e08c2f2f504b0cd5f950682ad
for oems which take telephony mainline module, all telephony related
apks will be signed with non-platform certificate. that said apks won't
be able to grant platform signature permission. Solution is to add a new
telephony protection level.
Bug: 141479803
Test: cts & manual
Change-Id: Ib3be016080d42fd76e7c131f4e44d815ce431e6e
We've already been parsing them for many years, and they're well
defined by other public APIs, so let's reveal them in MediaStore.
Also get some storage-related documentation updated to guide
developers towards replacements in a post-scoped-storage world.
Bug: 140247264, 139185855, 141523097, 139185322
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Id39a74a9972a330b3f83913b2eef5100ec59627d
ResourceLoaders allow inserting another .apk/.arsc into AssetManager's
resource resolution search. The effect is similar to overlays,
where a entry of >= config later in the path list will return that
ApkAsset's resource value instead.
Because loading from an .arsc is supported, which doesn't contain
any actual files, ResourceLoader exposes loadDrawable and
loadXmlResourceParser to allow an application load those files from
anywhere or create them in code.
The data being loaded is either pushed into an .apk or .arsc that
mocks itself as the package being "overlaid" and is passed in
through ResourcesProvider, an interface with static methods that
supports loading from a readable path on disk or a FileDescriptor.
The APIs are accessed through a Context's getResources(), which
has been changed to be unique per "Context-scope", which is usually
the lifetime of the Java object. The exception is that Activities
who get their Resources object persisted across recreations
maintain that logic for persisting ResourceLoaders.
Bug: 135270223
Test: atest FrameworksResourceLoaderTests
Change-Id: I6929f0828629ad39a21fa155e7fec73bd75eec7d
The Javadoc for OverlayManager#invalidateCachesForOverlay was mistakenly copied
from OverlayManager#getOverlayInfosForTarget.
Test: builds
Change-Id: I1e12e8f52262619e9ac55fdeb8833cd8a110fa55
Without it, apps (mainline modules) will need to use createPackageContext...,
which is a bit painful.
Bug: 142472686
Test: atest android.content.cts.ContextTest#testCreateContextAsUser
Change-Id: Id640e03862462724df1a4a3101f0b08faafba22f