Commit Graph

515220 Commits

Author SHA1 Message Date
Automerger Merge Worker
4004b8fcdf Merge "Merge "Add null check for resolveInfo and Automotive feature." into rvc-dev am: 97c9d1f8b2 am: 1c6427b940" into rvc-d1-dev-plus-aosp 2020-07-10 21:09:49 +00:00
Youngjun Kwak
53f91cad0a Merge "Add null check for resolveInfo and Automotive feature." into rvc-dev am: 97c9d1f8b2 am: 1c6427b940
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12114119

Change-Id: Ifbc5487ef992c5c090530e50ecb156dfae843d38
2020-07-10 21:09:34 +00:00
Youngjun Kwak
b66b8c40e4 Merge "Add null check for resolveInfo and Automotive feature." into rvc-dev am: 97c9d1f8b2 am: f67ec51b06
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12114119

Change-Id: I388f7687be8c2f72dc8741eff68b69694def2f7d
2020-07-10 21:09:31 +00:00
Youngjun Kwak
f67ec51b06 Merge "Add null check for resolveInfo and Automotive feature." into rvc-dev am: 97c9d1f8b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12114119

Change-Id: Ie06b73832660f21369b55ba02ce5414b91230223
2020-07-10 20:55:39 +00:00
Youngjun Kwak
1c6427b940 Merge "Add null check for resolveInfo and Automotive feature." into rvc-dev am: 97c9d1f8b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12114119

Change-Id: I460dbe46977592c8a3a919efae5acff05077d4bf
2020-07-10 20:55:05 +00:00
Youngjun Kwak
97c9d1f8b2 Merge "Add null check for resolveInfo and Automotive feature." into rvc-dev 2020-07-10 20:43:27 +00:00
Mohammad Samiul Islam
db81db11c6 [automerger skipped] Merge "Fix deadlock in StagingManager.getSessions() method" into rvc-dev am: c25a56caed am: 2ebf7b3667 -s ours
am skip reason: Change-Id I7a1abf44db27d4673d43e9b0886610a5bd8b41f6 with SHA-1 3aa1f5aa16 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12117348

Change-Id: I2113e1926061c46d283baf1c7565801784517f38
2020-07-10 20:16:34 +00:00
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
Mohammad Samiul Islam
c25a56caed Merge "Fix deadlock in StagingManager.getSessions() method" into rvc-dev 2020-07-10 19:35:58 +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
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
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
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
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
Tsung-Mao Fang
b192f20ed6 Add a space after bullet point is recommended am: 157cf557b1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12068940

Change-Id: Ibeacf342cbb122d06b646a68a714cf62725687c3
2020-07-10 13:17:20 +00:00
Tsung-Mao Fang
157cf557b1 Add a space after bullet point is recommended
Test: Rebuilt rom.
Fix: 156248378
Change-Id: Icc99587c35d58f2aaa7d52f152dc980ad09afdfd
2020-07-10 10:32:46 +00:00
Tiger Huang
ff06666dba Update requested state by comparing with source consumer
If the local state and mLastDispatchedState are the same, the logic in
onStateChanged will skip updating the requested state. This could be an
issue, for example, a new focused window requested to hide status bar,
but status bar has already been hidden by the previous focused window,
so the new focused window will never send the requested state to server.
This can easily happen when an immersive activity is re-created due to
the configuration change.

This CL updates the requested state if any visibility within it is not
the same as the requested visibility of the source consumer, while
receiving controls.

Fix: 160854328
Test: atest InsetsControllerTest
Test: Swipe to show transient bars after rotating an immersive activity
Change-Id: I5d9acb1b59252fa80e66070db86b2555764588da
2020-07-10 18:04:57 +08:00
Mohammad Samiul Islam
3aa1f5aa16 Fix deadlock in StagingManager.getSessions() method
When we stage a session we acquire the PackageInstallerSession#mLock
first and then StagingManager#mStagedSessions lock. But in getSessions()
method, we acquire the locks in reverse order which can lead to
deadlock: we first acquire StagingManager#mStagedSessions in
getSessions() and then while checking if session is destroyed, we
acquire PackageInstallerSession#mLock in isDestroyed() method.

By moving the staged session retrieval logic to PackageInstallerService,
we avoid acquiring the StagingManager#mStagedSession lock. This avoids
deadlock.

Bug: 160113544
Test: atest StagedInstallTest
Change-Id: I7a1abf44db27d4673d43e9b0886610a5bd8b41f6
Merged-In: I7a1abf44db27d4673d43e9b0886610a5bd8b41f6
(cherry picked from commit c45b6a146c)
2020-07-10 10:02:39 +01:00
Treehugger Robot
57c6c1b17c Merge "Delete newFromCMT() and newFromCDS() from SmsMessage" am: b599edc541 am: b403b0877d am: 5850cbdfad
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1359205

Change-Id: I298b098bb2b364973aa4dd542c26725b8906a218
2020-07-10 07:28:21 +00:00