Commit Graph

11968 Commits

Author SHA1 Message Date
Rob Carr
c9fd5fc46b Merge changes from topic "sf-remove-remove-layer"
* changes:
  SurfaceFlinger: Remove removeLayer
  Fix memory leak in SurfaceControl#copyFrom
2019-01-09 21:23:15 +00:00
Adam He
58611544cd Merge "Added null checks for NPE on mSystemServerInterface" 2019-01-09 18:40:01 +00:00
Jorim Jaggi
64e9cd30b3 Merge changes from topic "inset_dispatch"
* changes:
  A brave new world for window insets (10/n)
  A brave new world for window insets (9/n)
  A brave new world for window insets (8/n)
2019-01-09 14:17:35 +00:00
Tony Mak
afd5467420 Use isLoggable so that we can enable full logging easily
Also, change to use android.util.Log rather than Slog, which should
be used by system service only.

Test: Try out adb shell setprop log.tag.androidtc and observe verbose
      logging.

Change-Id: Ie86c6b3f8bd39957f041ffe3a10abb7584f96f83
2019-01-09 10:47:36 +00:00
TreeHugger Robot
8c4d24f07e Merge changes I16a302b5,I33f2ce58
* changes:
  Migrate frameworks/base/apct-tests/perftests/core to androidx.test
  Introduce TextClassifierEventTronLogger
2019-01-09 01:24:18 +00:00
TreeHugger Robot
30bbaa3613 Merge "Moved AutofillManager.SyncResultReceiver to an internal utility package" 2019-01-08 22:38:26 +00:00
Adam He
6884fed092 Added null checks for NPE on mSystemServerInterface
Bug: 119254124
Change-Id: Iebec84b414b2e156b9cdada05d66bfeb7f6caf05
Test: atest CtsContentCaptureServiceTestCases
2019-01-08 13:24:47 -08:00
Phil Weaver
c41c91aa67 Merge "Update javadoc for accessibility announcements" 2019-01-08 21:10:00 +00:00
Adam He
435736d3c5 Merge changes from topics "nested_sessions", "fix_flush_sessions"
* changes:
  Implemented nested Content Capture sessions.
  Fixed how session created / removed events are generated.
2019-01-08 20:57:58 +00:00
Felipe Leme
c0c15a3f90 Moved AutofillManager.SyncResultReceiver to an internal utility package
Bug: 121047489
Test: atest CtsAutoFillServiceTestCases # which is crashing due to unrelated issue

Change-Id: I4aba260e9878b1b420dfb7290f2389199c32a82f
2019-01-08 11:18:05 -08:00
Jorim Jaggi
15637fddc3 A brave new world for window insets (10/n)
Rework how dispatching works for apps targeting Q+

(flagged off at the moment behind VRI.USE_NEW_INSETS)

We properly dispatch windows in the hierarchy by fixing the issue
that insets modified by onApplyWindowInsets affected all other
views later in prefix order, including siblings and siblings of
parents.

Furthermore, we get rid of stopping dispatch if they are consumed,
as it gets a lot more complicated with the granular information we
add what consumed actually means.

Test: ViewGroupTest, ViewTest
Bug: 118118435

Change-Id: I9dfb69ebb93b334bb34d17889282293bec94e1af
2019-01-08 17:24:17 +01:00
Jorim Jaggi
bcf99fff73 A brave new world for window insets (9/n)
Implement WindowInsets.get(Max)Insets(int typeMask) to allow the
developer to query the inset by inset type.

Also rework InsetsState.calculateInsets to actually construct the
WindowInsets instance that contains this information.

Test: InsetStateTests
Bug: 118118435
Change-Id: Ie316e074c020bdb9808c11608812dea572c8de5d
2019-01-08 17:24:16 +01:00
Jorim Jaggi
297985ab9d A brave new world for window insets (8/n)
WindowInsets now keeps track of all insets per type. Insets are
non-additive, i.e. every inset starts out relative to the window
edge, so the IME inset would include the navigation bar inset, but
not vice-versa.

We remove decorWindowInsets because it wasn't used at all.

For compatibility, we map the constructor where we pass in a Rect
to TOP_BAR. This is fine as every query to systemWindowInsets
stableInsets will include this type, so we don't need the
information where it came from.

Test: WindowInsetTest
Bug: 118118435
Change-Id: I1cb37d328060293f9a876e61d4a09e6675fa7197
2019-01-08 17:24:08 +01:00
Tony Mak
5a5f0d52c3 Introduce TextClassifierEventTronLogger
1. SelectionEvent will be still logged via SelectionSessionLogger
   to make sure we don't break existing logs.

2. New features including language detection and conversation actions
   are logged via TextClassifierEventTronLogger.

3. Added TYPE_ACTIONS_GENERATED to log when actions are generated.
   This is used to calcuate the recall, i.e. among all the requests,
   how many of them TextClassifier returns something.

Test: atest TextClassifierEventTronLoggerTest
Test: Turn on the DEBUG flag and observe the logging.

BUG: 120803809
BUG: 120828422

Change-Id: I33f2ce58885d90bc35316f54abcd42b137b42a13
2019-01-08 11:07:23 +00:00
Robert Carr
8810b69fc4 SurfaceFlinger: Remove removeLayer
We remove explicit layer destruction and replace it
with reparent->null, completing the transition to
a reference counted model.

Test: Manual
Bug: 62536731
Bug: 111373437
Bug: 111297488
Change-Id: I6be5ae01218e566deb713ed9079b36e1135ff2ec
2019-01-07 18:36:36 -08:00
Robert Carr
eb344c7a35 Fix memory leak in SurfaceControl#copyFrom
Not leaking in practice but if it were used on an already initialized
SurfaceControl Java Wrapper it would leak the old native object by
failing to cal dec strong.

Bug: 111373437
Test: Boots
Change-Id: Ie8f59788630bc2ba05bbdcbbefed4124a4032170
2019-01-07 18:36:36 -08:00
Phil Weaver
e105cc2938 Update javadoc for accessibility announcements
Trying to make it less appealing for developers to force
announcements.

Test: make
Change-Id: I95087c2f068ed5b6c36e4bff6a66bb6c48910f9c
2019-01-07 17:07:20 -08:00
Rob Carr
30e984ca78 Merge changes from topic "remove-scoped-connection"
* changes:
  Remove usage of scoped connections.
  Allow SurfaceControl to be passed over AIDL.
2019-01-07 20:08:58 +00:00
Felipe Leme
4bc0f6be78 Implemented nested Content Capture sessions.
Test: atest CtsContentCaptureServiceTestCases
Fixes: 121033016

Change-Id: I46bbd05c363cbda8b66704203455411d38c6a025
2019-01-07 10:19:39 -08:00
Manpreet
18ebaa979c Merge "Null locale causing the VTS fail." am: 179f30a443 am: 9568191633
am: e9fe937245

Change-Id: I715e3b8126e1506c9d02f0be278fb8baad396018
2019-01-06 20:53:29 -08:00
Manpreet
e9fe937245 Merge "Null locale causing the VTS fail." am: 179f30a443
am: 9568191633

Change-Id: Iab284dfc831a9079e339c8c23fba8f3e7e4ec04d
2019-01-06 20:44:13 -08:00
Manpreet
9568191633 Merge "Null locale causing the VTS fail."
am: 179f30a443

Change-Id: I8ae92392e70c046194df1c8ebee0bd32ed9513cf
2019-01-06 20:30:46 -08:00
Treehugger Robot
179f30a443 Merge "Null locale causing the VTS fail." 2019-01-07 04:19:22 +00:00
Felipe Leme
e127c9a47e Fixed how session created / removed events are generated.
Long-story short, they must be flushed right away...

Test: atest CtsContentCaptureServiceTestCases
Bug: 121033016

Change-Id: I1b3132ad49674d43bf63717f79848b6e4b23b605
2019-01-04 17:54:52 -08:00
Eric Holk
7751e68a1b Merge "Add tryCreateView to LayoutInflater" am: aa8f1b7033 am: 07b293f8af
am: 9b9c255b88

Change-Id: I26f0e3d18e8a27bd9fb7745f3a7af4ca347237fe
2019-01-04 17:40:54 -08:00
Eric Holk
9b9c255b88 Merge "Add tryCreateView to LayoutInflater" am: aa8f1b7033
am: 07b293f8af

Change-Id: Ia835f7a7488a084c72fd5722c91d01ddb427ea19
2019-01-04 17:27:45 -08:00
Eric Holk
07b293f8af Merge "Add tryCreateView to LayoutInflater"
am: aa8f1b7033

Change-Id: Ib89a1d1b292aca7404d646ff61974558422fc959
2019-01-04 17:17:28 -08:00
Jorim Jaggi
bc93e0f537 Merge "A brave new world for window insets (7/n)" 2019-01-04 23:21:24 +00:00
Eric Holk
29d0cd6fa1 Add tryCreateView to LayoutInflater
This method is needed so that precompiled layouts can reuse the factory logic
from the LayoutInflater.

Bug: 111895153
Test: atest android.view.cts.LayoutInflaterTest
Change-Id: Ifd1028906b655af2bd14247d586dc16b35550c82
2019-01-04 12:57:14 -08:00
Robert Carr
5fea55b2d2 Remove usage of scoped connections.
Tracking SurfaceFlinger changes. Now to construct a child surface
we need the SurfaceControl as opposed to just the surface, and so
we parcel the SurfaceControl across relayout.

Test: Manual
Bug: 62536731
Bug: 111373437
Bug: 111297488
Change-Id: I0a034767e92becec63071d7b1e3e71b95d505b77
2019-01-04 10:08:56 -08:00
Jorim Jaggi
cfd6f3b407 A brave new world for window insets (7/n)
Ensure that the client visibility state affects other subsystems,
like accessibility as well as input.

Test: WindowStateTest
Bug: 118118435
Change-Id: I8a50a0b82dc76e578861967197350eaa3867f837
2019-01-04 17:30:23 +01:00
Felipe Leme
af1a0e7543 Cosmetic ContentCapture fixes.
Test: atest CtsContentCaptureServiceTestCases
Bug: 121033016
Change-Id: Ibe82fa15660a268d6fec91374c6899dd9e3b4d8d
2019-01-03 18:02:34 -08:00
TreeHugger Robot
358acd5854 Merge "Ignore ContentCapture events after the activity stopped." 2019-01-04 00:35:37 +00:00
TreeHugger Robot
ee00fea76b Merge "Fix drag and drop (1/3)" 2019-01-04 00:11:26 +00:00
Felipe Leme
bef744c48c Ignore ContentCapture events after the activity stopped.
Test: atest CtsContentCaptureServiceTestCases
Bug: 121033016

Change-Id: I016f13748287f77b7c5f0ceb12a5af1bb2b555ea
2019-01-03 13:02:02 -08:00
chaviw
beb7a0cf50 Allow SurfaceControl to be passed over AIDL.
Test: Manual
Bug: 62536731
Bug: 111373437
Bug: 111297488
Change-Id: I52d9d314f1997560bc5498a1501827868db8b807
2019-01-03 10:50:39 -08:00
Adam He
f15c481604 Merge "Moved buffer for VIEW_TEXT_CHANGED events to MainContentCaptureSession." 2019-01-03 17:16:12 +00:00
Adam He
ac13265ed1 Moved buffer for VIEW_TEXT_CHANGED events to MainContentCaptureSession.
Bug: 121042846
Test: atest android.contentcaptureservice.cts.LoginActivityTest#testTextChangeBuffer
Test: atest CtsContentCaptureServiceTestCases
Change-Id: Ia0128c1c868d44da954e67b38dfb2bde6461b883
2019-01-02 14:44:03 -08:00
Eric Holk
d1a002605f Merge "[LayoutInflater] Cleanup - remove some nesting" am: 3a0fe2cdab am: a261d6e664
am: 6abf873683

Change-Id: I5b89a07c28f2d38af94a80137fd9a97d72b09091
2019-01-02 14:41:25 -08:00
Eric Holk
6abf873683 Merge "[LayoutInflater] Cleanup - remove some nesting" am: 3a0fe2cdab
am: a261d6e664

Change-Id: I8f6bb61ffc085ff224f631c916e19e05216faeed
2019-01-02 14:31:25 -08:00
Eric Holk
a261d6e664 Merge "[LayoutInflater] Cleanup - remove some nesting"
am: 3a0fe2cdab

Change-Id: I5f44de5983793c1a8e089977934d48bf032d0686
2019-01-02 14:13:34 -08:00
Eric Holk
bfc687007c [LayoutInflater] Cleanup - remove some nesting
The parseInclude method had some deep nesting that could be improved by
rearranging things a little.

Test: atest android.view.cts.LayoutInflaterTest
Change-Id: I2ee13c2ee80bcb220371d39a5a6da6044cfa245c
2019-01-02 11:11:24 -08:00
Mathew Inwood
8501ae1763 Merge "Limit access to suspected false positives." am: aeda49d185
am: 152d5a5dcd

Change-Id: I8e10322e69d2d479079df5cf8fec0287c7c117f1
2019-01-02 05:00:54 -08:00
Mathew Inwood
152d5a5dcd Merge "Limit access to suspected false positives."
am: aeda49d185

Change-Id: Ib24456aaad850d5aee46dd242513840511942536
2019-01-02 04:48:33 -08:00
Mathew Inwood
55418eada5 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0
Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 14:26:35 +00:00
Mathew Inwood
18e35038be Merge "Limit access to suspected false positives." 2018-12-28 14:23:00 +00:00
Jorim Jaggi
e24ac5a8eb Merge "A brave new world for window insets (6/n)" 2018-12-28 13:58:36 +00:00
Mathew Inwood
31755f94e1 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 11:50:04 +00:00
TreeHugger Robot
2555a5d46f Merge "Fixes NotificationHeaderView layout." 2018-12-27 22:37:42 +00:00
Yohei Yukawa
0c1ebffdb3 Deprecate null IME token rule in IMM#setInputMethod()
With my previous CL [1], InputMethodManagerService#setInputMethod() is
now guaranteed to be called only from IInputMethodManager and
IInputMethodPrivilegedOperations as 'adb shell ime set' no longer
directly calls this method (with null IME token).

With this CL, IInputMethodManager#setInputMethod(), which has been
kept just for null IME token rule, is finally gone. This is achieved
by letting InputMethodManager#setInputMethod() directly update
DEFAULT_INPUT_METHOD (and SELECTED_INPUT_METHOD_SUBTYPE) secure
settings if a priviledged component still relies on this undocumented
null IME token rule.

 [1]: I6fd47b5cc1e7da7222774df20247a2c69a70f45b
      db25df71be

Fix: 114488811
Test: atest CtsInputMethodServiceHostTestCases
Change-Id: I42dd0325b01c527009bf85566ca8ba0766b2294e
2018-12-27 14:06:28 -08:00