...Managers are supposed to use the passed in context to support e.g.
alternate user or package contexts. Not sure why this is not the case
for TelephonyManager.
Hence special case the support for feature-contexts.
Test: atest CtsAppOpsTestCases:android.app.appops.cts.AppOpsLoggingTest#getCellInfo
Bug: 136595429
Change-Id: I7f498e282a34e39da6a1f6c129eff09674dce795
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
This adds a "IWindowContainer" interface which is an opaque
handle to a window-container in WM. It has very minimal
functionality and is intended to be used mostly as an
identifier.
Along with this handle, there is a WindowContainerTransaction
which can collect a set of container + configuration changess
and apply them all together. This will be used for remote
rotation control and other batched operations in the future.
Bug: 124011688
Test: Added some wm/core tests.
Change-Id: I691e7c11cd8c30f1a24fd64c6018a18933047847
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