This API can be accessed by mainline modules to kill a specific app
process when its associated sandbox dies. It takes in the IBinder value
of the corresponding IApplicationThread of the app to kill it.
REASON_DEPENDENCY_DIED and SUBREASON_SDK_SANDBOX_DIED are used in the
emitted AppProcessDied atom.
Bug: 261558210
Test: atest SdkSandboxLifecycleHostTest
Test: m statsd && statsd_testdrive 373 emits an atom with
SUBREASON_SDK_SANDBOX_DIED
Change-Id: Id37023eabaa5f734bb67bee07a0f779c355cc100
This service is callable by system components like keystore2. This
service calls into a mainline module API to do all the work for remote
provisioning.
Also include new OWNERS for the RemoteProvisioning implementation.
Bug: 254112668
Test: Locally modify keystore to call the new service
Change-Id: I6708d0b415798c78a4d66f279589d9def552ae78
- Added 1 new intent action to launch notes app on lock screen and when
unlocked.
- Added a new boolean extra to inform notes app whether to show UI that
supports using a stylus.
Test: run build
Bug: 251200619
Fixes: 251200619
Change-Id: Icd351c7da14cb70637615b85f3f25640aeb37206
The crash was due to some old logic that was looking for near matches.
Now we only return exact matches, and let the interpolation deal with
near matches.
Add test to make sure it doesn't crash at any value passed in.
Test: atest FrameworksCoreTests:android.content.res.FontScaleConverterTest
Bug: b/260984829
Change-Id: Ic90d1c5b48862e4f78b90be5926c9ce6d468acf9
Send the following broadcasts after a user switch is complete,
instead of while the switch is happening.
* ACTION_USER_BACKGROUND
* ACTION_USER_FOREGROUND
* ACTION_USER_SWITCHED
Otherwise managing these broadcasts occupy system_server process and
make the user switch longer than it could be.
If a code should be run while the user switch is happening, in other
words while the screen is frozen, (because possibly they move things
around on the screen), they should register a UserSwitchObserver and
override its onUserSwitching method. Then when they are done, they
should call reply.sendResult(null); on the provided reply parameter.
Bug: 257437695
Test: atest FrameworksServicesTests:UserControllerTest
Change-Id: I7b8662600b45459cd83653ac6f15e73335903262
This patch adds a new function to load a SelfTargeting overlay to be
a ResourcesProvider instance. If the app wants to overlay itself’s
resources, the first step is to call this new function to get a
ResourcesProvider instance and then add the ResourcesProvider in a
ResourcesLoader instance.
* ResourcesProvider#loadOverlay
Test: atest \
OverlayHostTests \
OverlayDeviceTests \
SelfTargetingOverlayDeviceTests \
OverlayRemountedTest \
FrameworksServicesTests:com.android.server.om \
CtsContentTestCases:android.content.om.cts \
CtsContentTestCases:android.content.res.loader.cts \
idmap2_tests
Bug: 205919743
Change-Id: Id54da44a54ee6cbc685ad486d1bf69ef388c33ae
Self-Targeting apps can manage the overlays by the following classes.
* OverlayManager
* OverlayManagerTransaction
For OverlayManager, it provides 2 functions for the app.
* Start a overlay manager transaction
OverlayManager#beginTransaction()
* List the registered overlays
OverlayManager#getOverlayInfosForTarget(targetPackage).
For OverlayManagerTransaction, it provides 3 functions for the app.
* register a FabricatedOverlay
OverlayManagerTransaction#registerFabricatedOverlay
* unregister a FabricatedOverlay
OverlayManagerTransaction#unregisterFabricatedOverlay
* commit the transaction
OverlayManagerTransaction#commit
Test: atest \
OverlayHostTests \
OverlayDeviceTests \
SelfTargetingOverlayDeviceTests \
OverlayRemountedTest \
FrameworksServicesTests:com.android.server.om \
CtsContentTestCases:android.content.om.cts \
idmap2_tests
Bug: 205919743
Change-Id: I3b0b60a30689b3d033f96cfcf02e2f67b480f207
This function keeps being called hundreds times per second
Bug: 237583012
Test: Build + boot + UTs
Change-Id: Id6e0e49d561e0c81f6960a5fd77b2076892bd339
When the app wants to overlay its resource in runtime, it’s a
SelfTargeting scenario. This patch adds a new builder
constructor in FabaricatedOverlay for SelfTargeting. It's
`Builder(@NonNull String overlayName, @NonNull String targetPackage)`.
The app needs to pass 2 parameters.
* the overlay name
* target package to be overlaid
This patch also marks the nullability and checks the arguments of
`setResourceValue` and it needs related CTS tests to verify the
nullability.
* setResourceValue
Test: atest \
OverlayHostTests \
OverlayDeviceTests \
SelfTargetingOverlayDeviceTests \
OverlayRemountedTest \
FrameworksServicesTests:com.android.server.om \
CtsContentTestCases:android.content.om.cts \
idmap2_tests
Bug: 205919743
Change-Id: Ie8e2de13076c9d28bbcf7ee52deab91114f7ec57
Non-linear font scaling is meant to improve readability at larger font
scales: larger fonts will scale up more slowly than smaller fonts, so we
don't get ridiculously huge fonts that don't fit on the screen.
The thinking here is that large fonts are already big enough to read,
but we still want to scale them slightly to preserve the visual
hierarchy when compared to smaller fonts.
The FontScaleConverter converts SP dimensions to DP, to be used in
TypedValue.applyDimension() which will affect most TextViews and font
sizes automatically.
For now, all the lookup tables are hardcoded. A follow-up CL will make
them configurable via XML. The hardcoded arrays also default to a linear
curve, as to not break any tests. The non-linear curve will come in a
follow-up CL, to make it easier to roll-back if requested.
Also included is some Javascript to generate the hardcoded arrays, which
can later be manually tweaked and optimized.
Test: unit, CTS, and manual:
1. Run `adb shell settings put system font_scale 2.0`
2. Check different apps to see if they are readable.
Bug: b/237558231
Change-Id: I17d67252bf31f55e57e1f3e8a0f638770e6d2cfd
This change will block the installation (but not the execution)
of apps that do not meet the minimum target sdk version.
The intention is to improve security and privacy by blocking low
target sdk apps as malware can target older sdk versions to avoid
the enforcement of new API behavior.
This change is fenced off by a feature flag. The plan is to
progressively ramp up the min_installable_target_sdk version
up to version 23 for Android U.
Bug: 237321649
Test: adb shell device_config put package_manager_service MinInstallableTargetSdk__install_block_enabled true
Test: adb shell device_config put package_manager_service MinInstallableTargetSdk__min_installable_target_sdk 5
Test: adb install com.senecacreeksoftware.simpletip-3.apk (this app uses
target sdk 4)
Test: adb shell device_config put package_manager_service
MinInstallableTargetSdk__min_installable_target_sdk 6
Test: adb install com.senecacreeksoftware.simpletip-3.apk
Test: adb shell device_config put package_manager_service
MinInstallableTargetSdk__min_installable_target_sdk 23
Test: Attempted side load install via files app
Test: Attempted install from Play Store of low target sdk app
Change-Id: Id86c65d088b62b0a9b36734c14fbf919fa458e32
Self-targeting apps can't get an OverlayManager instance without the
system privilege. This patch makes sure that the self-targeting
application can get an OverlayManager instance via Context.
```
OverlayManager overlayManager =
context.getSystemService(OverlayManager.class);
```
In order to make the self-targeting feature compatible in the future,
this patch adds SELF_TARGETING_OVERLAY compatibility feature.
Test: atest \
OverlayHostTests \
OverlayDeviceTests \
SelfTargetingOverlayDeviceTests \
OverlayRemountedTest \
FrameworksServicesTests:com.android.server.om \
CtsContentTestCases:android.content.om.cts \
idmap2_tests
Bug: 205919743
Change-Id: Ib0b619a2a54e22d31e6c14bf700e421688b6f506
Context service name for accessing AudioDeviceVolume manager.
Add support in VolumeInfo to know whether it carries an explicit
mute/unmute information (vs just default value of isMuted()).
Bug: 244326361
Test: atest android.media.audio.cts.AudioDeviceVolumeManagerTest
Test: atest android.media.audio.cts.VolumeInfoTest
Change-Id: Id718fbd7e0d5795ac480d9188faad4a70fba9808
Merged-In: Id718fbd7e0d5795ac480d9188faad4a70fba9808
This allows apps to retrieve an instance of VirtualMachineManager via
Context.getSystemService() API.
Bug: 249093790
Test: builds
Test: atest --test-mapping packages/modules/Virtualization:avf-presubmit
Change-Id: I488c275343753f2a3af6270cbad2ab02f33f203f
Merged-In: I488c275343753f2a3af6270cbad2ab02f33f203f
(cherry picked from commit 167b913ad4)