Commit Graph

10491 Commits

Author SHA1 Message Date
Trevor David Black
bf22232e3c Add Vulkan 1.2 and 1.3 to getVulkanVersion()
Bug: 191881132
Test: build
Change-Id: I73d18850180f2d7a627fb3879e4653d0e470d6fb
2022-04-21 18:03:07 +00:00
Yurii Zubrytskyi
f453228161 frameworks/base - Tiramisu is now 33 #2
Set current API level

Test: Build and boot
Bug: 225745567
Change-Id: If135d9795e812cc286c720b9351eaf6be621fd5b
2022-04-12 12:35:04 -07:00
Lee Shombert
ead48cc667 Merge "Helper classes for IpcDataCache clients" into tm-dev 2022-04-12 14:32:31 +00:00
Lee Shombert
529a49ee3d Helper classes for IpcDataCache clients
Bug: 227653108

This adds a helper class that can reduce much of the boilerplate in
code that uses IpcDataCache (or the internal-only variant,
PropertyInvalidatedCache).  See the changes to DevicePolicyManager for
example usage.

Two PropertyInvalidatedCaches APIs are exposed for testing.  The
method createPropertyName() is changed so that apis like "Foo" are
converted to "foo", not "_foo".

Unit tests for the new behavior are added to IpcDataCacheTest.

This was manually tested by dumping the cache info from builds with
and without this change.  Special attention is paid to the
DevicePolicyManager caches.  The same caches were found (as identified
by their key and api) and the caches were enabled/disabled the same.

In the course of testing, multiple instances of DevicePolicyManager
caches were observed.  Cache performance is better if the caches are
static; making them static will be addressed in b/228452829.

Test:
 * atest FrameworksCoreTests:IpcDataCacheTest
 * atest FrameworksCoreTests:PropertyInvalidatedCacheTests
 * atest FrameworksServicesTests:DevicePolicyConstantsTest
 * atest FrameworksServicesTests:DevicePolicyEventLoggerTest
 * atest FrameworksServicesTests:DevicePolicyManagerServiceMigrationTest
 * atest FrameworksServicesTests:DevicePolicyManagerTest
 * atest FrameworksServicesTests:EnterpriseSpecificIdCalculatorTest
 * atest FrameworksServicesTests:OverlayPackagesProviderTest
 * atest FrameworksServicesTests:OwnersTest
 * atest FrameworksServicesTests:PolicyVersionUpgraderTest
 * atest FrameworksServicesTests:SecurityEventTest
 * atest FrameworksServicesTests:SystemUpdatePolicyTest
 * atest FrameworksServicesTests:TransferOwnershipMetadataManagerTest
 * atest MixedDeviceOwnerTest#testIsDeviceOrganizationOwnedWithManagedProfile
 * atest MixedDeviceOwnerTest#testSetKeyguardDisabledFeatures
 * atest MixedManagedProfileOwnerTest#testIsDeviceOrganizationOwnedWithManagedProfile
 * atest MixedManagedProfileOwnerTest#testNetworkLoggingDelegate
 * atest MixedManagedProfileOwnerTest#testSetKeyguardDisabledFeatures
 * atest OrgOwnedProfileOwnerTest#testIsDeviceOrganizationOwnedWithManagedProfile
 * atest OrgOwnedProfileOwnerTest#testNetworkLoggingDelegate
 * atest OrgOwnedProfileOwnerTest#testSetKeyguardDisabledFeatures
 * atest android.devicepolicy.cts.DevicePolicyManagerTest
 * atest android.devicepolicy.cts.NetworkLoggingTest
 * atest com.android.cts.devicepolicy.DeviceOwnerTest#testAdminActionBookkeeping

Change-Id: I2f4fe4ed25db5fb3100334b9d2ce748ee928c10d
2022-04-11 07:27:16 -07:00
Michael Wright
52f1d5eca6 Merge "DO NOT MERGE Remove PWLE APIs from T" into tm-dev 2022-04-08 10:57:11 +00:00
Eric Biggers
256a0b563f Merge changes Idc218e5f,I26c3fafc am: 7e3c5382cc am: fb4c1822a8 am: 4d4ababae0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2052056

Change-Id: I6c0ee77edf164ecf5a285afe4dff7cec85e9d668
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 02:11:26 +00:00
Eric Biggers
4d4ababae0 Merge changes Idc218e5f,I26c3fafc am: 7e3c5382cc am: fb4c1822a8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2052056

Change-Id: Ib029dddb2fd26fa33f231b7ae87c3a1fee737a55
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 01:36:12 +00:00
Michael Wright
38dc7aa55c DO NOT MERGE Remove PWLE APIs from T
Fixes: 228529016
Test: build
Change-Id: Icfd576f3dff0850f464be32c5a3315e723c3d380
2022-04-07 23:26:18 +00:00
Eric Biggers
bd13f84152 Remove more FDE methods from StorageManager
Now that these methods are no longer called, and none of them are a
public API or have @UnsupportedAppUsage, they can be removed.

inCryptKeeperBounce() actually had one known app user via reflection,
despite the method not having @UnsupportedAppUsage.  However, that user
only made the call if Build.VERSION.SDK_INT < VERSION_CODES.P, so it is
not being used anymore.

Bug: 208476087
Change-Id: Idc218e5f355bb61257b07cf5b5b6df5f4c6ece11
2022-04-07 16:38:36 +00:00
TreeHugger Robot
b6ac4a054b Merge "Parcel: recycle recycles" into sc-v2-dev am: c4ca84a2b3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17525716

Change-Id: I74935ed1dab8dc6923f58ec237e0884e85380829
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-06 17:15:24 +00:00
Stephanie Bak
73b3dc4fb4 Merge "Expand Javadoc for DISALLOW_WIFI_TETHERING" into tm-dev 2022-04-05 10:13:39 +00:00
Stephanie Bak
52cf82d495 Expand Javadoc for DISALLOW_WIFI_TETHERING
Bug: 226126768
Test: atest UserManagerTest
Change-Id: I1a1e166b4238ff20f30dfd7a2664d9a33dbe020c
2022-04-04 18:51:21 +00:00
Ling Ma
5b37044c20 Merge "setProperty check for byte limit" am: 18b4802337 am: 4cd991467f am: 39709e6beb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2004952

Change-Id: I777beb8d3d8731108533807830e6d7449a51437f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 22:55:04 +00:00
Ling Ma
18b4802337 Merge "setProperty check for byte limit" 2022-04-01 21:43:23 +00:00
Jim Blackler
a4dd0499bd Merge "Add loading boost intervention for games." into tm-dev 2022-04-01 09:39:44 +00:00
Yi-yo Chiang
404c27d323 Merge "DSU service: Log insufficient storage space error" am: 9b420e664a am: 1e43855f6c am: 8c48dc11cf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2049806

Change-Id: Iee0a17c0517449a523aba8827915af79bc7b11eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 08:46:36 +00:00
jimblackler
ac10e4a396 Add loading boost intervention for games.
Bug: 207845905
Test: atest com.android.server.app.GameManagerServiceTests
Change-Id: I2d0b4988797fe21bd7aec6d5351273757ae1a3ce
2022-03-31 20:38:29 +00:00
Steven Moreland
46770fa49c Parcel: recycle recycles
Before, it was like getting a used pan with food stuck on it. We run
a clean ship here. You want a Parcel? You get a fresh Parcel. When
we recycle a Parcel, we do a real clean-up job. Air freshener. All
bits brushed over. These Parcel objects are clean as heck now!

(specifically cleans mClassCookies)

Bug: 208279300
Test: build
Merged-In: I250872f5c6796bb64e2dc68008154c0e90feb218
Change-Id: I250872f5c6796bb64e2dc68008154c0e90feb218
2022-03-31 15:57:30 +00:00
Steven Moreland
ec56973eb7 Merge "Parcel: recycle recycles" into tm-dev 2022-03-31 15:21:35 +00:00
Yi-Yo Chiang
c88a3d9be4 DSU service: Log insufficient storage space error
Log a specialized error message if installation task
failed due to insufficient storage space.
This helps the user to disgnose the source of error.

Bug: 200002443
Test: start DSU task and check logcat
Change-Id: Iabb3e0325ae99c343978ca6c35ab8378f20e0527
2022-03-31 18:38:00 +08:00
Robert Horvath
3f31afd1cf Merge "Don't poke user activity when dream ends" into tm-dev 2022-03-31 07:32:45 +00:00
Steven Moreland
011dda6e01 Parcel: recycle recycles
Before, it was like getting a used pan with food stuck on it. We run
a clean ship here. You want a Parcel? You get a fresh Parcel. When
we recycle a Parcel, we do a real clean-up job. Air freshener. All
bits brushed over. These Parcel objects are clean as heck now!

(specifically cleans mClassCookies)

Bug: 208279300
Test: build
Change-Id: I250872f5c6796bb64e2dc68008154c0e90feb218
2022-03-30 21:59:12 +00:00
Treehugger Robot
1e7f831d5b Merge "Added Java bindings to async trace functions with track argument" am: 004bb42f93 am: 83b26d260d am: b5c308d7b2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2048185

Change-Id: I0b6033f880d01081eea32ec205a59997a5b254af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 19:11:12 +00:00
Tim Murray
ef1b9a9562 Merge "Update OWNERS for tracing, including the Java APIs." am: 45f3622eb3 am: a8888da2a2 am: 8f7679aeea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2049990

Change-Id: I7e6d6a6026b583a0b4e0347e6e77f76382904ce9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 19:10:17 +00:00
Treehugger Robot
004bb42f93 Merge "Added Java bindings to async trace functions with track argument" 2022-03-30 18:16:29 +00:00
Tim Murray
45f3622eb3 Merge "Update OWNERS for tracing, including the Java APIs." 2022-03-30 18:15:38 +00:00
Tim Murray
1c968c099f Update OWNERS for tracing, including the Java APIs.
Change-Id: I7b4f972f09695c68110ed09e3a75e35e40a61387
2022-03-30 11:10:21 -07:00
Robert Horvath
3c7fa15aaa Don't poke user activity when dream ends
The dream may end for various reasons, including some that do not
represent user activity, such as app crashes or the app being updated.
In these cases, the user activity should not be poked, as this would
reset the inattentive sleep timer.

Bug: 215559033
Test: atest PowerManagerServiceTest
Test: Kill dream app, observe `dumpsys power` lastUserActivityTime
Test: Kill dream app, verify inattentive sleep timer not affected
Change-Id: If9b61cab3d5e21b89f3c0ab7fe541d46bc865f97
Merged-In: If9b61cab3d5e21b89f3c0ab7fe541d46bc865f97
2022-03-30 12:57:57 +00:00
Ray Ye
420bd3c28a Added Java bindings to async trace functions with track argument
Bug: 22119585
Test: atest TraceDevTest
Change-Id: I0432763837670de97e6771a1d0fda33f8df14f39
2022-03-29 19:30:27 +00:00
Jooyung Han
f0759689a9 Merge "Fix Parcel.writeFixedArray javadoc" am: 3337082dec am: 13cd8e4f59 am: bfcb72d582
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2045075

Change-Id: Id8339ca4e794b4816f4ba8d84f06fb579dbfcc01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 15:33:50 +00:00
Jooyung Han
906819c815 Fix Parcel.writeFixedArray javadoc
Reference to createFixedArray shoudl be escaped. Otherwise resulting
html renders as <s>(strikethrough) tag.

Bug: 227007069
Test: m online-sdk-docs
  and see if ./reference/android/os/Parcel.html works ok
Change-Id: I7a3b447cbeddd8d66ca1733dc8d115c61ece2509
2022-03-26 20:00:29 +09:00
Ling Ma
8c959cde94 setProperty check for byte limit
Test: manual
Bug: 210502588
Change-Id: I75a1e5bbd79814429dfac5b0b6449efd72176c2c
2022-03-25 10:41:59 -07:00
Jerome Gaillard
59ce0178fa Merge "Read-only properties can have values of arbitrary length" am: 329f25d91a am: f589cf9955 am: b2869273bb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2036307

Change-Id: Ic92ddb1194fe927607bcb315ffbf86b6a1d23b6b
2022-03-23 11:16:22 +00:00
Jerome Gaillard
329f25d91a Merge "Read-only properties can have values of arbitrary length" 2022-03-23 10:21:15 +00:00
Eric Biggers
3abc52220b Merge "Stop using FDE-related constants from IVold" am: 489ba5ac07 am: 84f05b1b9c am: e1a9ca0ec8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2031025

Change-Id: Ic411eb688afe449212dee247d2ecb39471c4314f
2022-03-22 18:04:27 +00:00
Nikita Ioffe
2da047710d Merge "Remove TRACE_TAG_APEX_MANAGER" into tm-dev 2022-03-22 15:53:59 +00:00
Jerome Gaillard
069f22cf0c Read-only properties can have values of arbitrary length
Read-only properties are defined by having a key starting with "ro.".

Bug: 226123443
Change-Id: Ic91e0b7d57e614b620e5147f96356ffd7154daa2
2022-03-22 15:16:45 +00:00
TreeHugger Robot
ff063eb689 Merge "Add flag to refresh of user vibration settings before vibrating" into tm-dev 2022-03-22 14:42:43 +00:00
Nikita Ioffe
e4f87d302e Remove TRACE_TAG_APEX_MANAGER
It's value is equal to the TRACE_TAG_PACKAGE_MANAGER, and it is only
used in the single place in ApexManager.java, while the rest of
ApexManager.java is using a correct TRACE_TAG_PACKAGE_MANAGER tag.

Bug: 191178460
Test: m
Test: presubmit
Change-Id: Icb2d5d0db0a33c73e6d7d28f352e66b3d5782eab
2022-03-22 11:18:21 +00:00
Adam Bookatz
56996833f7 Merge "Relax permissions for isUserOfType, isUserNameSet" into tm-dev 2022-03-22 02:33:54 +00:00
Lais Andrade
4668cc8505 Add flag to refresh of user vibration settings before vibrating
Add hidden flag to VibrationAttributes that enforces the service to
refresh the cached user settings values before vibrating with the given
effect. This allows user settings to apply this to vibratins played as
preview of new intensities set by the slider.

This solution still requires the Settings to update the user intensity
before playing the preview, but it doesn't bypass any user settings or
policies in order to play the preview, avoiding a shortcut that could be
used to enforce vibrations without user control.

This setting is also applied to external vibrations, which could be used
to preview haptics instead if a prebaked effect. It also applies to
ringer mode, that is now cached by the service instead of queried on
each vibrate call.

Fix: 219693646
Fix: 219695212
Fix: 157533521
Test: VibrationSettingsTest & VibratorManagerServiceTest
Change-Id: I605ccd2a4a3b89f1ba5bc86d8f3f64dd6d2714eb
2022-03-21 18:33:37 +00:00
Artur Satayev
ca5c0898bf Merge "Fix KNOWN_CODENAMES javadoc to mention that all codenames are there." into tm-dev 2022-03-21 13:45:10 +00:00
Eric Biggers
8f359f022a Stop using FDE-related constants from IVold
IVold.ENCRYPTION_STATE_* and IVold.PASSWORD_TYPE_* are values returned
by or accepted by FDE-specific vold methods, which are no longer used.
Stop using these constants so that we can remove them from IVold.aidl.

Notes on specific constants:

- Some constants have @UnsupportedAppUsage.  There is no reason why a
  non-system app should have been using these.  However, to avoid
  possibly breaking apps I just left these with hardcoded values.

- StorageManager.CRYPT_TYPE_* are used by
  LockscreenCredential.getStorageCryptType().  However, the caller of
  this method was removed by an earlier CL, so just remove this method.

- StorageManager.CRYPT_TYPE_* also have a user in
  packages/apps/Settings, but it is obsolete code that I'm removing in
  another CL.

Bug: 208476087
Change-Id: I41c684b69a97dbafac65d8f55db2c284d7a8dd70
2022-03-21 05:11:28 +00:00
Lee Shombert
299a36c3c0 Merge "Formally define allowable IpcDataCache modules" into tm-dev 2022-03-19 15:16:53 +00:00
Kholoud Mohamed
a8e9aa390d Merge changes from topic "apiFeedback" into tm-dev
* changes:
  RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
  RESTRICT AUTOMERGE move device policy resource APIs to a separate class
  RESTRICT AUTOMERGE hide device policy resources constants
2022-03-19 06:30:43 +00:00
kholoud mohamed
b7aedc6f3d RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I8af03136e67057d171e97cb5a43187aa6c7f4fe7
2022-03-19 00:22:17 +00:00
Lee Shombert
a1953c28f4 Formally define allowable IpcDataCache modules
Bug: 219609105

The allowable IpcDataCache modules are formally defined as a
@StringDef.  There is no change to the system APIs.

A future change may subdivide the SYSTEM module into small,
feature-specific modules, such as package manager and user manager.

Test:
 * atest FrameworksCoreTests:IpcDataCacheTest
 * atest CtsOsTestCases:IpcDataCacheTest

Change-Id: I15e358723a36b76c384ccfb70bed63e80d57c4c7
2022-03-18 21:21:36 +00:00
Eric Biggers
ec56282d41 Merge "Remove support for converting from FDE to FBE" am: 855ec2d31a am: 6a72370d4b am: 071a3b1820
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2027583

Change-Id: I7949c7f4b4d62f8a38563b2705995cefa69cedaa
2022-03-17 22:57:31 +00:00
Eric Biggers
bf9e19c56c Remove support for converting from FDE to FBE
Devices that launched with Android 10 or later require FBE (File Based
Encryption) from the beginning, so there's no need to support converting
to FBE after the fact anymore.  This was only ever a developer option,
so it probably wasn't used much.  And in any case, it's not used
anymore, as isConvertibleToFBE() is hard-coded to return false.  Besides
the fact that FBE has been required for several releases now, this
functionality was only ever available on devices that use FDE (Full Disk
Encryption), but FDE support has been removed from Android.

Therefore, remove this unused code.

Bug: 208476087
Change-Id: I1f56c8e05fb3fba09aab4bf5f8609b0f552b8999
2022-03-16 23:17:11 +00:00
satayev
82d33f26f9 Fix KNOWN_CODENAMES javadoc to mention that all codenames are there.
Bug: 220153433
Test: atest BuildTest
Change-Id: I93cade7cb11e34557445b74d1e1841508061d616
2022-03-16 14:33:53 +00:00