Commit Graph

18012 Commits

Author SHA1 Message Date
Peiyong Lin
68e5d6b6d8 Merge "Address API review feedback." 2022-02-15 19:55:56 +00:00
Vadim Caen
a70bdd8739 Merge "Add enableOnBackInvokedCallaback manifest attribute" 2022-02-15 19:07:27 +00:00
John Reck
a49e26c27c Merge "Add setBuffer w/ SyncFence" 2022-02-15 17:55:51 +00:00
Yohei Yukawa
e559812ca7 Merge "Remove unused InputMethod#setCurrentShowInputToken()" 2022-02-15 16:29:23 +00:00
Yohei Yukawa
99a34dabf4 Merge "Remove unused InputMethod#setCurrentHideInputToken()" 2022-02-15 16:19:42 +00:00
Felipe Leme
bb1bb44c00 Merge "Deprecated "legacy" options for Activity.dump()" 2022-02-14 23:59:34 +00:00
Peiyong Lin
0c1891e714 Address API review feedback.
Avoid using nested callback classes, move the Executor to register
function and update the Javadoc to emphasize unregister call is always
expected even when a task is already destoryed.

Bug: b/216628683
Test: atest TaskFpsCallbackTest

Change-Id: I801898d082a6eeb6a6f991e3765795a270943d42
2022-02-14 22:18:29 +00:00
Vadim Caen
625f5e286f Add enableOnBackInvokedCallaback manifest attribute
Add a manifest flag for applications to opt-out of the new back
navigation system.

Test: atest
CtsWindowManagerDeviceTestCases: android.server.wm.BackNavigationLegacyTest
Bug: 217709328
Change-Id: I43d09a37b126e59bdb8f20bb83cf6d99e53a1e91
2022-02-14 22:27:10 +01:00
Yohei Yukawa
7d2f3d98ad Remove unused InputMethod#setCurrentShowInputToken()
This is a clean up CL to our previous CL [1], which introduced an
unused @hide method

  InputMethod#setCurrentShowInputToken().

Since that method has never been called, there should be no behavior
change in this CL.

 [1]: Ia49e23dd077d264a58d28a7b8acffde54b7db187
      bb0e2f753b

Bug: 111084606
Bug: 192412909
Test: presubmit
Change-Id: Idd607ef62c91a92006da4bf26a86338ea7224ce8
2022-02-14 12:19:09 -08:00
Yohei Yukawa
10c406e461 Remove unused InputMethod#setCurrentHideInputToken()
This is a clean up CL to our previous CL [1], which introduced an
unused @hide method

  InputMethod#setCurrentHideInputToken().

Since that method has never been called, there should be no behavior
change in this CL.

 [1]: Ia596a392eb73ae46debd097151c8c9a7edd59833
      44e2ae4afc30b6a873e1536e31619db258f6cf00

Bug: 133381284
Bug: 149870112
Bug: 192412909
Test: presubmit
Change-Id: I8906360dc51ad3468b9ce4c97d477ae9bcdb2e91
2022-02-14 12:14:57 -08:00
Felipe Leme
865dc828f5 Merge "Final (?!?!?!) improvements on Activity.dump()" 2022-02-14 19:28:29 +00:00
Felipe Leme
cfd8bb1da6 Deprecated "legacy" options for Activity.dump()
These 3 options (--autofill, --contentcapture, and --tranlation)
are now available as '--dump-dumpable DUMPABLE' (where DUMPABLE is
AutofillManager, ContentCaptureManager, and UiTranslationController
respectively).

Test: adb shell am start com.android.settings && adb shell dumpsys activity com.android.settings --autofill
Test: m -j update-api

Bug: 149254050

Change-Id: Iaf9040a4afcd87d32c60e32d19aaca8e1d2c817a
2022-02-14 09:52:52 -08:00
Felipe Leme
bca61d7f66 Final (?!?!?!) improvements on Activity.dump()
- Fix handle of special args (they were not called unless the app
  targeted T).
- Lazy-adds some dumpables to Activity (so the list of dumpables
  is not created until dump() is called).

Test: adb shell am start com.android.settings && adb shell dumpsys activity com.android.settings --list-dumpables
Test: atest CtsAppTestCases:android.app.cts.ActivityDumpTest

Bug: 149254050

Change-Id: Id25d115d4aef8ab16ceb3d035c134c637e16dadd
2022-02-14 09:20:51 -08:00
John Reck
13bfbb7742 Add setBuffer w/ SyncFence
Test: atest android.view.cts.SurfaceControlTest
Bug: 217776226
Change-Id: Ia40947a8cc056d3fcc5569e522524af61c4e5b1b
2022-02-14 12:00:08 -05:00
Pablo Gamito
c533e1070c Merge "Fix typos" 2022-02-14 14:55:10 +00:00
Galia Peycheva
7c4896c5c7 Merge "Implement expanded PiP on TV." 2022-02-14 12:09:21 +00:00
Vadim Caen
ebcfbdfc58 Merge "Invoke callbacks based on back navigation type." 2022-02-14 09:55:49 +00:00
Galia Peycheva
c6876ff4c8 Implement expanded PiP on TV.
- Launch into expanded PiP
- Let user toggle expanded PiP in Menu
- Update moving the PiP via DPAD for expanded PiP
- Let app dynamically change the expanded PiP aspect ratio
- Let app dynamically change the PiP aspect ratio
- Let app dynamically enable/disable expanded PiP

Bug: 203647003
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatio
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatioMaxWidth
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatioMaxHeight

Change-Id: Ie7de6a7fcc424b0c086fdae1f66aa8de42e53b0c
2022-02-14 09:04:20 +00:00
TreeHugger Robot
698426a8d8 Merge "SurfaceView: Clean up synchronized changes with applyTransactionOnVriDraw" 2022-02-12 02:53:19 +00:00
Shan Huang
642b0d8cdd Invoke callbacks based on back navigation type.
Test: m -j.
Test: Open and swipe back on pre-T and T apps.
Test: atest .../BackNavigationControllerTests.java
Test: atest .../BackAnimationControllerTest.java
Bug: b/195946584
Change-Id: I00cf7ab5b57760d57d30ac74dc5b3443a4203f38
2022-02-11 22:59:04 +00:00
Treehugger Robot
26eecc1c62 Merge "OWNERS for ViewStructure" am: a05c4bb1bd am: 3e537e673d am: 7d63e8a6b4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1981428

Change-Id: Ibf12ff3f3e13ac8ff59b794d40db1c6b21f63775
2022-02-11 18:39:10 +00:00
Treehugger Robot
7d63e8a6b4 Merge "OWNERS for ViewStructure" am: a05c4bb1bd am: 3e537e673d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1981428

Change-Id: Ifc34a8b53b0c0e5fc626c5d506190e69c614f33f
2022-02-11 18:28:16 +00:00
Vishnu Nair
6d3b93ae15 SurfaceView: Clean up synchronized changes with applyTransactionOnVriDraw
Replace existing synchronization logic with calls to
ViewRootImpl#applyTransactionOnDraw. There is no functional change.

Test: presubmit
Bug: 217973491
Change-Id: I3b1416c2889d2c3b5c3833ffab4e28a9e0eb5d76
2022-02-11 09:41:35 -08:00
Nikolas Havrikov
4fcc248c03 Merge "Recycle obtained TypedArrays" 2022-02-11 07:29:37 +00:00
Riddle Hsu
48ea281fe4 Merge "Reduce unnecessary invocation of pokeDrawLock" 2022-02-11 06:42:56 +00:00
Ahaan Ugale
8301da241b OWNERS for ViewStructure
Change-Id: I135bfa1a5e15d3b9658028b4e430c847280d7654
Test: n/a
Fix: 218966221
2022-02-11 05:49:36 +00:00
Ahaan Ugale
d6e0516f35 Merge "API to show autofill dialog." 2022-02-11 03:08:12 +00:00
TreeHugger Robot
fca54fd47e Merge "Add more docs per API council feedback" 2022-02-11 02:25:05 +00:00
TreeHugger Robot
4f95f02d2c Merge "PIP: pass grant focus token to focus requests" 2022-02-11 01:02:30 +00:00
Haoyu Zhang
e96b638348 Merge "Scribe for View: handwriting initiation for unfocused" 2022-02-10 22:45:53 +00:00
Rob Carr
fb918b33ed Merge "ViewRootImpl: Resilience for applyOnNextDraw" 2022-02-10 22:07:10 +00:00
John Reck
a96a6df156 Add more docs per API council feedback
Test: make
Fixes: 218314633
Change-Id: I49fa3defa7907f48e650618295f7db758e247a2a
2022-02-10 16:32:04 -05:00
Vishnu Nair
70190ee138 PIP: pass grant focus token to focus requests
Update remaining uses of grantEmbeddedWindowFocus
to pass in a grantFocusToken instead of the input token.

Test: steps in b/218436735
Fixes: 218436735
Change-Id: Idadbd584c06f75ea64dd18a6a002d14426de8998
2022-02-10 20:25:50 +00:00
Haoyu Zhang
f0404bd4c3 Scribe for View: handwriting initiation for unfocused
Bug: 211763729
Test: atest FrameworksCoreTests:HandwritingInitiatorTest
Test: atest FrameworksCoreTests:HandwritableViewInfoTest
Test: atest FrameworksCoreTests:HandwritingAreaTrackerTest
Test: manually test
Change-Id: Ica9ee82cf1dc41feb5e4ff0f52ee13c1e4de8ad4
2022-02-10 10:28:14 -08:00
Rob Carr
ad597c31ce Merge "SurfaceControlViewHost: Basic child window support" 2022-02-10 18:18:54 +00:00
Alan Viverette
7d1188244c Merge "Migrate frameworks/base javadocs references to androidx" 2022-02-10 18:02:28 +00:00
Sally Yuen
6bb459d3de Merge "Expose prefetching strategies to services" 2022-02-10 17:09:37 +00:00
TreeHugger Robot
8b83e8f0ea Merge "Add identifier for EmbeddedWindows" 2022-02-10 16:58:53 +00:00
TreeHugger Robot
1e4bf7fa9e Merge "Recycle obtained TypedArrays" 2022-02-10 16:01:57 +00:00
Pablo Gamito
599f535b1b Fix typos
Test: N/A
Change-Id: I4ced02e143842f9fc38be1b991873d5c1bac7efd
2022-02-10 16:09:24 +01:00
Shan Huang
a1c62623bf Merge "Create BackEvent interface for back navigation parameters." 2022-02-10 14:59:06 +00:00
Shan Huang
27d450afa5 Merge "Avoid leaking Activity from OnBackInvokedCallback." 2022-02-10 14:58:38 +00:00
Ahaan Ugale
00209d94fc API to show autofill dialog.
This allows a UI Toolkit to display the autofill dialog instead of an
input method, if autofill suggestions are already available when the
user focuses on a view.

The dialog typically covers the input method, so it is undesirable to
show the input method under it.

Bug: 210926084
Test: atest android.autofillservice.cts.dialog.DialogTest
Change-Id: Ib982b0fcc271ed3fa2bf43ebe2f9baf494ec82ef
2022-02-10 14:21:09 +00:00
Nikolas Havrikov
e854c600b5 Recycle obtained TypedArrays
Bug: 218835043
Test: make
Change-Id: I069b84684fd3a7505516c014420d55d1e3272ae7
2022-02-10 15:00:48 +01:00
Nikolas Havrikov
55b2bc4bd2 Recycle obtained TypedArrays
Bug: 218835043
Test: make
Change-Id: I7b9c3d1039ba814ae2c6ba2a3ed2c7f02915974e
2022-02-10 14:57:14 +01:00
Riddle Hsu
250a970001 Reduce unnecessary invocation of pokeDrawLock
Now it only acquires wake lock (poke draw) for focused activity
window. Because the original purpose (commit c2932a1) is to make
sure that ambiactive activity can draw without being suspended
for wearable devices.

Check focus instead of visibility because pokeDrawLockIfNeeded
can be called from DisplayListener which happens before the
visibility change.

On a regular phone device with AOD enabled, this can reduce the
number of invocation:
 30+ times when turning screen off.
 4 times per minute (the clock on AOD).
i.e. pokeDrawLock will never be called on a device with keyguard.

Bug: 218406154
Test: Enable AOD, turn off screen to enter AOD.
      Check the section "Wake Lock Log" of "adb shell dumpsys power".
      There is no more "ACQ Window:xxx (draw)".
      And after several minutes, the clock on AOD still shows the
      latest time (because com.android.systemui.doze.DozeUi#onTimeTick
      also acquires WakeLock).
Change-Id: I6fc7f6afec68c63124d76c4734285188ab62fc41
2022-02-10 19:53:13 +08:00
Shan Huang
a39fa74923 Create BackEvent interface for back navigation parameters.
Bug: b/210539672, b/195946584
Test: m -j
Change-Id: I0264d0995aed8a73563bece0d15d2a9aac0ebf06
2022-02-10 07:01:01 +00:00
Shan Huang
b533660125 Avoid leaking Activity from OnBackInvokedCallback.
- Remove mTopCallback field
- Cleanup compat and default callbacks
- Remove the callback held by WindowState when the window is removed.

Bug: 218328707
Test: atest packages/apps/Launcher3/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
Test: atest frameworks/base/core/tests/coretests/src/android/window/WindowOnBackInvokedDispatcherTest.java
Change-Id: I38fd760a617500c874aef10bc8de165880837008
2022-02-10 04:46:24 +00:00
Leon Scroggins III
73e0689d8a getDisplayDecorationSupport: return more detailed info
Call the updated native version of getDisplayDecorationSupport (added in
I961051c0a660b596039ac04b546040764ee20d34), and convert the NDK struct
into a Java class. Depend on the graphics AIDLs, which now have Java
backends. A future CL will update SysUI to call the new API.

Add a PixelFormat for R_8 to correspond to the native version. This will
allow SysUI to use COLOR_MODE_A8 when the HAL reports R_8.

If64fd6924960f592b7a211371bc2ca6536ae34f7 demonstrates using this.

Bug: 216644902
Test: manual
Change-Id: I0e34c6d6e369fda0a96231ab38c3bd5f3bfe3e06
2022-02-09 17:30:29 -05:00
Alan Viverette
406e0f6553 Migrate frameworks/base javadocs references to androidx
Does not remove Support Library artifacts from docs classpath (ApiDocs.bp)
because they are still used in development/samples, which is not as easy
to migrate as javadoc.

Bug: 158779503
Test: make docs
Exempt-From-Owner-Approval: Mass find/replace for androidx migration
Change-Id: Icf7f53ec36a0e970413352e2ebf40ce9d60ed17e
2022-02-09 22:25:14 +00:00