Commit Graph

386651 Commits

Author SHA1 Message Date
Yohei Yukawa
3b3a2ade94 Make IMM#peekInstance() thread-safe
Somehow InputMethodManager#peekInstance() has not been thread-safe.
Although we basically do not care this deprecated method, but let's
just update it for consistency.

Bug: 115891476
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I56bf05f76a7939f004efefdd956776e533bae058
2018-09-20 15:50:35 -07:00
TreeHugger Robot
4435742cd1 Merge "Let IMMS be responsible for IInputMethodClient lifecycle" 2018-09-20 17:27:53 +00:00
Chavi Weingarten
f8dd48e765 Merge "Removed global windowFrames from PWM" 2018-09-20 17:26:48 +00:00
Lucas Dupin
9232b57454 Merge "Clarify that UiModeManager sets global night mode" into pi-dev am: 562f5485d3
am: f255935dc8

Change-Id: Ib94e5ed781ff7b5499fd3380f16ae5e6bfefdaf7
2018-09-20 10:17:38 -07:00
Lucas Dupin
f255935dc8 Merge "Clarify that UiModeManager sets global night mode" into pi-dev
am: 562f5485d3

Change-Id: Ia757aeb7dbe97b1b33ababf50af5c96da8d7e963
2018-09-20 10:01:22 -07:00
Andrii Kulian
e5bd3541b8 Merge "Make sure to add default display before others" 2018-09-20 16:51:29 +00:00
Andrii Kulian
c543addf1f Make sure to add default display before others
Some parts of WM init assume that display with id 0 will be added
before all other displays. This CL traverses the displays from DM
from the beginning of the list, which will provide increasing
display ids.

Bug: 74446287
Test: Boot bat_land with 2 displays attached
Change-Id: Ie46954cc9f20a29f30c5f45fb6aabf46eba63fa8
2018-09-20 16:50:03 +00:00
Lucas Dupin
562f5485d3 Merge "Clarify that UiModeManager sets global night mode" into pi-dev 2018-09-20 16:39:49 +00:00
TreeHugger Robot
9014e3c937 Merge "Always use Context.getSystemService() to get IMM in SysUI" 2018-09-20 16:35:26 +00:00
Lucas Dupin
a45a4aecb6 Merge "What a horrible fix" 2018-09-20 16:30:48 +00:00
Lucas Dupin
838337d0d0 Merge "Hide bouncer after unlocking SIM card" 2018-09-20 16:15:52 +00:00
Fabian Kozynski
bf954233c6 Merge "Refactor PagedTileLayout to not overflow screen" 2018-09-20 14:33:55 +00:00
TreeHugger Robot
ee23340357 Merge "Use String.equals when comparing conflicting providers" 2018-09-20 13:36:04 +00:00
TreeHugger Robot
7cdf159fa0 Merge "Fix caller log on appIsRunningAndEligibleForBackupWithTransport" 2018-09-20 13:15:27 +00:00
Fabian Kozynski
712ae39210 Refactor PagedTileLayout to not overflow screen
PagedTileLayout respects MeasureSpec mode for height to decide on how many
rows to show. TilePage and PagedTileLayout only show as many rows as
they can up to the height of the screen. TileLayout can calculate the
maximum number of rows given a height limit.

Fixes: 113082314
Test: Visual, atest

Change-Id: I2860d71c9aeb2a8ac62fcdbc71a3041a91605bcb
2018-09-20 09:01:53 -04:00
Bernardo Rufino
e58291256b Fix caller log on appIsRunningAndEligibleForBackupWithTransport
Test: atest FrameworksServicesRoboTests
Test: adb shell bmgr backupnow --all
Change-Id: I577db6fb92880916a231ffa36a468bd64d8cae09
2018-09-20 11:59:10 +01:00
TreeHugger Robot
eebeb08881 Merge "SecurityControllorImpl: Log whole exception" 2018-09-20 10:51:19 +00:00
Tadashi G. Takaoka
967b7f4f6e Merge "Add TEST_MAPPING and dummy tests to com.android.server.policy." 2018-09-20 08:20:50 +00:00
TreeHugger Robot
81e430324c Merge "Support non-resizeable activities on secondary displays" 2018-09-20 06:35:44 +00:00
Tadashi G. Takaoka
d9da0c8a9a Add TEST_MAPPING and dummy tests to com.android.server.policy.
Bug: 113800711
Bug: 111302567
Test: tradefed.sh run commandAndExit WmTests \
    --include-filter com.android.server.policy. \
    --include-annotation android.platform.test.annotations.Presubmit \
    --exclude-annotation androidx.test.filters.FlakyTest

Change-Id: I723c9da0c7c5284b3ab57cfd096f4a8428c17305
2018-09-20 13:33:26 +09:00
TreeHugger Robot
58c147fb65 Merge "Fix FlakyTest filter in wm/TEST_MAPPING" 2018-09-20 03:22:34 +00:00
daqi
ef4dda2d02 Merge "Merge "Set InputMethoMananger#mCurRootView to null when window dismissed" am: 7bd18423f6 am: 9c5a6e2c6c" into pi-dev-plus-aosp
am: 205f5bd249

Change-Id: I69f543dc6be8383b289e61aabb5de4bd1f8f09c1
2018-09-19 20:00:44 -07:00
Felipe Leme
fa30852d6f Merge "Clarified FillCallback and SaveCallback behaviors." into pi-dev am: 971ad7aa5e
am: 5529a99f42

Change-Id: Ibdee3ee359415f684b1e30223f89b7a2dfb0ca4b
2018-09-19 19:46:51 -07:00
Android Build Merger (Role)
205f5bd249 Merge "Merge "Set InputMethoMananger#mCurRootView to null when window dismissed" am: 7bd18423f6 am: 9c5a6e2c6c" into pi-dev-plus-aosp 2018-09-20 02:35:47 +00:00
daqi
4d5ba15e69 Merge "Set InputMethoMananger#mCurRootView to null when window dismissed" am: 7bd18423f6
am: 9c5a6e2c6c

Change-Id: I6198c9d52c19e48f61bb4d488018c067d4b80108
2018-09-19 19:35:27 -07:00
Felipe Leme
5529a99f42 Merge "Clarified FillCallback and SaveCallback behaviors." into pi-dev
am: 971ad7aa5e

Change-Id: I3dda44262a318c277aa226321b0ed1e1dc34e6a1
2018-09-19 19:33:39 -07:00
daqi
9c5a6e2c6c Merge "Set InputMethoMananger#mCurRootView to null when window dismissed"
am: 7bd18423f6

Change-Id: Ie0127bd83b714c540bcf387a3fc74d01bd60eb13
2018-09-19 19:22:12 -07:00
Yohei Yukawa
a71bb25cff Let IMMS be responsible for IInputMethodClient lifecycle
This is the last step to remove the dependency on IInputMethodClient
from WindowManagerService.

With my previous CL [1], now WindowManagerService (WMS) depends on
IInputMethodClient just because it implements lifecycle management of
IInputMethodClient on behalf of InputMethodManagerService (IMMS).

This CL mechanically moves that responsibility from WMS to IMMS for
better separation of concerns.  It is a bit ironic that this CL is
partly undoing my previous CLs [2][3] that removed
IInputMethodManager.addClient() though.

This CL aims to preserve the current observable behavior (e.g. when
InputMethodManager instance is being created) as much as possible.
Most likely there would be no observable behavior difference when seen
from other components.

 [1]: I444077b1e4af4033f67ab72c181fac85b601e08a
      41f89c3bcc
 [2]: I453200fd5847e9a78876affb6a1caec221525e1d
      e24ed79edb
 [3]: Id91dd600120e4981aa1d9005ce644728968430c9
      fffc0e53c6

Fix: 115993358
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I7726c70613ea72d6e78fa5754e9fc840f0a40f11
2018-09-19 19:21:24 -07:00
TreeHugger Robot
971ad7aa5e Merge "Clarified FillCallback and SaveCallback behaviors." into pi-dev 2018-09-20 02:12:57 +00:00
Yohei Yukawa
35887743a7 Always use Context.getSystemService() to get IMM in SysUI
This is a mechanical refactoring, which should have no observable
behavior difference at this moment.

We need this refactoring because InputMethodManager#getInstance() does
not work well on multi-display scenarios.

Bug: 115891476
Test: Manually made sure that IME still works on inline-reply
Change-Id: I266c17187c7faab4d436e19a4db7595cab4244ac
2018-09-19 19:12:02 -07:00
John Reck
4b2de2ff17 Merge "Don't run comparisons on non-jank frames" am: 903dad812e am: 4007dd103f
am: 21013eebd7

Change-Id: Idf00d170ac8f1ab7a9c378c281b02ab5aa767ee1
2018-09-19 18:44:23 -07:00
John Reck
21013eebd7 Merge "Don't run comparisons on non-jank frames" am: 903dad812e
am: 4007dd103f

Change-Id: I175e245bd2ced35505a2295f4037c6d9c932f056
2018-09-19 18:34:59 -07:00
John Reck
4007dd103f Merge "Don't run comparisons on non-jank frames"
am: 903dad812e

Change-Id: I7cbca9acb9f14149868f18af8970d5324d51e260
2018-09-19 18:21:47 -07:00
Android Build Merger (Role)
e1a451833a Merge "Merge "Added mapping files for DualShock3 and DualShock4" am: 85aadab7e4 am: d050a2edd6 am: 1f6af2e769" 2018-09-20 01:05:33 +00:00
Kim Low
819e7528ee Merge "Added mapping files for DualShock3 and DualShock4" am: 85aadab7e4 am: d050a2edd6
am: 1f6af2e769

Change-Id: I239e8e9aff10e7472fb841261df7e23466202dd2
2018-09-19 18:05:08 -07:00
Yuzhou Jia
35339498ef Merge "Make Changes to VoiceInteraction API for supporting System checking an assistant voice action availability on AAE." 2018-09-20 01:02:44 +00:00
Tadashi G. Takaoka
c4fa3f953a Fix FlakyTest filter in wm/TEST_MAPPING
This is a follow up of I2d9641c68148

Bug: 113800711
Test: tradefed.sh run commandAndExit FrameworksServicesTests \
        --include-filter com.android.server.wm \
        --include-annotation android.platform.test.annotations.Presubmit \
        --exclude-annotation androidx.test.filters.FlakyTest

Change-Id: I7fa4d2cb70594431574d44d886352a2e81d8e51e
2018-09-20 09:55:21 +09:00
Patrick Baumann
9448724cc2 Use String.equals when comparing conflicting providers
Prior to this change, we were comparing the package name of the
conflicting component with the soon-to-be installed
PackageParser.Package package name using object equality, as used
elsewhere in packagemanager components. However, ComponentName.mPackage
does not use an interned string for performance reasons, so we need to
use .equals here.

Change-Id: Ibfed7cd47f18d06b2f65c6d8f6c46b752859375c
Fixes: 115956948
Bug: 109941548
Test: run pts -m PtsTimeZoneTestCases passes
2018-09-19 17:44:13 -07:00
Kim Low
1f6af2e769 Merge "Added mapping files for DualShock3 and DualShock4" am: 85aadab7e4
am: d050a2edd6

Change-Id: I163dc6181aa4ac075950cd579486e778cf346306
2018-09-19 17:44:12 -07:00
Treehugger Robot
7bd18423f6 Merge "Set InputMethoMananger#mCurRootView to null when window dismissed" 2018-09-20 00:35:25 +00:00
TreeHugger Robot
3e9b743715 Merge "Update Quickstep Onboarding tips to use theme color so that it works in both light and dark theme." 2018-09-20 00:35:18 +00:00
Benedict Wong
52aafaf3b2 Merge "Re-enable checks for MANAGE_IPSEC_TUNNELS" am: 69c973b33f am: a6bf6271e2
am: 44006f3d58

Change-Id: Ifa46c8e45f307d924c2ea589345957736dee0db0
2018-09-19 17:33:21 -07:00
daqi
dff365ef4d Set InputMethoMananger#mCurRootView to null when window dismissed
InputMethodManager#sInstance is a long live static object so we have to
set its field with right value, otherwise any object referenced by it
cannot be gc including potential activity context.

Now InputMethodManager#mCurRootView is set to null in
InputMethodManager#onPreWindowFocus which is invoked when app's
ViewRootImpl received ViewRootImpl#W#windowfocusChanged from WMS.
However, in the ViewRootImpl#W#windowfocusChanged, mViewAncestor is a
weak reference which get() may returns null sometimes.
One scenario is the ViewRootImpl#W#windowfocusChanged is called after
ActivityThread#handleDestroyActivity. The activity is destroyed and its
ViewRootImpl get GC'd. Then InputMethodManager#onPreWindowFocus won't
get called and InputMethodManager#mCurRootView won't be set to null.

And it is a proper time to set InputMethodManager#mCurRootView to null
when the window it served dismissed.

Fix: 116078227
Test: Break at ActivityThread#handleDestroyActivity and ViewRootImpl#W#windowfocusChanged

Change-Id: I8fabb30f14bcb2cd7019e29b6642b4562d49d248
Signed-off-by: daqi <daqi@xiaomi.com>
2018-09-20 08:30:40 +08:00
Kim Low
d050a2edd6 Merge "Added mapping files for DualShock3 and DualShock4"
am: 85aadab7e4

Change-Id: Ia33ab72411fc640f9a0f49f2e258ddab820bd4e7
2018-09-19 17:27:51 -07:00
Benedict Wong
44006f3d58 Merge "Re-enable checks for MANAGE_IPSEC_TUNNELS" am: 69c973b33f
am: a6bf6271e2

Change-Id: I6f6e3d2a43172459ef5bc88b6fc3d3fbbfd04a2f
2018-09-19 17:23:54 -07:00
TreeHugger Robot
b6ffc07e06 Merge "Remove the dependency on IInputMethodClient from IME focus check" 2018-09-20 00:19:35 +00:00
Benedict Wong
a6bf6271e2 Merge "Re-enable checks for MANAGE_IPSEC_TUNNELS"
am: 69c973b33f

Change-Id: I071f4f1c797d03776d1dd38f5734c6d07e2cecc7
2018-09-19 17:10:42 -07:00
Treehugger Robot
903dad812e Merge "Don't run comparisons on non-jank frames" 2018-09-19 23:28:55 +00:00
Tracy Zhou
8b4bb8664e Update Quickstep Onboarding tips to use theme color so that it works in both light and dark theme.
Test: manual
Change-Id: I027887fe853d41be689431f0e893e661b9a0c6e5
Fixes:115928014
2018-09-19 23:13:48 +00:00
Makoto Onuki
04f7af70f3 Merge "AMS.removeContentProviderExternal() should take a user-id" 2018-09-19 23:11:31 +00:00