Commit Graph

22436 Commits

Author SHA1 Message Date
Louis Chang
8ab93641bb Merge "Allow requesting start-activity-permission-token for an activity" 2022-01-12 01:04:34 +00:00
Xiaowen Lei
2146a59ccb Merge "Clean up Communal Manager READ_COMMUNAL_STATE APIs." 2022-01-10 19:43:23 +00:00
Wei Sheng Shih
f04fc04111 Merge "Fix transfer splash screen view been called twice from onDraw" into sc-v2-dev am: 0c6450141f am: 494706d9c2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16561482

Change-Id: I509b68c9fb28ec6a0611a87e3667210c0389f9fa
2022-01-10 17:17:42 +00:00
Wei Sheng Shih
494706d9c2 Merge "Fix transfer splash screen view been called twice from onDraw" into sc-v2-dev am: 0c6450141f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16561482

Change-Id: If8a3b2bddc7583da65673258ae2fe1c64ab840a2
2022-01-10 17:02:47 +00:00
wilsonshih
4ee97aa498 Fix transfer splash screen view been called twice from onDraw
postOnAnimation is not robust enough from remove the onDrawListener
before next traversal, add a flag to to ensure that transfer splash
screen view only been called once.

Bug: 204125440
Test: atest SplashscreenTests
Test: verify SplashScreenTests and SplashscreenParametrizedTest pass
Change-Id: Id0e6d57b901b2dae45f5aa77e5571f9cf81b6e29
2022-01-10 18:23:20 +08:00
TreeHugger Robot
c28db7a673 Merge "Do not trigger a disk write violation during dumpsys gfxinfo" 2022-01-07 23:32:16 +00:00
Makoto Onuki
7bea563b87 Do not trigger a disk write violation during dumpsys gfxinfo
Writing to a pipe FD here is okay because it doesn't write to
the physical disk.

Bug: 203682422
Test: dumpsys gfxinfo
Change-Id: Ibb484f0d466d13e55d2c8059a5af964641281110
2022-01-07 10:18:00 -08:00
Minche Li
6c257f32e1 Merge "Notifies window magnifcation changes for AccessibilityService (1/n)" 2022-01-07 01:00:27 +00:00
Xiaowen Lei
8b438be8e4 Clean up Communal Manager READ_COMMUNAL_STATE APIs.
These are not yet used, and are obsolete now because We will no longer
be shipping SLS in T.

Ignore-AOSP-First: tied to launch of new upcoming hardware.

Test: atest FrameworksMockingServicesTests:CommunalManagerServiceTest

Bug: 206054365
Change-Id: I51ffbfe5ddc89008d660fab7cfd5808cb827d300
2022-01-07 00:18:35 +00:00
TreeHugger Robot
496f60250d Merge "Revert "Adding client side logging for receivers."" 2022-01-07 00:08:48 +00:00
Lee Shombert
9a686c07ba Merge "Prepare PropertyInvalidatedCache for SystemApi" 2022-01-06 23:14:05 +00:00
Jacob Hobbie
e9482d775f Revert "Adding client side logging for receivers."
This reverts commit 2c34dcd956.

Reason for revert: Not WAI, logging on user-debug builds (not just eng) and not logging across the binder appropriately

Droidfood blocking bug:213406883

Change-Id: Ifff533d280cce22fbf877dd265e4910ab9230943
2022-01-06 19:36:33 +00:00
TreeHugger Robot
bd4a9f5806 Merge "Cleanup communal mode shared app logic." 2022-01-06 17:36:26 +00:00
Pat Manning
5f66d30856 Merge "Create API to set taskbar to kids mode." 2022-01-06 17:26:05 +00:00
Wei Sheng Shih
82cf9d7a4a Merge "Public API set and get splashscreen style" 2022-01-06 05:25:33 +00:00
Louis Chang
47cf5f22bb Allow requesting start-activity-permission-token for an activity
The permission token was required to be requested from an existing
activity. Since the token is delegated to another activity, the
activity that requested the token had to keep alive and finish itself
until the token is revoked.

Changing the behavior to allow the caller to request the permission
token for a particular component as long as the caller is running in
System uid (which not necessarily to be an Activity).

This also prevents having an additional trampoline activity launched.

Bug: 199743918
Test: locally tested
Change-Id: If3e55032bb99d98a446e4c30220555b0fbc0c6f7
2022-01-06 10:53:45 +08:00
Jacob Hobbie
0bd7594ce8 Merge "Adding client side logging for receivers." 2022-01-05 17:47:53 +00:00
Lucas Silva
70303b058f Cleanup communal mode shared app logic.
We will no longer be shipping shared apps in Android T

Test: atest CommunalManagerServiceTest
Test: locally on device
Bug: 211633044
Change-Id: I96ff51f1e10801722dd74de110f5c2caacf0d8d3
2022-01-05 15:18:52 +00:00
Pat Manning
8ffa58cdea Create API to set taskbar to kids mode.
- Disables recents in taskbar.
- Changes back and home icons and centers them in the taskbar.

Test: manual
Bug: 203749295
Change-Id: I9aa2a213728549509da4cf7f50abceb690ba31cf
2022-01-05 11:35:41 +00:00
Lee Shombert
0cece3898b Prepare PropertyInvalidatedCache for SystemApi
Bug: 152453213
Tag: #refactor

This commit prepares PropertyInvalidatedCache to function as a system
api.  Specifically, the methods recompute() and bypass() which may be
overridden by clients are now public (instead of protected).  This
forces an update to all existing clients, to accommodate the change in
method visibility.

Two small changes have been made as cleanup:

 1. The awkwardly named debugCompareQueryResults() is now
    resultEquals(), which is more or less consistent with how other
    equality tests are named in Android.  This name change affects two
    clients.

 2. PackageManager has changed to use resultEquals() instead of
    maybeCheckConsistency().  This provides a simpler and more
    consistent use of the APIs.  maybeCheckConsistency() has been made
    private.

Test: atest PropertyInvalidatedCacheTests

Change-Id: I4110f8e887a4fd8c784141e8892557a9d1b80a94
2022-01-04 08:13:59 -08:00
wilsonshih
bf666289d7 Public API set and get splashscreen style
Allow developer to control the splash screen style when the option is
used for cold or warm launch an activity.

Bug: 203497083
Test: atest SplashscreenTests#testLaunchFromLauncherWithEmptyIconOptions
Test: atest SplashscreenTests#testLaunchAppWithIconOptions

Change-Id: I9c4ccca2470df5dbac96da2d4a96b616b6670688
2022-01-03 20:44:01 +08:00
mincheli
be41ea676c Notifies window magnifcation changes for AccessibilityService (1/n)
See Design doc:  go/b200769372
To make the behavior consistent on the new platform,
The legcay callback,
  onMagnificationChanged(MagnificationController controller,
  Region region, float scale, float centerX, float centerY)
keep notifying only full-screen magnification change as
before.

To support listening to the magnification changes of all
magnification modes, the service should overide
The new callback proposed in T,
  onMagnificationChanged(MagnificationController controller,
  Region region, MagnificationConfig config).

TODO: Notify magnifcation change when window magnifier turns off

Bug: 203013925
Test: atest AccessibilityMagnificationTest,
    atest MagnificationControllerTest,
    atest WindowMagnificationManagerTest,
    atest WindowMagnificationControllerTest,
    atest FullScreenMagnificationControllerTest,

Change-Id: Ia73195a71f55bb26ef3f2eafce0dc73d8a65583b
2022-01-03 10:31:54 +08:00
Wei Sheng Shih
cd38394aa4 Merge "Prevent client got NPE crash if setIntent was set to null." 2021-12-29 09:40:21 +00:00
Chilun Huang
ca77f56285 Merge "Store pending override config instead of creating ActivityClientRecord" 2021-12-29 03:00:45 +00:00
Chilun
6b104eec9a Store pending override config instead of creating ActivityClientRecord
Create ActivityClientRecord early in preExecute may cause
NullPointerException. If two LaunchActivityItem using the same token
and the 1st postExecute() comes after 2nd preExecute(), the
corresponding launching activity will be removed and cause 2nd
execute() get NullPointerException.

Since the only use case to get ActivityClientRecord in preExecute() is
just to use it to store the pending override config. We can directly
store the latest pending override config from preExecute() in
ActivityThread instead of creating ActivityClientRecord.

Bug: 201668069
Test: atest TransactionExecutorTests
      atest ActivityThreadTest
Change-Id: If350e942254e54c9ec90bc63a6e50eb67d038183
2021-12-28 16:57:59 +08:00
Jeff Sharkey
ece9be580c Merge "Offer to filter broadcasts based on CompatChanges." 2021-12-27 16:47:40 +00:00
wilsonshih
70fb36f03d Prevent client got NPE crash if setIntent was set to null.
Not sure why app overwrite the start intent to null, but we should
prevent app from crash in frameworks.

Bug: 210930049
Test: run test app; presubmit
Change-Id: Ifa27c2258b1e7a2a49b1a4155bd5ada79fa2d1af
2021-12-27 21:22:29 +08: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
Jacob Hobbie
2c34dcd956 Adding client side logging for receivers.
Adding logging so that we can log wtfs and know where they are coming
from without the trace being swallowed by the binder. This will help
track down locations where receivers are being registered for non-system
broadcasts but aren't specifying the necessary flags.

Bug: 161145287
Bug: 207378016
Test: Just adding logging that will be deleted
Change-Id: Ib20c4015caf76ae946bbf2a7fc434777856c18fe
2021-12-22 21:48:59 +00: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