Commit Graph

17555 Commits

Author SHA1 Message Date
Wu Ahan
6c5323d8ee Merge "Shorten the timeout of finish call to 10 seconds" into sc-v2-dev am: 7108950503 am: 6c0cb2fcec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15777630

Change-Id: I8e7f3b313b425eba92808f7469610e9217a14841
2021-09-08 21:27:28 +00:00
Wu Ahan
6c0cb2fcec Merge "Shorten the timeout of finish call to 10 seconds" into sc-v2-dev am: 7108950503
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15777630

Change-Id: I07859fe3d30912f84ff4334dd596025fae483706
2021-09-08 12:07:05 +00:00
Joshua Trask
ed4f96f055 Make some ChooserActivity inner classes static.
This helps clarify the (lack of) dependencies between these
classes, and suggests that some of them might make good
candidates for removal from the (large) main source file.

In most cases, the classes already had no dependencies and
were ready to switch to static. In one case I had to modify
a class to make its single dependency more explicit.

The few remaining non-static inner classes have more
intricate dependencies on ChooserActivity, and should be
considered in a separate CL.

Test: build/presubmits (no behavior change)
Change-Id: Ic075f1bdd267cc16f6b7b297c7425873eb9bae55
2021-09-07 16:35:53 -04:00
Ahan Wu
6f787a7588 Shorten the timeout of finish call to 10 seconds
We have a minute timeout of finish call, it's a long duration,
shorten it to 10 seconds.

Bug: 196171638
Test: Manually
Change-Id: I4ff726bbac13fd90e7578074b5f11170816be7b1
2021-09-07 09:18:48 -08:00
Joshua Trask
eed026d039 Delete some unused ChooserActivity code/symbols.
Test: build/presubmits (unused code)
Change-Id: I049e7568a0bc7f65ffb36f1899e1c0b8bed22de4
2021-09-07 13:15:08 -04:00
TreeHugger Robot
31142f4918 Merge "Open up AndroidPackage as @SystemApi" 2021-09-07 15:07:07 +00:00
Treehugger Robot
bec0cce0fa Merge "create library for mainline module" am: c59870928e am: 26531301a0 am: eeecbc866f am: 0ee62e910b am: 71b1df9e93
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1818896

Change-Id: I641652c725fbdb8112918246f6103bc976686361
2021-09-07 14:52:55 +00:00
Treehugger Robot
71b1df9e93 Merge "create library for mainline module" am: c59870928e am: 26531301a0 am: eeecbc866f am: 0ee62e910b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1818896

Change-Id: Ia2f3df9c8c96de96eca1257013efad356a189bae
2021-09-07 14:46:49 +00:00
Treehugger Robot
0ee62e910b Merge "create library for mainline module" am: c59870928e am: 26531301a0 am: eeecbc866f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1818896

Change-Id: If4d803fb10b4fe5f77b308200ed93fd43681190e
2021-09-07 14:33:34 +00:00
Treehugger Robot
eeecbc866f Merge "create library for mainline module" am: c59870928e am: 26531301a0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1818896

Change-Id: Ic3137a8521f0cca651292a9a56cddde54a138ea7
2021-09-07 14:21:56 +00:00
Treehugger Robot
26531301a0 Merge "create library for mainline module" am: c59870928e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1818896

Change-Id: I048c27593314c00706f29db19b6d20ed4b899ae2
2021-09-07 14:00:18 +00:00
William Escande
a6fb9459cc create library for mainline module
This library is a temporary work to link all mainline module using
statemachine.
Once this is done, we will be able to move the library to
frameworks/libs/modules-utils

also fix some typo in state* files

Bug: 198418216
Tag: #refactor
Test: None
Change-Id: I1bec7c7bdb25bf3397a742a356aa1f18fddf7d89
2021-09-06 15:28:09 +00:00
Naomi Musgrave
599a359267 Merge "[MediaProjection] Do not start layer mirroring without a surface" into sc-v2-dev am: 052c311bb2 am: 45a3723982
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15684475

Change-Id: Ie5a8e6aa1f71dd8d55963fd8174d239a3f6233e2
2021-09-06 10:22:51 +00:00
Naomi Musgrave
45a3723982 Merge "[MediaProjection] Do not start layer mirroring without a surface" into sc-v2-dev am: 052c311bb2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15684475

Change-Id: Iffd55a3ae6f1eb736cf6cd0f37a46abe904b1a31
2021-09-06 10:13:27 +00:00
Naomi Musgrave
052c311bb2 Merge "[MediaProjection] Do not start layer mirroring without a surface" into sc-v2-dev 2021-09-06 09:57:30 +00:00
Wu Ahan
535a0bc6b6 Merge "Make sure the removeObservers be called correctly" into sc-v2-dev am: 506fa0bebd am: ceb5b5db70
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15746914

Change-Id: Id078bce060cbc021c453a3fa9635007ea6f2ef6b
2021-09-06 03:49:22 +00:00
Wu Ahan
ceb5b5db70 Merge "Make sure the removeObservers be called correctly" into sc-v2-dev am: 506fa0bebd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15746914

Change-Id: Id574570093d0d59b11079c5b9ecd5b0d5a5006e6
2021-09-06 03:36:40 +00:00
Wu Ahan
506fa0bebd Merge "Make sure the removeObservers be called correctly" into sc-v2-dev 2021-09-06 03:18:43 +00:00
Nataniel Borges
a61012f1d7 [DO NOT MERGE] Sync flicker from master to sc-v2 am: c8287a930f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15716594

Change-Id: I1c8ba8041d346d6991fd113b60e75184aa849ea6
2021-09-04 00:36:01 +00:00
TreeHugger Robot
6bd19fab1c Merge "[DO NOT MERGE] Sync flicker from master to sc-v2" into sc-v2-dev 2021-09-04 00:15:31 +00:00
TreeHugger Robot
5e678125d2 Merge "Consolidate systrace logic in RemoteInputConnectionImpl" 2021-09-03 20:04:15 +00:00
Yohei Yukawa
451b5da2f7 Consolidate systrace logic in RemoteInputConnectionImpl
This is a follow up CL to our previous CL [1], which introduced
method tracings of InputConnection in the IME client side.

This CL does not change its observable behavior but attempts to
simplify RemoteInputConnectionImpl by extracting out the tracing logic
into task dispatching logic from each InputConnection API handling.

This CL should slightly improve the performance unless systrace for
Trace.TRACE_TAG_INPUT is expcility enabled, because

  Trace.isTagEnabled(Trace.TRACE_TAG_INPUT)

is now called only once per InputConnection command down from twice
per command.  Although the call count would be increased to three
times per command when the tracing is manually enabled, hopefully it'd
be acceptable as an overhead of doing runtime tracing.

Anyway, there should be no observable behavior changes in this CL.

 [1]: I6718aa3183c95fc6802d93137e22d21b71869cfc
      bbdec456e2

Bug: 154348613
Bug: 192412909
Test: presubmit
Test: Manually verified that sytrace is still working
Change-Id: I0a5a6a34cb2a7e0942415253e7edea7eedd1083c
2021-09-03 11:14:12 -07:00
TreeHugger Robot
e88edfdd4d Merge changes Ieac0bb3f,I13fa478f
* changes:
  LockPatternView: Combine all cell activation animations.
  LockPatternView dot activation animation.
2021-09-03 15:59:59 +00:00
TreeHugger Robot
a2d487e3f8 Merge "Add new line disappearing animation to LockPatternView." 2021-09-03 15:58:57 +00:00
Ahan Wu
f0fda0d220 Make sure the removeObservers be called correctly
Handle the surface destroyed case and add a timeout for finish call.

Bug: 196171638
Test: adb shell dumpsys SurfaceFlinger
Test: check the offscreen layers
Change-Id: Id1c0e3a0aea1e27a5581a9c7bdcbe6562f8e2ab6
2021-09-03 06:05:43 -08:00
Naomi Musgrave
fcef782559 [MediaProjection] Do not start layer mirroring without a surface
An app may pass a null surface to MediaProjection#createVirtualDisplay,
and later set the surface on the VirtualDisplay. The display's state
will change from off to on when the surface is set.

When determining if layer mirroring should be started/updated in
DisplayContent, take the presence of the surface/display state
into account, to prevent the app from crashing.

Bug: 197863746
Test: atest WmTests:DisplayContentTests
Change-Id: I01af07fff681aab6fc8235c861375eb79118cbfe
2021-09-03 14:42:52 +01:00
Aleksandr Litovchenko
f5ca99130a LockPatternView: Combine all cell activation animations.
Combine dot radius, dot color, line disappearing, line end animations together. It helps to reduce inconsistent states when one animation is cancelled and another is still running.

Bug: 196067470
Change-Id: Ieac0bb3f329ac94924e3c5dd5a4a4e119404a56c
(cherry picked from commit f5436912207f512493270ee5a1824b89f792aea4)
2021-09-03 10:17:57 +00:00
Aleksandr Litovchenko
c3cabe0af9 LockPatternView dot activation animation.
Animate dot color when it's activated, duration is synchronized with line disappearing animation.
Do not animate dot size if it's not needed.

Bug: 196067470
Bug: 193417780
Tests: Manually
Change-Id: I13fa478f434b2c56a5818a4b639f3e38f7c05c4d
(cherry picked from commit 450633259bc6283f25d98d5e056d39e74bcb8cc7)
2021-09-03 10:17:02 +00:00
Aleksandr Litovchenko
08e34241c7 Add new line disappearing animation to LockPatternView.
Instead of simply fading out the line now it disappears with moving gradient.
According to the specs animation delay is 150ms and duration 500ms.

Bug: 196067470
Bug: 193417780
Tests: Manually
Change-Id: If4315683ba73895a0ca8287047d13da150727366
(cherry picked from commit 8392f9c4ac9505c79a4fe3c6f29ee4e24eaf4e3c)
2021-09-03 10:03:24 +00:00
shawnlin
bae802cfd8 [DO NOT MERGE]Support rounded corner for multi-display devices am: 6603444a76
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15581983

Change-Id: Iaf7cd7b6c357c8df9f7abe39d737fd71e705d557
2021-09-03 04:04:19 +00:00
Shawn Lin
8ddf5486f4 Merge "Support rounded corner for multi-display devices" 2021-09-03 03:57:37 +00:00
Shawn Lin
97b0de7326 Merge "[DO NOT MERGE]Support rounded corner for multi-display devices" into sc-v2-dev 2021-09-03 03:57:09 +00:00
Winson
b013a475eb Open up AndroidPackage as @SystemApi
Moves all the PackageInfo/ApplicationInfo values into core SDK side
interfaces which represent all the mirrored functionality.

Creates AndroidPackageApi, PackageState, and a new PackageUserState
interface that act as the actual exposed interfaces for consumers like
mainline.

To avoid taking the PackageManagerService lock, and to avoid mutability
issues, PackageSettings are shallowly copied into PackageState objects.
And class PackageUserState objects into interface PackageUserState.

Eventually PackageSetting/class PackageUserState should be migrated to
the corresponding interfaces.

Miscellaneous additional changes:
 - Removes PackageSetting#uidError, was never used
 - Removes PackageUserState#categoryHint, was a package level field
   without per-user difference, use PackageSetting#categoryHint instead
 - Add locking to class PackageUserState overlay paths so they can be
   copied for the new interface.

Bug: 173455397

Test: atest com.android.server.pm.ScanTests

Change-Id: Ib98c66a9b4d78d09151724eaf14c16074c3621c9
2021-09-02 10:39:04 -07:00
TreeHugger Robot
aa8164a396 Merge "Propagate exceptions in RemoteInputConnectionImpl" 2021-09-02 00:14:23 +00:00
Joe Bolinger
88fdc5060b Merge changes from topic "more-cancel-sc-qpr1-dev" into sc-qpr1-dev am: 16a7d2e7bd am: 02eb16d887 am: 1c6d4006c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15727904

Change-Id: I815ef2d4fbcbdbedf5b0094ac8fe54875a41e98e
2021-09-01 22:54:32 +00:00
Joe Bolinger
1c6d4006c1 Merge changes from topic "more-cancel-sc-qpr1-dev" into sc-qpr1-dev am: 16a7d2e7bd am: 02eb16d887
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15727904

Change-Id: I91c4de88902de11510d6ac79db5e9db61c4dc2ec
2021-09-01 22:36:28 +00:00
Joe Bolinger
02eb16d887 Merge changes from topic "more-cancel-sc-qpr1-dev" into sc-qpr1-dev am: 16a7d2e7bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15727904

Change-Id: Id9964610269328c04806b44d10b9bb555b1f63e0
2021-09-01 22:23:39 +00:00
Joe Bolinger
c346dab881 Merge changes from topic "more-cancel-sc-qpr1-dev" into sc-qpr1-dev am: 16a7d2e7bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15727904

Change-Id: Id8fb1fac31177116d974bd99f1056f6565d986ea
2021-09-01 22:23:23 +00:00
TreeHugger Robot
ddfb9581e4 Merge "Add RESERVE_NEW_UI_EVENT_ID field to EventEnum interface." 2021-09-01 20:04:48 +00:00
TreeHugger Robot
c21f736077 Merge "Dismiss the suspend dialog if conditions have been modified." 2021-09-01 16:50:47 +00:00
Joe Bolinger
bdd477a5d1 Add requestId to authentication entry points.
The CancellationSignal passed into the authentication methods is not
associated with the request and can be used to cancel the current
operation, even if it is more recent. The new id prevents outdated
signals from being using.

Note that there are still issues with the Callbacks that are not
addressed (see bug for details).

Bug: 194405579
Bug: 189451155
Bug: 191716671
Test: atest com.android.systemui.biometrics com.android.server.biometrics

Change-Id: Id71be912cc88ae90df8087eb8f1a6fc3e110f883
2021-09-01 08:49:26 -07:00
TreeHugger Robot
3b86a0f00f Merge "Reduce @SuppressWarnings("unchecked") a bit" 2021-09-01 15:45:33 +00:00
Nataniel Borges
c8287a930f [DO NOT MERGE] Sync flicker from master to sc-v2
Flicker on master diverged form sc-v2, to make it easier to debug
flicker issues on sc-v2, push the current version of flicker into sc-v2

Test: atest FlickerTests WMShellFlickerTests
Bug: 188792659
Change-Id: I1c832bf32214b12ba4b708bccfc95cf259324844
2021-09-01 12:06:21 +00:00
Lucy Chang
49a6b12603 Merge "Log accessibility privacy warning status (1/2)" 2021-09-01 06:04:01 +00:00
lucychang
239d06c53d Log accessibility privacy warning status (1/2)
Uses the atom NonA11yToolServiceWarningReported in westworld to log
the accessibility privacy warning notification is notified or clikced
in accessibility framework.

Bug: 180983963
Test: m statsd_testdrive && statsd_testdrive 384
Change-Id: I73129e17a62084811f5eb59a2805a38ffb0f112b
2021-09-01 11:50:14 +08:00
thiruram
f1ae087329 Add RESERVE_NEW_UI_EVENT_ID field to EventEnum interface.
Bug: 193797130
Test: atest SystemUITests
Change-Id: I806e1a5f60f49254aa7ea23bef31b3517c0de1fd
2021-08-31 16:05:48 -07:00
TreeHugger Robot
b20a692454 Merge "Ref count isolated uid usage in BatteryStats" 2021-08-31 22:33:03 +00:00
Yohei Yukawa
0c1f2a1189 Propagate exceptions in RemoteInputConnectionImpl
Previously there were cases where we failed to invoke callback used to
implement sync APIs in InputConnection if app's InputConnection failed
due to exceptions, while the IME was still waiting for the callback.

Although such an exception usually triggers an app crash, which
eventually triggers IInputMethodWrapper#unbindInput() to unblock IME's
waiting operation [1], there is no reason to not propagate the failure
through the callback object itself to minimize the blocking time.
This CL just makes it happen.

Note that there is no observable behavior change in the IME client
app.  What this CL does is just completing the callback request before
letting an exception go, which will never change the fate of the IME
client process.

 [1]: Ic65a95eb5d0fd56f505a02fd9083bcf6694b6734
      f87f750888

Fix: 195699814
Test: atest CtsInputMethodTestCases:InputConnectionHandlerTest
Change-Id: I5b88333cfad3cbafe311c6262fa00eff893cd8f1
2021-08-31 15:15:33 -07:00
Yohei Yukawa
dc17643e2c Reduce @SuppressWarnings("unchecked") a bit
This is a mechanical refactoring CL to follow up my previous CL [1],
which replaced our custom callback interfaces with AndroidFuture<T>,
which made us lose compile time checking in RemoteInputConnectionImpl.

Although we are still effectively annotating types manually, this CL
allows us to consolidate @SuppressWarnings("unchecked") into a single
utility method rather than scattering such annotations into multiple
methods.

Other than clean up the code, there should be no observable behavior
change in this CL.

 [1]: I74657826a99b11ca1f86932f8f41cca6e449cc8a
      b2d09de1f9

Bug: 192412909
Bug: 195699814
Test: presubmit
Change-Id: I59a60d7291142bf4827a05ce84183e84457c32b8
2021-08-31 11:48:18 -07:00
TreeHugger Robot
c2e5825fce Merge "Refine WindowInsets logs" into sc-v2-dev am: 964abd77da am: 162c1fe42a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15716099

Change-Id: If362a1a72abaae4de39f7be5ad1247463be63038
2021-08-31 16:08:42 +00:00