Bug: 246953799
Collect timing information for resource acquisition methods. The
timing has nanosecond resolution and is collected inside the native
runtime code. Timing values are accumulated in the runtime and are
periodically fetched and published by the java framework. This
strategy means that normal resource methods incur a small runtime
overhead. The longer time involved in publishing the values is
handled by an independent Java thread.
A public dumpTimers() method can be called from a dumpsys command, for
debug, but the dumpsys command is not hooked up in this commit.
No APIs are actually monitored in this commit, and the ResourceTimer
loop is not started.
Test: atest
* androidfw_lib
Change-Id: I5995d3c6518ca2fa4c8ab9d3eb610167758c695d
This provides a sandbox-like scaled environment on client side.
- This prevents the metrics and config from being scaled multiple
times because the entry points are only called from server side,
there won't have reentrancy for applying the scale.
- App's configuration callback method can get scaled config.
- If override scale is enabled, the legacy compat mode will be
skipped. That avoids mixing different approaches of scaling.
- Legacy compat mode is to simulate a 320dp x 480dp screen
size with density 160 (the surface scale and config scale
are different).
- Override scale is to downscale the app for better performance
(the surface scale and config scale are the same).
Bug: 238416387
Bug: 240335717
Test: atest ActivityThreadTest#testOverrideScale
Test: atest CtsWindowManagerDeviceTestCases:CompatScaleTests
Test: am compat enable DOWNSCALED $pkg
am compat enable DOWNSCALE_50 $pkg
Change-Id: I0ddf333996f229063511273f8aeb3867c9ba8bda
We're defining a new compat framework change id that restricts
the other aspect ratio overrides for devices in portrait fullscreen.
Fix: 218959984
Test: As manual testing use 'adb shell am compat disable/enable OVERRIDE_MIN_ASPECT_RATIO_EXCLUDE_PORTRAIT_FULLSCREEN <package-name>'. For the unit tests run 'atest WmTests:SizeCompatTests'.
Change-Id: I84eaab4df045c93fb2c159a789852094caf9121a
The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.
Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ia6f216cc36ad0a5758f39fd9b34962cd4adf9d8e
This enables passing them and and storing them in the .frro file but no
further.
Bug: 243066074
Test: Manual
Change-Id: I5c9723e69d175a536f9739619c6b6bf3162a5027
Flag intent created by framework as LOCAL_FLAG_FROM_PROTECTED_COMPONENT by
calling intent.prepareToEnterProcess(true...). This is to fix false positives
of StrictMode.unsafeIntentLaunchViolation.
Bug: 181132616
Test: Manually verified a violation was not reported when a test app launched
Intents returned from TelecomManager.createManageBlockedNumbersIntent.
Methods marked as systemApi are not tested.
Change-Id: I7b00008dd894f1c637ab2f0a23e6cafb58bb73e5
Introduces a UserProperties class, which holds (potentially dynamic)
information about each user, where the (default) values depend on the
user type.
This can usually be used instead of
isManagedProfile() calls, giving fine-grained information, rather than
course-grained queries about the user type.
The system copies this object before delivering it to any callers,
filtering the properties by the permissions held by the caller.
The object can be parsed from XML, which is used for both persisting a
user's properties to disk, as well as for reading in the default
properties for each user type.
Bug: 235065648
Bug: 237399048
Bug: 170249807
Bug: 234439331
Test: atest UserManagerServiceUserPropertiesTest
Test: atest android.multiuser.cts.UserManagerTest
Test: atest com.android.server.pm.UserManagerTest
Test: atest UserManagerServiceUserTypeTest
Change-Id: If37480abafa784ce197b482103b6537a60fe2653
The cameraserver has a need for attributing connect calls to particular
processes. This patch introduces pids as a property of an
AttributionSource.
Test: Smoke test on cuttlefish
Bug: 190657833
Bug: 199526514
Change-Id: I6cdffed62447bbb741290dd9c2e5937254d02e3c
We're defining a new compat framework change id that indicates whether a
given app should use the split screen aspect ratio.
Test: As manual testing use 'adb shell am compat disable/enable 208648326 <package-name>'. For the unit tests run 'atest WmTests:SizeCompatTests'.
Fixes: 208648326
Change-Id: I0232d6d98b10e546b840c08ffbf6e7be9c465965
The commit 9c5a330 skips package checks if the package-equivalent
components are set. However, it could also result in inconsistent
behavior on #filterHashCode.
Fixing the original issue from the intent itself instead.
Bug: 64108432
Bug: 64789334
Test: atest TaskTests
Change-Id: I18c717e29072df91fb19eddbddc78153a28f9563
We're defining a new compat framework change id that indicates whether a
given app should use the split screen aspect ratio.
Test: As manual testing use 'adb shell am compat disable/enable 208648326 <package-name>'. For the unit tests run 'atest WmTests:SizeCompatTests'.
Fixes: 208648326
Change-Id: I0232d6d98b10e546b840c08ffbf6e7be9c465965
Merged-In: I0232d6d98b10e546b840c08ffbf6e7be9c465965
Making addCrossProfileIntentFilter and clearCrossProfileIntentFilters as
TestApis so that we can write CTS device side test cases to emulate
behaviour used by 3P apps or profile owners. This is to ensure that no
malicious user can add/remove filters by following access control rules.
Bug: 238019465
Test: atest CtsAppCloningDeviceTestCases
Change-Id: I4084826cbc63b1afc5569bd310be694b11202aee
Bug: 237309566
The maximum size of selected binder caches is increased to avoid
overflow. The overflow was found in a partner bug report.
The maximum size does not affect memory consumption until the cache
hits the limit, so caches that were not overflowing before will not
see increased memory consumption. Also, the caches that are affected
by this change are either static (one per process) or exist in just a
few intances per process, so the total memory impact is small.
Note that most of the overflows occurred in vendor processes.
Test: atest
* android.app.ApplicationPackageManagerTest
* com.android.server.pm.PackageManagerTests
* com.android.server.pm.PackageManagerServiceTest
* com.android.server.compat.PlatformCompatTest
* com.android.server.compat.CompatConfigTest
* android.app.compat.CompatChangesTest
* PlatformCompatGating
Change-Id: I7f60ad9008bf894d6cb967ce1a54ab33af650efc