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
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
Context service name for accessing AudioDeviceVolume manager.
Address API comments on VolumeInfo and AudioDeviceVolumeManager.
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
This CL addes a new API to PackageInstaller.SessionParams that can be
used to skip the app enable step during the package install flow. This
can be used by installers to keep the app's existing enabled state
after a upgrade instead of setting it to enabled by default.
This also corrects the variable userId used in the enable step to
currentUserId that was preventing it from enabling the app when
installed for all users.
Bug: 244430570
Test: atest PackageManagerShellCommandTest#testAppUpdateSkipEnable
Change-Id: I42b003f8c42a7f8c45a581bd9383c78090462d0f
- orSelf: signifies that this method checks if the calling process OR
the current process has the permission
- anyOf: signifies that if this method checks multiple permissions,
the check passes if ANY ONE of the permissions is granted
- value (default parameter): a hard coded list of permissions that this method checks.
This parameter is useful for static analysis, where the implementation
of some @PermissionMethod may not be visible across library
boundaries. A good example of this is
NetworkStack#checkNetworkStackPermission, which is a source in
framework-minus-apex, but is used from services.core.unboosted. Since
it passes straight into a helper which checks the actual permissions,
it's not possible for lint running on services.core.unboosted to see
which permissions are checked.
Bug: 247537842
Test: TH
Change-Id: Ia5d92149763766576602f5d84a86c67f6fb7e96d
Senders can specify an IntentFilter object that should match
against another broadcast intent to be considered in the same
delivery group.
Bug: 249160234
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastRecordTest.java
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueModernImplTest.java
Test: atest tests/app/src/android/app/cts/BroadcastOptionsTest.java
Test: atest tests/tests/content/src/android/content/cts/IntentFilterTest.java
Change-Id: I36f1e3ffab8e30371a9968cb23c7b345c3301682
WearableSensing framework APIs are intended to be used to interact and
manage the WearableSensingService. The WearableSensingService provides
an isolated service environment for an application to provide a remote
data stream to and run sensing workloads on the data stream. Clients
that want to use this API must hold the permission
MANAGE_WEARABLE_SENSING_SERVICE. The permission protection level is signature|privledged.
API overview: go/wearable-sensing-api
Design doc: go/trusted-glasses
A follow up CL will implement the integration between
WearableSensingService and AmbientContextManager. A subsequent follow up
will also add unit and cts testing.
Bug: 244181656, 249135378
Test: Builds.
Ignore-AOSP-First: to prevent new feature leak.
CTS-Coverage-Bug: 259453662
Change-Id: I0c5e3c5aa01dda9d3289733abd22abfcccc15f96
UWB now has a 3p facing API surface via androidx. Unhiding the feature
for 3p apps to use.
Bug: 257326947
Test: Compiles
Change-Id: I7071385c509585349bab169797e3d6e32ab425cd
All foreground services are required to declare a type now, or
it'll get a ForegroundServiceTypeNotAllowedException if the app's
target SDK level is Android U or later.
Upon starting the foreground service, the app is required to
have been granted with the proper permissions which are required
by the foreground service types it's starting with.
Deprecated the type "none" and "dataSync", introduced new types:
"heath", "remoteMessaging", "systemExempted" and "specialUse".
The implementation of the enforcement will be in a follow up CL.
Bug: 246792057
Bug: 254662338
Test: atest CtsAppFgsTestCases
Change-Id: I54e60b443df8134653379a6ff13e00ed14d3f194
This adds an API to determine if the context user is the designated
main user on the device. This user may have access to features which
are limited to a single user on the device.
In Android U, this will be the first user to go through setup.
On regular devices, this will be the system user, but on devices in
No Primary User / Headless System User Mode, it will be a different
user.
The isPrimaryUser System API is confusing because it actually always
returns the system user, even in headless mode. That API is deprecated
in this change.
On devices that are upgrading, if they are non-headless, the system user
will be the main user. If they are headless, the full user with the
earliest creation date will be given the flag.
Bug: 256624031
Test: atest UserManagerTest
Change-Id: Ib36f3b372f9bf33cbb097c4af63eb43515ac835b