Commit Graph

17223 Commits

Author SHA1 Message Date
Hai Zhang
8c0e7d693b Merge "Only construct real Throwable objects in AndroidFuture.readThrowable()." into sc-dev am: af04dd2ad5 am: 92414a05dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15302018

Change-Id: I269629173d5a291c3e4575b21255394cf9564b73
2021-07-28 01:58:36 +00:00
Hai Zhang
af04dd2ad5 Merge "Only construct real Throwable objects in AndroidFuture.readThrowable()." into sc-dev 2021-07-28 01:23:12 +00:00
Yohei Yukawa
5f21071816 Merge "Fix error swallowing in InputConnectionCommand unparcelling" 2021-07-27 16:11:53 +00:00
Tiger Huang
17ef2f52c6 Merge "Use InsetsVisibilities to carry requested visibilities" into sc-v2-dev am: 9052763843 am: 6b52c08bbf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15385730

Change-Id: I31b54ea52b0d977e0161458ba7e41c4b9578df9d
2021-07-27 06:48:21 +00:00
Tiger Huang
6b52c08bbf Merge "Use InsetsVisibilities to carry requested visibilities" into sc-v2-dev am: 9052763843
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15385730

Change-Id: Iac4fdec20890c2df0960488453c3ff7d2f801f8b
2021-07-27 06:34:28 +00:00
Tiger Huang
9052763843 Merge "Use InsetsVisibilities to carry requested visibilities" into sc-v2-dev 2021-07-27 06:21:13 +00:00
Siim Sammul
d75cbc78c4 Merge "Do not make a getThreadTimeMicro() call when it is not needed. This was accidentally changed with https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080830" into sc-dev am: 6c852aeabc am: b77fb08506
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15346904

Change-Id: I6552265f9258ea772b1774d00bd884cc2d530202
2021-07-26 19:19:05 +00:00
Alison Cichowlas
993c186923 Merge "Sharesheet: remove 2 separators, restyle the 3rd." into sc-dev am: 832779a555 am: fa25c27e48
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15377016

Change-Id: I6d5563833b41f0f0221bbbc4fa71aedf5eb494d0
2021-07-26 19:10:45 +00:00
Alison Cichowlas
b4cf9f5ffc Merge "Sharesheet: be more defensive about un-unparcelable intents." into sc-dev am: a1d1a38269 am: ddbade4025
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15374840

Change-Id: I3f542d0d7548543331fd05a704542df7b563a0b0
2021-07-26 19:05:28 +00:00
Santos Cordon
58622a42ef Merge "SCREEN_BRIGHTNESS - map 255 to current max" into sc-dev am: e4e836a175 am: 379e94d1da
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15359296

Change-Id: I2314b5dd09df823a203088c16481fa8717cae5df
2021-07-26 18:58:37 +00:00
Alison Cichowlas
8f3b2e1c8a Merge "Sharesheet: action bar is independent of WP tabs, should always launch as primary user." into sc-dev am: 9197f7b260 am: 34ff8cdeaf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15363687

Change-Id: I1b5085f13d39250bd58003a5a353bef7e4762054
2021-07-26 18:56:02 +00:00
Yohei Yukawa
11694b0633 Fix error swallowing in InputConnectionCommand unparcelling
This is a follow up CL to my previous CL [1], which added
InputConnectionCommand class with parcelling support.

A Parcel object may contain multiple primitive and Parcelable values.
Neither shallowing exceptions nor early-returning null solves the
fundomental problem that any subsequent read from the same Parcel
object is at risk.

Just let the higher layer decide how to deal with it.

 [1]: I86eba7185b4b0664c1b0b3da794dfc5eeddc725c
      2757c24880

Bug: 194151409
Fix: 194567417
Test: atest CtsInputMethodTestCases:InputConnectionEndToEndTest
Test: atest FrameworksCoreTests:InputConnectionCommandTest
Change-Id: Icd2b40e63771085cb8d88721fbdca7a089256b28
2021-07-26 11:02:44 -07:00
Tiger Huang
090c0cbcb0 Use InsetsVisibilities to carry requested visibilities
InsetsState contains much more information than visibilities, such as
display frame, display cutout, rounded corners, privacy indicator
bounds, and frames of of insets sources. The control target only needs
to send the requested visibilities to WMS, so it can be too heavy to use
InsetsState.

This CL introduces an new class, InsetsVisibilities, which only contains
which type has which visibility. So it uses less memory, and it is more
efficient on copying and checking the equality.

Fix: 194186241
Test: atest InsetsVisibilitiesTest WindowAddRemovePerfTest
            InsetsControllerTest RegisterStatusBarResultTest
            CommandQueueTest LightsOutNotifControllerTest
            ActivityRecordTests DisplayContentTests
            DisplayPolicyLayoutTests InsetsPolicyTest
            InsetsSourceProviderTest InsetsStateControllerTest
            WindowFrameTests WindowManagerServiceTests WindowStateTests
Change-Id: I86c1b26b4383bfa3b924726d580e5706e13ba735
2021-07-26 21:55:34 +08:00
Siim Sammul
11dbfb0896 Merge "Do not make a getThreadTimeMicro() call when it is not needed. This was accidentally changed with https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080830" into sc-dev am: 6c852aeabc am: 4f950d7975
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15346904

Change-Id: Ia9ceba930e67dd84a9321dd1b2b2c87aed5343de
2021-07-26 09:44:53 +00:00
Siim Sammul
b77fb08506 Merge "Do not make a getThreadTimeMicro() call when it is not needed. This was accidentally changed with https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080830" into sc-dev am: 6c852aeabc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15346904

Change-Id: I73089da899cfe25a90f5d52d894ab3ba0291ef1b
2021-07-26 09:25:51 +00:00
Siim Sammul
6c852aeabc Merge "Do not make a getThreadTimeMicro() call when it is not needed. This was accidentally changed with https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080830" into sc-dev 2021-07-26 09:14:43 +00:00
Alison Cichowlas
dcce3e2682 Merge "Sharesheet: remove 2 separators, restyle the 3rd." into sc-dev am: 832779a555 am: 969473792f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15377016

Change-Id: Ib98bfd73dd3e5cd09b8621685aa80bf327dd0f0f
2021-07-24 06:23:17 +00:00
Alison Cichowlas
fa25c27e48 Merge "Sharesheet: remove 2 separators, restyle the 3rd." into sc-dev am: 832779a555
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15377016

Change-Id: I0c1df12a77fdfafe0ab87d28400a77c84b42ceb6
2021-07-24 06:06:52 +00:00
Alison Cichowlas
832779a555 Merge "Sharesheet: remove 2 separators, restyle the 3rd." into sc-dev 2021-07-24 05:53:04 +00:00
Alison Cichowlas
7fe9fdd65f Merge "Sharesheet: be more defensive about un-unparcelable intents." into sc-dev am: a1d1a38269 am: 71ea7c1182
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15374840

Change-Id: I93a27e32648d6fea5b73ca9f2b487c9631d76d9c
2021-07-23 22:03:05 +00:00
Alison Cichowlas
6e6455518c Sharesheet: remove 2 separators, restyle the 3rd.
Test: Manual
Bug: 178619070
Change-Id: I9a6797863be2d0220fb71b2b9ca1d04c1f279b02
2021-07-23 21:43:22 +00:00
Alison Cichowlas
ddbade4025 Merge "Sharesheet: be more defensive about un-unparcelable intents." into sc-dev am: a1d1a38269
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15374840

Change-Id: I86883751c47eeb4f3bc2b5ba51ff6c4a154fba69
2021-07-23 21:42:45 +00:00
Alison Cichowlas
a1d1a38269 Merge "Sharesheet: be more defensive about un-unparcelable intents." into sc-dev 2021-07-23 21:31:40 +00:00
Santos Cordon
0f89c4026d Merge "SCREEN_BRIGHTNESS - map 255 to current max" into sc-dev am: e4e836a175 am: f681b22925
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15359296

Change-Id: I3995d8fbdd1508042c5ba3569679a227d59c624d
2021-07-23 20:23:19 +00:00
Santos Cordon
379e94d1da Merge "SCREEN_BRIGHTNESS - map 255 to current max" into sc-dev am: e4e836a175
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15359296

Change-Id: Ic2d569cc3c914945b8fc322b920f8aa6d7f9d007
2021-07-23 20:17:24 +00:00
Santos Cordon
e4e836a175 Merge "SCREEN_BRIGHTNESS - map 255 to current max" into sc-dev 2021-07-23 20:13:55 +00:00
Alison Cichowlas
417b15994a Sharesheet: be more defensive about un-unparcelable intents.
Test: atest ChooserActivityTest
Bug: 194359789
Change-Id: I2fb0c0e120f048042dea499e1ffc126989e0e2d2
2021-07-23 12:17:29 -04:00
Yohei Yukawa
b72545e7b1 Remove unnecessary "I" from IIInputContentUriTokenResultCallback
This is a mechanical refactoring CL that does nothing but remaning

  IIInputContentUriTokenResultCallback

to

  IInputContentUriTokenResultCallback.

There should be no observable behavior change in this CL.

Bug: 173340613
Bug: 194308519
Test: presubmit
Change-Id: Id37fd7c44145934aea42d7944e5b212c6ff543f6
2021-07-23 08:52:11 -07:00
Alison Cichowlas
1afbd902cb Merge "Sharesheet: action bar is independent of WP tabs, should always launch as primary user." into sc-dev am: 9197f7b260 am: ac0fe8d049
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15363687

Change-Id: I6f828ffbf403884eb1f24778bccbd7a6ab5bdb59
2021-07-23 15:26:16 +00:00
Alison Cichowlas
34ff8cdeaf Merge "Sharesheet: action bar is independent of WP tabs, should always launch as primary user." into sc-dev am: 9197f7b260
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15363687

Change-Id: Idc076592b635f7787e6b41b53755e1933ae32b45
2021-07-23 15:08:10 +00:00
Alison Cichowlas
9197f7b260 Merge "Sharesheet: action bar is independent of WP tabs, should always launch as primary user." into sc-dev 2021-07-23 14:54:12 +00:00
Dmitri Plotnikov
bf55fd64ff Merge "Fix KernelCpuUidUserSysTimeReaderTest#testThrottler by injecting a mock clock" 2021-07-23 01:35:00 +00:00
Alison Cichowlas
f0657fc49e Sharesheet: action bar is independent of WP tabs, should always launch
as primary user.

Bug: 193424706
Test: atest ChooserActivityTest; manual per bug steps

Change-Id: Ie680270fa6a62ec59f35715514bfc0232b0d12f9
2021-07-22 20:43:21 -04:00
Dmitri Plotnikov
d378715dee Fix KernelCpuUidUserSysTimeReaderTest#testThrottler by injecting a mock clock
Bug: 180015146
Bug: 180473895
Test: atest FrameworksCoreTests:KernelCpuUidUserSysTimeReaderTest#testThrottler
Change-Id: I441646b4d5817b62c34bea9cccf0a5a13901736b
2021-07-22 14:57:37 -07:00
Yohei Yukawa
626c33cfea Remove unused methods and classes from Completable class
This is hopefully the last follow up CL to my previous CL [1], which
aimed to logically revert IInputMethodManager from emulated sync IPCs
to truly sync IPCs.

It turns out that my previous clean-up CL [2] forgot to take care of
the following class

  com.android.internal.inputmethod.Completable,

where several unused methods and classes still existed.

Since those methods and classes are not used right now, there should
be no user/developer visible behavior change in this CL.

 [1]: If16ac0de536d9089eb04f6e07b1ee47378124658
      662b48b72d
 [2]: I8666ac1399058b980e51e2459122b2f5f36c77b5
      b1fb07a83b

Bug: 192412909
Test: presubmit
Change-Id: Id5d5a4abeff8291b40baf95d425f4035d3cddffe
2021-07-22 14:00:54 -07:00
TreeHugger Robot
407b327fc7 Merge "A unified data class to represent all the InputConnection call" 2021-07-22 20:26:16 +00:00
TreeHugger Robot
d0f65ce476 Merge changes from topic "a11y_gesture_s-sc-v2-dev" into sc-v2-dev am: ede423187b am: 5f9942df32
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15124972

Change-Id: Ie695d84624595ecbf479d6d724be5f191ead4619
2021-07-22 19:26:21 +00:00
TreeHugger Robot
5f9942df32 Merge changes from topic "a11y_gesture_s-sc-v2-dev" into sc-v2-dev am: ede423187b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15124972

Change-Id: I8d6c0a1842b367db8622f7144fbde02bb2a7fa3c
2021-07-22 19:12:17 +00:00
TreeHugger Robot
ede423187b Merge changes from topic "a11y_gesture_s-sc-v2-dev" into sc-v2-dev
* changes:
  Add the log for new supported accessibility button type 'Accessibility Gesture'
  Update the supported type in ACCESSIBILITY_BUTTON_MODE according to navigation gestural mode or button mode
  Add a supported type 'gesture' under ACCESSIBILITY_BUTTON_MODE
2021-07-22 18:53:58 +00:00
Yohei Yukawa
2757c24880 A unified data class to represent all the InputConnection call
This CL introduces a new parcelable class InputConnectionCommand so
that any of existing and future InputConnection APIs can be marshalled
into a standard Java object, which itself can be a subject of other
useful operations.

Historically each InputConnection API has had a corresponding IPC
definition in IInputContext binder interface, which is indeed a widely
used design pattern in the Android OS [1].  Instead of continuing
doing so, this CL reimplements everything by a single unified IPC
method with a single unified Parcelable data object existing and
future InputConnection APIs.  Although doing so would introduce some
complexity, it also gives us huge flexibility and opportunities to
abstract out common data structure and operations across all the
InputConnection API calls.

For instance, here are code snippets we can now simply write.

  ArrayList<InputConnectionCommand> pendingTasks;

  void dumpToProto(@NonNull InputConnectionCommand command) {
     ...
  }

  void cancelPendingTasks(Predicate<InputConnectionCommand> cond) {
    ...
  }

to do more complex abstractions as needed.

Other than rewriting InputConnection remote execution in a different
manner, this CL changes nothing.  There should be no developer/user
visible behavior changed in this CL, which can also be verified with
CtsInputMethodTestCases:InputConnectionEndToEndTest.

 [1]: This is not a hard requiement though. In fact there is already
      android.os.Messenger that has been used in several places in the
      system.  What android.os.Messenger does is semantically the same
      as what IInputConnectionWrapper is going to do with this CL.

Fix: 194151409
Test: atest CtsInputMethodTestCases:InputConnectionEndToEndTest
Test: atest FrameworksCoreTests:InputMethodDebugTest
Change-Id: I86eba7185b4b0664c1b0b3da794dfc5eeddc725c
2021-07-22 11:03:05 -07:00
Santos Cordon
002e656a51 SCREEN_BRIGHTNESS - map 255 to current max
Since the current max can change for brightness due to
high-brightnes-mode (HBM), make it so that 255 is always mapped
to the current max, which can be different when in HBM or normal
brightness mode.

Bug: 187784093
Test: atest HighBrightnessModeControllerTest
Test: manually verify 255 is used for max when in HBM or not.
Change-Id: Ib0631fc12de0e8e4c7c638901d82c362e79944c3
2021-07-22 18:34:37 +01:00
Nikita Ioffe
cc2578c34b Restrict what APEXes different installers can update am: e501fd8379 am: 85af284b2f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15331871

Change-Id: I62b1ad90cd47aee96437de8bf8d36e5ef9cc111d
2021-07-22 17:26:55 +00:00
Nikita Ioffe
9e0f4ac414 Merge changes from topic "apex-installers-restriction" into sc-dev am: e8b129351c am: 476c20cf84
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15347597

Change-Id: Ia18fd231d7bba4fb168a4c7e2419ef26b9baa099
2021-07-22 17:22:48 +00:00
Nikita Ioffe
6cbb784216 Restrict what APEXes different installers can update am: e501fd8379
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15331871

Change-Id: I3548f8a43e237fb3e7ee3d8ccaf303239153f5c1
2021-07-22 17:21:18 +00:00
Nikita Ioffe
85af284b2f Restrict what APEXes different installers can update am: e501fd8379
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15331871

Change-Id: I06443f46326c1a877d7245ba913e0261432db352
2021-07-22 16:56:05 +00:00
Siim Sammul
8f31e9d663 Do not make a getThreadTimeMicro() call when it is not needed. This was
accidentally changed with https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080830

Bug: 193543224
Test: N/A no functionality change, just avoiding a method call
Change-Id: If4579e96cd5aab41a46f60b5133938e81d608cff
2021-07-22 09:22:56 +00:00
Arthur Hung
a6564536e6 Merge "Fix pointer location apply wrong insets in foldable device" into sc-v2-dev am: c923e35a3c am: 76f074094c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15334686

Change-Id: I4e45e2bb2346180a32b8446ad982759f27c7244c
2021-07-22 03:49:26 +00:00
Arthur Hung
76f074094c Merge "Fix pointer location apply wrong insets in foldable device" into sc-v2-dev am: c923e35a3c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15334686

Change-Id: Iae47db3ceb8cb0a09ef4bed77bd2a7a7c5d485af
2021-07-22 03:48:12 +00:00
Arthur Hung
c923e35a3c Merge "Fix pointer location apply wrong insets in foldable device" into sc-v2-dev 2021-07-22 03:31:54 +00:00
TreeHugger Robot
cfd82c0521 Merge "Remove @UnsupportedAppUsage from IInputConnectionWrapper#mLock" 2021-07-22 03:17:15 +00:00