Commit Graph

519022 Commits

Author SHA1 Message Date
Mohammad Samiul Islam
77c6e91632 Merge "Fix deadlock in StagingManager.getSessions() method" into rvc-dev am: c25a56caed am: 55662925ea
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12117348

Change-Id: I53261f022e658d3aed1d666804619611346c97a6
2020-07-10 20:14:41 +00:00
Mohammad Samiul Islam
55662925ea Merge "Fix deadlock in StagingManager.getSessions() method" into rvc-dev am: c25a56caed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12117348

Change-Id: I5b59c7c270b5d5524f031bc6dfd08c670d280a86
2020-07-10 20:03:21 +00:00
Mohammad Samiul Islam
2ebf7b3667 Merge "Fix deadlock in StagingManager.getSessions() method" into rvc-dev am: c25a56caed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12117348

Change-Id: I3dce0fbf658bb44fa1838aa4507e5f9aa43b2109
2020-07-10 20:02:04 +00:00
Chad Brubaker
a98b760fe8 Move non-access methods to checkOp
ClipboardService previously used noteOp for all clipboard operations,
but this leads to the data being polluted by non-access methods like
getClipDescription and hasPrimaryClip. Move those methods to checkOps
instead.

This also moves the app op check to the end to avoid logging in
scenarios we would have rejected access anyways.

Fixes: 160791050
Test: atest ClipboardManagerTest
Change-Id: Ibb9299f918fcb5ef406f35405769099d179bdcd3
2020-07-10 19:55:02 +00:00
Mohammad Samiul Islam
c25a56caed Merge "Fix deadlock in StagingManager.getSessions() method" into rvc-dev 2020-07-10 19:35:58 +00:00
Nathan Harold
3153f5efb9 Merge "Deprecate CellLocation#requestLocationUpdate" am: 277f52a0f4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1355809

Change-Id: I7b347a042c206e77e991178ab8c31dddec3a7385
2020-07-10 19:27:53 +00:00
Evan Rosky
60c6678031 Use inputtarget to check for insets controller
Was using just the window target, but we need to actually use
the inputmethodinputtarget since that has an activity that can
actually be checked for split-screen mode.

Additionally, we need to force-update the Wm configuration
because we skip doing so when divider is "hidden" by keyguard.

Bug: 159457357
Test: open split with pip running. Open keyboard in secondary,
      lock screen, then unlock.
Change-Id: Idbc0c3b90c18a55cc664c6958546994cbb8549ee
2020-07-10 12:23:30 -07:00
Nathan Harold
277f52a0f4 Merge "Deprecate CellLocation#requestLocationUpdate" 2020-07-10 19:16:01 +00:00
TreeHugger Robot
02c00c91f4 Merge "Consolidate start new input scenerios" into rvc-dev am: 6c440de7a4 am: 99d53c60b4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12086310

Change-Id: I97a8cfa683ebbbf6f0fcd3138db846e8a3ec4a86
2020-07-10 19:10:31 +00:00
TreeHugger Robot
3caa59be1d Merge "Consolidate start new input scenerios" into rvc-dev am: 6c440de7a4 am: 96863d0d50
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12086310

Change-Id: I56f3e063c7117760f260e72d9e7be5afed55b9a7
2020-07-10 19:09:49 +00:00
David Su
704f33f253 StateMachine: check for null curState in dump()
After the StateMachine has quit, getCurrentState()
returns null, which will throw an exception in dump().

Bug: 160283853
Test: atest StateMachineTest
Change-Id: I4f9906eef6210b037d2170904a7c3aa483f5b4e9
2020-07-10 12:09:33 -07:00
Adrian Roos
10f164b688 Revert "Allow bar to be transparent if letterbox contains bar"
This reverts commit 39f818c76c.

Reason for revert: Breaks LIGHT_STATUS/NAVIGATION_BAR with LAYOUT_IN_CUTOUT_MODE_NEVER
Bug: 152273579
Bug: 159627574
Bug: 156301377
Test: Receive call on device with a cutout, verify status bar has icons

Change-Id: I4de084c86ba234fec586e9cd140138a47ed5d87a
2020-07-10 19:09:08 +00:00
Winson Chung
d8df661413 Workaround for delayed reset-transform transaction
- Attempt to mask an issue with the menu window resizing before the
  reset transform is applied by delaying the start of the menu
  animation after the pip expands and extending the duration of
  the animation.

Bug: 160826797
Test: Expand pip repeatedly
Change-Id: I1f8d524f2221b8bfb18a918b192b3e1c20dd6030
2020-07-10 12:06:18 -07:00
TreeHugger Robot
99d53c60b4 Merge "Consolidate start new input scenerios" into rvc-dev am: 6c440de7a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12086310

Change-Id: Ibdd1c9e4d9c87f8c0127f7df5c9082016bd4fdf1
2020-07-10 18:57:50 +00:00
TreeHugger Robot
96863d0d50 Merge "Consolidate start new input scenerios" into rvc-dev am: 6c440de7a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12086310

Change-Id: I6cfec02a3eaad9e5cb86c2a5811c40f3b5f3a8d0
2020-07-10 18:57:35 +00:00
Lucas Dupin
6965ddcea0 DO NOT MERGE Force-enable media feature flag
We won't ever disable it and it's ok to ship it.
Deleting the flag will be done in master given it's a much larger CL.

Bug: 160826507
Test: manual
Test: systemui tests
Test: atest PreferencesHelperTest
Change-Id: I142e7af6316fd9b31cbee2d92df7d89ff42bbc4c
2020-07-10 11:48:31 -07:00
Aurimas Liutikas
41a4b3c039 Merge "Revert "Temporarily disable checkstyle hook"" into rvc-dev am: d9df6c3024 am: 40a4041221
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12129283

Change-Id: I0990aab86066739acef8cb56c49bbe7f40fa96dc
2020-07-10 18:48:04 +00:00
Aurimas Liutikas
d774af33eb Merge "Revert "Temporarily disable checkstyle hook"" into rvc-dev am: d9df6c3024 am: 1d4959b110
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12129283

Change-Id: I3f733ba076c7b372d026c05eb43c55fc54059406
2020-07-10 18:46:54 +00:00
TreeHugger Robot
6c440de7a4 Merge "Consolidate start new input scenerios" into rvc-dev 2020-07-10 18:42:06 +00:00
Aurimas Liutikas
40a4041221 Merge "Revert "Temporarily disable checkstyle hook"" into rvc-dev am: d9df6c3024
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12129283

Change-Id: I90ca8eb614f4190f0d58dafb8d5e71336fd4f1ae
2020-07-10 18:33:44 +00:00
Aurimas Liutikas
1d4959b110 Merge "Revert "Temporarily disable checkstyle hook"" into rvc-dev am: d9df6c3024
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12129283

Change-Id: I14d0e4d5efc2668e2db0b62b5df765db92c5f29b
2020-07-10 18:33:19 +00:00
Stan Iliev
8a3b983f1d Fix for WebView not drawing in a layer
internal_private_accessTopLayerRenderTargetContext does not
guarantee that a GrRenderTarget is created. Moving flush before
internal_private_accessTopLayerRenderTargetContext resolves that
issue. GrRenderTarget was often nullptr, when drawing WebView in a
layer.

Test: Passed CtsUiRenderingTestCases. Ran two tests apps attached to the bug
Bug: 156413480
Change-Id: Ib3e23c4ab58eb3d02daa05979f545b75a8bfea07
2020-07-10 18:20:09 +00:00
Nathan Harold
a2f46553cf Merge "Remove FIXME that getApnSetting should be NonNull" am: a0895c8580
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1261865

Change-Id: Iadbfe55a4875a4fd05264ac5641ad2465aa490d2
2020-07-10 18:13:00 +00:00
Aurimas Liutikas
d9df6c3024 Merge "Revert "Temporarily disable checkstyle hook"" into rvc-dev 2020-07-10 18:10:23 +00:00
Aurimas Liutikas
d5c5ac6ada Revert "Temporarily disable checkstyle hook"
This reverts commit 8497789b3b.

Reason for revert: This was fixed, see b/160796554

Bug: 160796554
Change-Id: I42f8d6b76c7319522239517ac3aff6eee7d9084b
2020-07-10 18:10:14 +00:00
kwaky
8ea210c48f Add null check for resolveInfo and Automotive feature.
AAOS uses multi-user model, and apps become queriable after user is
unlocked. Thus we need to make sure that the querying happens at the
right time with the right user with resolveActivityAsUser.

In order not to affect the stability, we can use the null check +
Automotive check for R.

This null check + Automotive check can be removed when resolving
Activity as User is implemented in S+.

Bug: 158508455
Test: Manual
Change-Id: I58e37f795136508ef7bb53c40214ed3c76f588bf
2020-07-10 11:10:05 -07:00
Victor Chang
5e348b2a28 Move/Copy some libcore.icu classes to android.text.format
Bug: 160606356
Test: atest FrameworksCoreTests:android.text.format
Change-Id: I5a3e954419e8bd282ec5dd057b241c3572be6831
2020-07-10 18:00:29 +00:00
Nathan Harold
a0895c8580 Merge "Remove FIXME that getApnSetting should be NonNull" 2020-07-10 18:00:11 +00:00
SongFerng Wang
b74784d923 Merge "Add carrier config for NR timer reset" into rvc-d1-dev am: 08a86e728f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12086305

Change-Id: I3551b8b7549f87e1ab5ec32c983691d0f5d2bd68
2020-07-10 17:48:19 +00:00
TreeHugger Robot
d140bd2239 Merge "Keep warming services out of cached adj" into rvc-d1-dev am: 56bab14255
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12118646

Change-Id: I94e9237d3d43f7b01ef07b008fcc1e5918b82225
2020-07-10 17:47:04 +00:00
SongFerng Wang
08a86e728f Merge "Add carrier config for NR timer reset" into rvc-d1-dev 2020-07-10 17:34:04 +00:00
TreeHugger Robot
56bab14255 Merge "Keep warming services out of cached adj" into rvc-d1-dev 2020-07-10 17:31:32 +00:00
Automerger Merge Worker
271ebfe8b0 Merge "Merge "Reparent bounds layer if surface was replaced." into rvc-dev am: ab3d80c98d am: 2b66979876" into rvc-d1-dev-plus-aosp 2020-07-10 17:09:14 +00:00
Chavi Weingarten
57627f152d Merge "Reparent bounds layer if surface was replaced." into rvc-dev am: ab3d80c98d am: 2b66979876
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12123266

Change-Id: Ia7bb0a9368776b3615f9033b6480174dcee16af9
2020-07-10 17:09:08 +00:00
Chavi Weingarten
75a12e747c Merge "Reparent bounds layer if surface was replaced." into rvc-dev am: ab3d80c98d am: fa48a156c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12123266

Change-Id: Id12f0265c89d98977fd7720c09c9acae129ba7e2
2020-07-10 17:09:06 +00:00
Chavi Weingarten
2b66979876 Merge "Reparent bounds layer if surface was replaced." into rvc-dev am: ab3d80c98d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12123266

Change-Id: I620278fe572b48c3e1121a6c84a6d876c74c0242
2020-07-10 16:59:25 +00:00
Chavi Weingarten
fa48a156c7 Merge "Reparent bounds layer if surface was replaced." into rvc-dev am: ab3d80c98d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12123266

Change-Id: I9e51a03422e2628717bc23a65f4d62d534266a1d
2020-07-10 16:59:09 +00:00
Chavi Weingarten
ab3d80c98d Merge "Reparent bounds layer if surface was replaced." into rvc-dev 2020-07-10 16:49:33 +00:00
Ming-Shin Lu
d43b75cf0e Consolidate start new input scenerios
As CL[1] we introduced WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR start
input reason to ignore start new input when the focused view is
same as current served view and the input connection remains the same for
prevent additonal onStartInput / onFinishInput callback to
InputMethodService.

The main idea in the CL is good but how to judge whether the input connection
remains the same is not accurate.

CL[1] only checking if IMM#mServedInputConnectionWrapper self and its
input connection instance is stil exists, that breaks the following cases
to start new input:

Case 1:
- When device screen off / on to go back to focused app, this case will
  fit WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR use case, so
  IMM#mServedInputConnectionWrapper won't be deactivate and clear, this
  makes wrong when user taps IME picker dialog to switch IME, will hit
  again WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR and never start new
  input for new IME.
  Actually, in InputMethodManager has an ad-hoc check mRestartOnNextWindowFocus
  to start new input when device screen off / on case and switching IME,
  we should not ignore start input since that will conflict with the above
  case.

Case 2:
- As served view is now tracked by ImeFocusController which is per-window
  based instance from the IME focus handling refectoring CL[2],
  but InputMethodManager instance is still per-display based, so
  IMM#mCurrentTextBoxAttribute might be changed when the same app clinet has
  multiple IME focusable window focus changed, because focusing to the next
  IME focusable window will start new input connection and changes
  IMM#mCurrentTextBoxAttribute, so when focusing back to the
  original window, the served view in the original window's
  ImeFocusController will same as focused view, in that case if we didn't
  check if IMM#mCurrentTextBoxAttribute is really aligned with the given
  focused view, will mis-judge start new input timing and caused user can't
  type because the input connection state is obsoleted.

Those cases can be addessed by using new introduced method
IMM#isSameEditorAndAcceptingText, if the focused view is not aligned
with same editor or the editor is inactive, we should start new input
for Case 2, that also can fix Case 1 that we previously ignored starting
new input when switching IME.

Beside, we also found CL[3] leverages
InputMethodManager#mRestartOnNextWindowFocus to start new input when window focus
changed, since originally this ad-hoc check is only used to re-start input
for Case 1.
As we re-visited the necessary start new input scenerio is only when:
   - Device screen off -> on
   - Switching IME
   - the input connection obsoleted
     (this also includes when window focus changed)

As the result, we can remove all unnecessary logics in IMMS
instroduced by CL[1] and remove unnecessary
InputMethodManager#mRestartOnNextWindowFocus from CL[3], and preserve
the behavior is almost same as Q.

[1]: I2da99ae67b9ce4051dec0c0f0e975ebe6e1ab118
[2]: Ib455704fe1e9d243f93190a84f230210dbceac2a
[3]: I8d4fff94ba9313b773bc27fcbd019cc88580d3e9

Fix: 160391516
Bug: 158624922
Bug: 152373385

Test: atest FocusHandlingTest
Test: atest InputMethodServiceLifecycleTest
Test: manual for case 1
     0) pre-install 3rd party IME app
     1) launch message app and taps Search bar to focus.
     2) turn off screen
     3) turn on screen to back to focused app
     4) press IME switch icon from nav bar
     5) choose next IME, expect the IME should be changed.
Test: manual for case 2
    0) Sample app with 2 activites, each activity the layout has
       EditText
    1) Launch activity A, focus EditText
    2) Launch activity B and focus EditText
    3) Press back key to back to activity A
    4) Verify if typing with keyboard is workable.

Change-Id: I1ef3d341af9d473d94d52fd1890deafbae2bc9e1
2020-07-11 00:42:17 +08:00
Ben Murdoch
aa2c7c9f3e Merge "Fix crashes in UserDetailViewAdapterTest." into rvc-dev am: 73a4bfc9f8 am: 58554aed8a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12108112

Change-Id: I3562d6e3a31c55d61b74841e01b151cfc0dfc629
2020-07-10 16:41:34 +00:00
Ben Murdoch
07ff7a822a Merge "Fix crashes in UserDetailViewAdapterTest." into rvc-dev am: 73a4bfc9f8 am: 1086de18d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12108112

Change-Id: Ic373bbf84f8ae5cf589f8beefafc12409e4f39c1
2020-07-10 16:34:34 +00:00
Ben Murdoch
58554aed8a Merge "Fix crashes in UserDetailViewAdapterTest." into rvc-dev am: 73a4bfc9f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12108112

Change-Id: Iaf457d74486652b4731c99293ae6dfa190518a6d
2020-07-10 16:25:59 +00:00
Ben Murdoch
1086de18d6 Merge "Fix crashes in UserDetailViewAdapterTest." into rvc-dev am: 73a4bfc9f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12108112

Change-Id: Ifd33521e4a693b491f95d2f4c5b31fb7dccbbc88
2020-07-10 16:25:31 +00:00
Ben Murdoch
73a4bfc9f8 Merge "Fix crashes in UserDetailViewAdapterTest." into rvc-dev 2020-07-10 16:15:24 +00:00
Automerger Merge Worker
656c7ad026 Merge "Merge "Update requested state by comparing with source consumer" into rvc-dev am: 894a797421 am: 1568d9181a" into rvc-d1-dev-plus-aosp 2020-07-10 14:20:09 +00:00
Tiger Huang
2f196b7816 Merge "Update requested state by comparing with source consumer" into rvc-dev am: 894a797421 am: 1568d9181a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12108428

Change-Id: Ib22ce5b5eb05e456f897ac96c6bdd1d0e6c8a6ec
2020-07-10 14:19:57 +00:00
Tiger Huang
3516329349 Merge "Update requested state by comparing with source consumer" into rvc-dev am: 894a797421 am: 8e4707ae80
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12108428

Change-Id: I54ea63439c9ccab8e5872243fa6fad8970ea2ef4
2020-07-10 14:19:41 +00:00
Tiger Huang
1568d9181a Merge "Update requested state by comparing with source consumer" into rvc-dev am: 894a797421
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12108428

Change-Id: I3013d5d486b468ed7fedcedbc60cfc2bb61c233a
2020-07-10 14:03:50 +00:00
Tiger Huang
8e4707ae80 Merge "Update requested state by comparing with source consumer" into rvc-dev am: 894a797421
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12108428

Change-Id: I3de26ac30237f76cd71e0e8639cc4025b754f6ef
2020-07-10 14:03:48 +00:00
Tiger Huang
894a797421 Merge "Update requested state by comparing with source consumer" into rvc-dev 2020-07-10 13:51:37 +00:00