Commit Graph

12513 Commits

Author SHA1 Message Date
Andrey Kulikov
9abbd1eb2f Merge "Improve javadocs for ViewGroup.getChildDrawingOrder" 2019-03-13 14:31:23 +00:00
Andrey Kulikov
ea23c429a1 Merge "Introduce View.getAnimationMatrix()" 2019-03-13 14:30:26 +00:00
Michael Wright
a8b13fdf17 Merge "Moved brightness from Lights to SF." 2019-03-12 21:16:25 +00:00
Andrey Kulikov
85c706a54d Improve javadocs for ViewGroup.getChildDrawingOrder
The explanation with "iteration" was difficult to understand. Rephrased with the use of "drawing order position".

Bug: 128029546
Test: N/A
Change-Id: I7c93750ea3f85a5f053b3079ade78869894945c3
2019-03-12 14:56:19 +00:00
TreeHugger Robot
d6cc8426f4 Merge "Switch to a better model file if any" 2019-03-12 14:55:55 +00:00
Andrey Kulikov
c15c9ca54c Introduce View.getAnimationMatrix()
Adding a corresponding getter for the recently opened View.setAnimationMatrix(Matrix).

Bug: 126376184
Test: new cts tests added
Change-Id: I9d5abb1ae3606d2e3884859ce9a81c11c65613d6
2019-03-12 14:53:06 +00:00
TreeHugger Robot
0887b3d7e6 Merge "Deduplicate actions by their look" 2019-03-12 14:31:26 +00:00
Tony Mak
c12035eb32 Deduplicate actions by their look
1. Deduplicate actions by their look. Ideally, we should compare
   their labels and icons, but comparing icon is expensive and thus
    we are comparing title + component name instead.

2. Put intent to extras in ConversationAction object

3. Updated LabeledIntent.resolve, so we only support activity intent
   handler.

4. Fixed a minor issue in the browser title chooser.
   If it is resolves to sharesheet / chooser, we will still show the URL.

BUG: 121200744
Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/

Change-Id: Ic7ea31eb0ac5e9386e8e4b428686a0b66726c96b
2019-03-12 12:25:22 +00:00
Hyundo Moon
ec6bf88434 Merge "Revert Media 1.0 API changes introduced for making 1.0 updatable" 2019-03-12 04:06:32 +00:00
TreeHugger Robot
fb462f00b4 Merge "WindowInsets: Properly initialize systemGestureInsets" 2019-03-12 02:03:26 +00:00
TreeHugger Robot
2eeb3ac897 Merge "SurfaceControl, Surface: Add nullability annotations." 2019-03-12 01:49:56 +00:00
Ashley Rose
0a6dc75371 Merge "InspectionCompanions as nested classes" 2019-03-11 22:12:53 +00:00
Robert Carr
da1d242ce8 SurfaceControl, Surface: Add nullability annotations.
In response to API Feedback.

Test: Builds
Bug: 126700125
Bug: 126360307
Change-Id: I17a14fd0d1b527ee38f68935cddee73fb4d10195
2019-03-11 15:09:42 -07:00
TreeHugger Robot
6b6f5b6df1 Merge "Fix Annotations" 2019-03-11 20:04:08 +00:00
Clara Bayarri
596a6edd0f Fix Annotations
API Council feedback

Bug: 126700367
Bug: 121324653
Test: none
Change-Id: I8263f60a0fa75a6261d174d33de20c675a2a608e
2019-03-11 14:10:44 +00:00
Tony Mak
8e380a596c Remove conversation id in ConversationActions
Test: atest cts/./tests/tests/view/src/android/view/textclassifier/cts/ConversationActionsTest.java

BUG: 126434304

Change-Id: I618adaf22a2b897aaaf6600b310ddec581f2aec7
2019-03-11 12:03:56 +00:00
Hyundo Moon
c3ce09eef7 Revert Media 1.0 API changes introduced for making 1.0 updatable
This CL reverts API changes which were introduced by below CLs:
 - "761c475: AML: Make config_mediaMetadataBitmapMaxSize as @SystemApi"
 - "888b791: Make AudioManager.FLAG_FROM_KEY as @SystemApi"
 - "3d1353a: AML: Unhide KeyEvent.isMediaSessionKey()"

Bug: 128245348
Test: atest CtsMediaTestCases:android.media.cts.MediaSessionTest;
      atest CtsMediaTestCases:android.media.cts.MediaControllerTest;
      atest CtsMediaTestCases:android.media.cts.MediaBrowserTest;
Change-Id: I263a958bf340336f699adb28424241fd00e46e28
2019-03-11 20:19:09 +09:00
Ashley Rose
fdb5af22aa InspectionCompanions as nested classes
+ Generate inspection companions as MyClass$InspectionCompanion instead
  of MyClass$$InspectionCompanion. This allows the discovery of custom
  inspection companions written as nested classes.
+ Rename GeneratedInspectionCompanionProvider to
  StaticInspectionCompanionProvider to more clearly articulate how it
  function in the new world.
+ StaticInspectionCompanionProvider now explicitly checks if a class it
  discovered implements InspectionCompanion, and returns null instead of
  throwing a ClassCastException.
+ The annotation processor checks for the existence of a nested class
  named InspectionCompanion, and fails the build if a class has both a
  custom InspectionCompanion and @InspectableProperty annotations.

Test: atest --host view-inspector-annotation-processor-test
Bug: 126913705
Change-Id: Ic0d2100ec22420e36f9db44e56c66fe9146eeb0c
2019-03-08 18:27:51 -05:00
Aurimas Liutikas
908309feb5 Merge "Clean up attribute apis based on api council feedback." 2019-03-08 22:02:17 +00:00
Dan Gittik
832b497ab7 Moved brightness from Lights to SF.
Test: manual.
      Check that brightness works.
Fixes: 111435292

Change-Id: I9351fcc69b3cc217e5eeb7bc3f813a41ba9dc547
2019-03-08 13:36:49 +00:00
Stanislav Zholnin
0b69c75a7c Merge "Use updated DeviceConfig API's new getters to simplify invocations." 2019-03-08 10:19:06 +00:00
Jesse Evans
edd9d59562 Merge "Ensure hierarchy is measured on applying insets" 2019-03-08 01:17:44 +00:00
Aurimas Liutikas
f9dbd5fed6 Clean up attribute apis based on api council feedback.
Bug: 127714248
Test: None
Change-Id: I40596a88e7e446c6a25f2b9074bb88a0a417ed63
2019-03-07 14:23:59 -08:00
TreeHugger Robot
b266f38ebf Merge "Fix missing @NonNull or @Nullable to TextClassifier APIs" 2019-03-07 21:14:37 +00:00
Tony Mak
6fc4318b6b Switch to a better model file if any
The logic is already in annotator, just applies the same logic in
langid and actions.

Test: Change locale to non-english. Observe no more suggestion
      on notification.

FIXES: 122912634

Change-Id: Icf80a1e3edf04db1947fe98c598ecfca3ed6139f
2019-03-07 20:33:53 +00:00
Ashley Rose
40e490e275 Merge "Add @IdRes annotations to View properties" 2019-03-07 19:46:25 +00:00
TreeHugger Robot
a936b91ae9 Merge "Removed some deprecated APIs that use List instead of Set." 2019-03-07 18:41:42 +00:00
Adam He
5f0b120f07 Merge "View gets View_importantForContentCapture from attributes." 2019-03-07 18:36:44 +00:00
Stanislav Zholnin
a534368e75 Use updated DeviceConfig API's new getters to simplify invocations.
Test: manual verification
Change-Id: I213f25c9b16d7988617bcf127461a9097a8e16b3
2019-03-07 16:49:37 +00:00
TreeHugger Robot
e2060f2cd3 Merge "Start throwing better exceptions in LayoutInflater." 2019-03-07 16:26:49 +00:00
TreeHugger Robot
94904dcb12 Merge "Fix ArrayIndexOutOfBoundsException in A11yCache" 2019-03-07 15:06:29 +00:00
Beth Thibodeau
ff0e66270b Merge "Fix position of expand/collapse button" 2019-03-07 15:06:11 +00:00
Rhed Jao
fe89325864 Fix ArrayIndexOutOfBoundsException in A11yCache
Bug: 127761516
Test: atest MediaStoreUiTest#testGetDocumentUri
Change-Id: I55824d4932bc7c430ac7f357237b444bedc71b58
2019-03-07 19:24:34 +08:00
Aurimas Liutikas
10c4216245 Start throwing better exceptions in LayoutInflater.
Include source layout file in exceptions thrown from
LayoutInflater. This makes it easier to trace failures
when using <include ...> tags.

You'll get something like
Caused by: android.view.InflateException: Binary XML file line #11 in com.myapp:layout/activity_main: Binary XML file line #6 in com.myapp:layout/overlay: Error inflating class MyView
Caused by: android.view.InflateException: Binary XML file line #6 in com.myapp:layout/overlay: Error inflating class MyView
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.myapp.MyView"...

Bug: 127425845
Test: Manual app launch that has invalid XML
Change-Id: I262fa9625dd2981eb22e493e9e4a1d2b7b75ef4b
2019-03-06 17:46:14 -08:00
Jesse Evans
3e2462dbb4 Ensure hierarchy is measured on applying insets
Test: atest FrameworksUiServicesTests
Additional Test: Manually tested using repro APK
Bug: 123746448
Change-Id: I4af28ddd0684d1ba906bc976bb8f6b75cf5f29d6
2019-03-06 16:03:28 -08:00
Beth Thibodeau
837bfc2c51 Fix position of expand/collapse button
Example screenshots at https://drive.google.com/open?id=1rKBY9uj54KbeSr-M4Rd4aKG9FQQYL8qm

Bug: 124522176
Test: verified that button does not move between collapsed and expanded
layouts

Change-Id: Ic7cbe3b78aa439cec8f10b532b80f863bb6c283c
2019-03-06 17:30:11 -05:00
Ashley Rose
dbb949a560 Add @IdRes annotations to View properties
Change-Id: I6ef9f83b7cde3ee6f84951016b809a99c5ae281a
Fix: 127348933
Test: m framework
2019-03-06 14:55:54 -05:00
TreeHugger Robot
9a5663c787 Merge "Migrate to DeviceConfig in TextClassifier" 2019-03-06 19:51:53 +00:00
Felipe Leme
528e092b1f Removed some deprecated APIs that use List instead of Set.
Test: m update-api
Fixes: 124402439

Change-Id: Iba1bd6236ab49d3917db22512c18a929dd7b0773
2019-03-06 10:45:13 -08:00
Ashley Rose
0be2720c5b Merge "Add @InspectableProperty annotations to LayoutParams" 2019-03-06 18:38:18 +00:00
Adam He
682ea3ccfd Merge changes from topic "aa_whitelist"
* changes:
  Check for empty arguments in setWhitelist().
  Implemented a WhitelistHelper for whitelisting packages/activities for Augmented Autofill and Content Capture.
2019-03-06 18:31:59 +00:00
Adrian Roos
a5355867d2 WindowInsets: Properly initialize systemGestureInsets
Fixes: 127474513
Test: atest WindowInsetsTest
Change-Id: I57cc731d5e0e83651fbb18ed5a1e9f5222c52062
2019-03-06 17:19:21 +01:00
Peiyong Lin
95378b2cae Merge "[WindowManager] Add PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC." 2019-03-06 01:31:49 +00:00
TreeHugger Robot
380edb9e1e Merge "Resource ID support for view inspector" 2019-03-06 00:57:38 +00:00
Adam He
b5e7d8f523 View gets View_importantForContentCapture from attributes.
Fixes: 123697685
Test: atest android.contentcaptureservice.cts.LoginActivityTest#testSimpleLifecycle_defaultSession
Change-Id: I30993e4034bbcc9682397794a366fc574a7ad58b
2019-03-05 16:23:03 -08:00
Ashley Rose
e8914812c9 Resource ID support for view inspector
This allows for inspectors to do special handling on values known to be
resource IDs, such as converting them to a string format.

+ Add PropertyMapper#mapResourceId(String, int) and
  PropertyReader#readResourceId(int, int)
+ Add RESOURCE_ID to @InspectableProperty.ValueType
+ Add code generation support in the annotation processor, and value
  type inference for accessors annotated with a resource ID annotation
  like @AnyRes.

Bug: 127348933
Test: atest --host view-inspector-annotation-processor-test
Change-Id: I132aea319dcddf51c553057c036ce5609e3c381a
2019-03-05 17:16:14 -05:00
Peiyong Lin
88eb6a20b5 Merge "Add setColorSpaceAgnostic API to SurfaceControl." 2019-03-05 20:18:10 +00:00
Peiyong Lin
7504538985 [WindowManager] Add PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC.
Normally on a phone, there are a bunch of layers that can be considered color
space agnostic, for example NavigationBar and ScreenDecorOverlay*. Previously
we added a SurfaceControl API setColorSpaceAgnostic to allow a surface to tell
SurfaceFlinger it's color space agnostic, this patch adds a private flag in
window manager to allow views to set it via WindowManager.LayoutParams, window
manager will process this private flag and call setColorSpaceAgnostic when it's
changed.

BUG: 126616348
Test: Build, flash and boot. Use UIBench to check WCG behaviour
Change-Id: Iecee6528c86c390c70379bbc05b114c53d0cca48
2019-03-05 09:30:59 -08:00
Tony Mak
42ab984ab8 Fix missing @NonNull or @Nullable to TextClassifier APIs
FIX: 126703194
FIX: 126702907
FIX: 126701690
FIX: 126702936
FIX: 126702908
FIX: 126703116
FIX: 126700923
FIX: 126700363

Test: m update-api
Change-Id: I72add33844d4f7282c8bc178908ecc6cf1cb4a32
2019-03-05 15:45:36 +00:00
TreeHugger Robot
b21765f2f3 Merge "WindowInsets: Add system gesture insets" 2019-03-05 15:27:34 +00:00