Commit Graph

22409 Commits

Author SHA1 Message Date
Jeff Sharkey
ece9be580c Merge "Offer to filter broadcasts based on CompatChanges." 2021-12-27 16:47:40 +00:00
TreeHugger Robot
00b850f4c1 Merge "Update toString on NotificationManager.Policy" 2021-12-23 22:05:31 +00:00
Jeff Sharkey
895e456228 Offer to filter broadcasts based on CompatChanges.
As we evolve broadcasts over time, it's desirable to adjust how
they're delivered to legacy apps.  Using target SDK checks is one
way to implement this, but it's not very flexible as large
developers adjust to new beta releases.  Instead, the platform
best-practices are to use CompatChanges which can easily be
enabled/disabled on a per-app basis to aid debugging and triage.

Thus this change brings CompatChanges-based filtering to
BroadcastOptions, along with tests to verify it's behavior.

Bug: 209888056
Test: atest CtsAppTestCases:BroadcastOptionsTest
Change-Id: Id922d935db54e43ec37783cca612f09049999fab
2021-12-22 16:42:32 -07:00
Beverly
2149f816d4 Update toString on NotificationManager.Policy
So that the toString is more accurate to what the
policy represents.

Bug: 209498360
Test: manual
Change-Id: Ib4987b30bb1987a58a3e30c39b20a185553bbc96
2021-12-22 15:28:59 -05:00
Tom Natan
f6471579c5 Merge "Add API methods for adding/clearing compat overrides for multiple apps on release builds" 2021-12-22 13:14:11 +00:00
Pablo Gamito
3447e5cf43 Merge "Add support for WindowAnimationStyle theme attribute in shell" 2021-12-22 12:05:40 +00:00
tomnatan
6162b70349 Add API methods for adding/clearing compat overrides for multiple apps on release builds
This is important in cases where we want to add/clear overrides for
multiple apps at the same time, without having to make a binder call for
each package and have the compat config save the changes to file and
invalidate the cache each time.

Bug: 199730202
Test: atest FrameworksServicesTests:CompatConfigTest
Test: atest FrameworksServicesTests:PlatformCompatTest
Change-Id: I3b4a3d9db12fdf99eb78c486bdd8e248fff92e50
2021-12-22 10:27:41 +00:00
Pablo Gamito
a4843175bf Add support for WindowAnimationStyle theme attribute in shell
Test: Make sure apps with custom animations set using WindowAnimationStyle actually use the custom animation when shell is enabled

Bug: 206960607
Change-Id: I1d982870837d67c74f76dd0a90aa5260d9441aba
2021-12-21 20:27:20 +01:00
TreeHugger Robot
66eca70ab0 Merge "Change close guard logged messages" 2021-12-21 15:55:19 +00:00
Ioannis Ilkos
0bde67ab00 Change close guard logged messages
Unless we are looking at stack traces (e.g. from strict mode) it's not
possible to identify which type of object is not being closed (most
methods are 'close' or 'release). Change the logged text to clarify.

Change-Id: Ib90eac716f43c2c2caf8d8c6fb64a7bd90562da9
Test: manual
2021-12-21 11:46:10 +00:00
Riddle Hsu
1376431399 Merge "Use hand written hasCode for ChangeIdStateQuery" 2021-12-20 16:09:15 +00:00
Ruslan Tkhakokhov
16a8f596d5 Make IBackupTransport AIDL async
Make the transport AIDL async and introduce a callback AIDL for passing
back results. A follow-up CL will implement the client-side portion of
the callback class and update BackupTransportClient to use it.

Bug: 202716271
Test: m -j
Change-Id: I79cb376bd2a805bf2739470a3f538207ae6bd9a0
2021-12-19 18:40:50 +00:00
Mariia Sandrikova
d77c92a3f1 Merge changes from topic "camera-compat" into sc-v2-dev am: 3486eacda3 am: 02a17e7b1f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16468379

Change-Id: Ic9916a3883eef0148a86c86149aa2e883fc56d1b
2021-12-18 22:19:12 +00:00
Mariia Sandrikova
02a17e7b1f Merge changes from topic "camera-compat" into sc-v2-dev am: 3486eacda3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16468379

Change-Id: I1e56abcef9715a3dd6a00d70cb815c4d9260175a
2021-12-18 21:59:31 +00:00
Mariia Sandrikova
3486eacda3 Merge changes from topic "camera-compat" into sc-v2-dev
* changes:
  [3/n] Camera Compat UI: Add a camera compat control.
  [2/n] Camera Compat UI: Add interfaces for client-server communication.
2021-12-18 21:39:13 +00:00
TreeHugger Robot
b0126b1025 Merge "Workaround to dump error log instead of exception" into sc-v2-dev am: 0eeab2b04d am: 09ff886960
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16489361

Change-Id: I2f125ab44082651982a7422468897d86cff57517
2021-12-17 16:45:14 +00:00
TreeHugger Robot
09ff886960 Merge "Workaround to dump error log instead of exception" into sc-v2-dev am: 0eeab2b04d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16489361

Change-Id: I110dce293d0dae9088b9ba3826d0a3421bb50beb
2021-12-17 16:19:27 +00:00
Mariia Sandrikova
24f4d8a952 [2/n] Camera Compat UI: Add interfaces for client-server communication.
Changes:
- Listens to changes from the client coming through IActivityClientController#requestCompatCameraControl to ActivityRecord#updateCameraCompatState
- ActivityRecord#updateCameraCompatState sends updated state via TaskInfo to WM Shell
- ITaskOrganizerController#updateCameraCompatControlState to dispatch the user interactions with the control from WM Shell triggers callback to ActivityRecord#updateCameraCompatStateFromUser
- ActivityRecord#updateCameraCompatStateFromUser remembers the user's choice and asks client to apply treatment through ICompatCameraControlCallback

Feature is guarded with config_isCameraCompatControlForStretchedIssuesEnabled

Test: atest WMShellUnitTests:ShellTaskOrganizerTests, atest WmTests:ActivityRecordTests
Bug: 206602997
Change-Id: I083aa6718bd67456bedd9444e9b78740c041f870
2021-12-17 00:18:57 +00:00
Hui Wu
3a3077209c Merge "Adding owners in cloudsearch packages" am: d628edb425 am: f921b4b76d am: 8c7f2f8695 am: 27399689e6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1925161

Change-Id: Iadeef29e50f056d7e87d4050c7307fc39fdc815c
2021-12-16 21:25:44 +00:00
Hui Wu
27399689e6 Merge "Adding owners in cloudsearch packages" am: d628edb425 am: f921b4b76d am: 8c7f2f8695
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1925161

Change-Id: I6727e0357235c69d2c5a75c69081a3699167f1d2
2021-12-16 21:08:01 +00:00
Hui Wu
8c7f2f8695 Merge "Adding owners in cloudsearch packages" am: d628edb425 am: f921b4b76d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1925161

Change-Id: I60c619f8c1275b22e069aa256b1569c1efe9eebe
2021-12-16 20:44:09 +00:00
Hui Wu
d628edb425 Merge "Adding owners in cloudsearch packages" 2021-12-16 19:33:49 +00:00
Chilun
77ed8e5724 Workaround to dump error log instead of exception
This is a short-term workaround to dump error log instead of throwing
the exception to unblock the test.

Bug: 209744518
Test: build pass
Change-Id: I2ece3b9d85edc1ae43038e6f69b35f59b160a3dd
(cherry picked from commit f8fc1326f7)
2021-12-16 16:04:29 +00:00
Junyu Lai
3beb2c6105 Merge "[MS03] Remove ServiceNotFoundException hidden API usage" am: 7fee9dd710 am: c270bbf232 am: a562604531 am: 2d6a82665f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1878043

Change-Id: Ie5bd0130a07d015e464090d546fc625589272def
2021-12-16 11:48:43 +00:00
Junyu Lai
2d6a82665f Merge "[MS03] Remove ServiceNotFoundException hidden API usage" am: 7fee9dd710 am: c270bbf232 am: a562604531
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1878043

Change-Id: I28b1bb91331bec61fcf54f84ece296e7ff1746d7
2021-12-16 11:32:19 +00:00
Junyu Lai
a562604531 Merge "[MS03] Remove ServiceNotFoundException hidden API usage" am: 7fee9dd710 am: c270bbf232
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1878043

Change-Id: I8d973c5e74e72621b4083b7389c5c5ca6f37de60
2021-12-16 11:17:15 +00:00
Kholoud Mohamed
b787ef7e7a Merge changes from topic "provisioningBroadcast"
* changes:
  Rename broadcast ACTION_MANAGED_USER_CREATED to ACTION_PROVISIONING_COMPLETED
  Expose DevicePolicyManager provisioning APIs as SystemAPIs
2021-12-16 11:01:32 +00:00
Junyu Lai
7fee9dd710 Merge "[MS03] Remove ServiceNotFoundException hidden API usage" 2021-12-16 10:42:15 +00:00
Riddle Hsu
2ad85f0323 Use hand written hasCode for ChangeIdStateQuery
Because Objects.hash(Object... values) will always create an array
to wrap the "..." arguments, with additional auto-boxing for all
primitive type arguments.

This can reduce the execution time of ChangeIdStateQuery#hashCode()
by 8 times, which is usually the main cost of
CompatChanges#isChangeEnabled.

Bug: 208449209
Test: atest android.app.compat.CompatChangesTest

Change-Id: I863aa1d35e7448b5a965368272198c4529253ae0
2021-12-16 18:15:41 +08:00
Joanne Chung
fcf3a92a1d Merge "Initial layout of selection toolbar." 2021-12-16 05:56:41 +00:00
Joanne Chung
41c4a0ac71 Initial layout of selection toolbar.
The initial selection toolbar related architecture. Render service
part and the implementation will be revised in the follow up changes.

Bug: 190030331
Bug: 205822301
Test: manual. Can boot to home and get manager successfully.
Ignore-AOSP-First: new file for T

Change-Id: Iab5d5f2e5e48e6258a63fb0c479194c958ea61e8
2021-12-16 11:35:23 +08:00
Hui Wu
fa11d35357 Adding owners in cloudsearch packages
Bug: 210528288
Test: not needed as this is a meta file change
Change-Id: I6bbf9f350639ed53edb1643c937c8c55702ff254
2021-12-16 00:03:19 +00:00
Bernardo Rufino
3d10fb4b83 Merge "Migrate unsafe parcel APIs in framework-minus-apex" 2021-12-15 19:15:58 +00:00
Bernardo Rufino
90bb3709dc Migrate unsafe parcel APIs in framework-minus-apex
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()

This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).

A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.

Bug: 195622897
Test: TH passes
Change-Id: I11a27b9bdab7959ee86e90aa1e1cbebd7aaf883c
2021-12-15 18:21:38 +00:00
Jim Blackler
4e59b1968c Merge "Game Loading Time improvement by boosting CPU via ADPF" 2021-12-15 16:07:37 +00:00
TreeHugger Robot
45a04a6165 Merge "Add "millis" to API names." 2021-12-15 02:24:47 +00:00
Oscar Shu
93a619cf6f Merge "Configure allowed/excluded permission list with BroadcastOptions" 2021-12-14 23:28:15 +00:00
Kweku Adams
2f43ce5ab5 Add "millis" to API names.
Improve API naming by specifying units in the name.

Bug: 210622514
Test: Android builds
Change-Id: Id42bd8f826e7928c744b5175db3e99cb7bcd468f
2021-12-14 10:18:49 -08:00
Makoto Onuki
6bef72dbfe Merge changes from topic "per-process-app-class-2"
* changes:
  Support per-process Application class (AM and client side)
  Support per-process Application class (package parser)
  Support per-process Application class in <process> tag
2021-12-14 17:55:58 +00:00
Aleks Todorov
0a332deb7d Rename broadcast ACTION_MANAGED_USER_CREATED to ACTION_PROVISIONING_COMPLETED
Also started using it for DPM#provisionFullyManagedDevice and
DPM#createAndProvisionManagedProfile

Bug: 188410712
Bug: 206083853
Test: atest android.devicepolicy.cts.DevicePolicyManagerTest
Change-Id: Ic5bdb2bec16c83671a7e2cc955522b2d8c82ea70
2021-12-14 16:44:46 +00:00
Aleks Todorov
4d001dfc90 Expose DevicePolicyManager provisioning APIs as SystemAPIs
Exposed provisionFullyManagedDevice and createAndProvisionManagedProfile
as SystemAPIs

Bug: 188410712
Bug: 206083853
CTS-Coverage-Bug: 175380793
Test: N/A
Change-Id: I3a035e4d0e20028cbb7a5f175e64395682b1f3b6
2021-12-14 16:44:33 +00:00
Christian Göllner
ca3f277231 Merge "Enables the rotation suggestion button during setup wizard" 2021-12-14 14:05:31 +00:00
Makoto Onuki
19f22d590d Support per-process Application class (AM and client side)
Now the <process> tag supports `android:name`, which takes a custom
Application class name. If omitted, the system defaults to the
class set in the <application> tag, or the default class which is
`android.app.Application`.

Bug: 197264681
Test: atest CtsProcessTest
Change-Id: I0650a4a7c75dc37c00875e4f0ac53656f1cbeac9
2021-12-13 16:28:32 -08:00
Jeff DeCew
c5177c18af Fix expanded fully custom view showing wrong chevron state am: 3b3e39f627 am: 4ec4414a08
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16445238

Change-Id: I82c728f54ef12e35bfe00b90877007688851961c
2021-12-13 18:33:17 +00:00
Jeff DeCew
4ec4414a08 Fix expanded fully custom view showing wrong chevron state am: 3b3e39f627
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16445238

Change-Id: Idbbbb6a66a2d3a30e73f81c6c48cea072d82b94f
2021-12-13 18:16:31 +00:00
Treehugger Robot
208d820e96 Merge "Register NSD service from ConnectivityFrameworkInitializerTiramisu" am: 6a8b9f3964 am: f9ed5725da am: 2755887938
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1899035

Change-Id: I7605f8332f30f88036be92af0fcb7aa986a7dfb8
2021-12-13 16:07:03 +00:00
Treehugger Robot
2755887938 Merge "Register NSD service from ConnectivityFrameworkInitializerTiramisu" am: 6a8b9f3964 am: f9ed5725da
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1899035

Change-Id: I70d0ad84b306d15e890cca70ac31eb711ebba198
2021-12-13 15:52:37 +00:00
Christian Göllner
be7d8b2859 Enables the rotation suggestion button during setup wizard
Fixes: 204945507
Bug: 204945507
Test: StatusBarManagerTest in a separate CL + Manually
Change-Id: If73caa69b8f923b01e60472a33ba034c2f682075
2021-12-13 15:45:06 +00:00
Jeff DeCew
3b3e39f627 Fix expanded fully custom view showing wrong chevron state
Fixes: 206045893
Test: post fully custom notification from Notify2-SC and check expanded chevron
Change-Id: I97db4f9a5cb207d03d1370fa267f630f355c1bf4
2021-12-13 15:30:33 +00:00
Treehugger Robot
f9ed5725da Merge "Register NSD service from ConnectivityFrameworkInitializerTiramisu" am: 6a8b9f3964
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1899035

Change-Id: I658096512da1c4eaa6b60691f6f226b86adb44fe
2021-12-13 15:29:43 +00:00