Commit Graph

12490 Commits

Author SHA1 Message Date
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
TreeHugger Robot
b266f38ebf Merge "Fix missing @NonNull or @Nullable to TextClassifier APIs" 2019-03-07 21:14:37 +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
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
Tony Mak
fc374578b7 Migrate to DeviceConfig in TextClassifier
ConfigParser is introduced to read the flags from DeviceConfig.
If the flag is missing, fallback to Settings.

Also, adds a new setting key: TEXT_CLASSIFIER_ACTION_MODEL_PARAMS

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/
Test: adb shell cmd device_config put textclassifier system_textclassifier_enabled  false
      adb shell dumpsys textclassification, observed that the flag is updated.

BUG: 123389900
Change-Id: Icbd26ec7ed223e40b60696d12327cb123b96c4fd
2019-03-05 14:57:53 +00:00
TreeHugger Robot
5c73d2a82d Merge "Refactoring and some fixes around TextClassifierService" 2019-03-05 12:20:38 +00:00
TreeHugger Robot
f57f492b2c Merge "Add some test mappings" 2019-03-05 02:04:37 +00:00
Adam He
8059ab819c Merge "Minor changes on LocusId APIs." 2019-03-05 01:30:07 +00:00
Adam He
6240eab185 Implemented a WhitelistHelper for whitelisting packages/activities for Augmented Autofill and Content Capture.
Fixes: 125348180
Test: atest android.contentcaptureservice.cts.LoginActivityTest
Test: atest android.autofillservice.cts.augmented.AugmentedLoginActivityTest
Test: atest FrameworksCoreTests:com.android.internal.infra.WhitelistHelperTest
Change-Id: I59c32d5a05c9c1ee813395545507fc8eaee47745
2019-03-04 16:15:32 -08:00
John Reck
70ddefc673 Add some test mappings
Test: none
Change-Id: If8b5b51f28669416bcd15ee9df851a263f838802
2019-03-04 15:55:22 -08:00
Felipe Leme
7e7357515f Minor changes on LocusId APIs.
- Uses a String instead of URI for the main id.
- Uses FLAG_IS_PREFIX instead of isRecursive for UserDataRemovalRequest.

Test: m update-api
Test: atest CtsContentCaptureServiceTestCases CtsContentTestCases:LocusIdTest \
            FrameworksCoreTests:android.view.contentcapture.ContentCaptureEventTest
Bug: 126945732

Change-Id: I34ae42678aa4021ea53ed66279cad4049ac2dcb3
2019-03-04 14:02:37 -08:00
Ashley Rose
de3b4a78cd Add @InspectableProperty annotations to LayoutParams
Change-Id: I69eb71bec8bbf36564e178a3ddf4be9e00e2d531
Fix: 126913705
Test: m framework
2019-03-04 16:46:15 -05:00
Peiyong Lin
f4f0f6424b Add setColorSpaceAgnostic API to SurfaceControl.
Some layers, for example ScreenDecorOverlay*, only carry black, white or gray
with some transpanrency, these values are special as they are color space
agnostic. We don't need to do color conversion on them, instead we want to
intercept the color space before we send to hardware composer for validation.
This patch adds an API to allow this to happen, layers that can be considered
color space agnostic can call this API.

BUG: 126616348
Test: Build, flash and boot. Verify by calling in Letterbox.
Change-Id: I2e1384865bbae6c1bca5ab55962af6a4d529d81d
2019-03-04 12:30:46 -08:00
TreeHugger Robot
b5766bd50a Merge "Support for @InspectableProperty on public fields" 2019-03-04 18:49:35 +00:00
Adrian Roos
dd49eb7349 WindowInsets: Add system gesture insets
Bug: 126511573
Test: atest android.view.cts.WindowInsetsTest
Change-Id: I085a20cb49f37d272b882535a97aacd40168281f
2019-03-04 16:01:35 +00:00
lumark
ec75b42179 Add the check for UID presence to Display#hasAccess()
It would be nice if there is a common & reliable method for both outer
& internal modules to check the UID presense of the display.

Add more check in Display#hasAccess() to ask system if calling UID can
precense on the specific display, to consolidate only few special UIDs
& display flag checking.

Bug: 117347985
Test: atest ActivityManagerMultiDisplayTests
Change-Id: I2f8989598c99c0962e925c5aa65500972b4fc62b
2019-03-04 14:59:41 +08:00
Ashley Rose
89d6bce3af Support for @InspectableProperty on public fields
+ Add a field target to @InspectableProperty
+ Refactor PlatformInspectableProcessor to process annotated fields and
  generate InspectionCompanions that read fields.
+ Require that all inspectable getters and fields be public.
+ Make some hidden getters added to View for inspection public.

Test: atest --host view-inspector-annotation-processor-tests
Bug: 126913705
Change-Id: I0c012f42794885f17a397a2e3dd541b3aa4c2634
2019-03-01 19:31:01 -05:00
John Reck
1e2455e13f Merge "More targetted drawFinished fix" 2019-03-01 22:54:25 +00:00
Andrii Kulian
ddecd74c63 Merge changes from topic "wm_decor_status"
* changes:
  Notify the WMS when the display content is ready.
  Read system decor support status from WM
2019-03-01 22:50:28 +00:00
Qasid Sadiq
77f18a962e Merge "Make mIdsToViews thread safe." 2019-03-01 21:52:03 +00:00
John Reck
8cc1f69193 More targetted drawFinished fix
Prior to fe5dfca the frameCompleteCallback
was posted to the native Looper, which is
effectively a postAtFrontOfQueue. Since it
was switched to the Java-side looper, do
an explicit postAtFrontOfQueue

Fixes: 124801988
Test: speculative
Change-Id: I287c9f3917983503402dcfe3ee7d494eefae8d1f
2019-03-01 09:09:34 -08:00
Jeff Sharkey
a09312df67 Merge "All Parcelable CREATOR fields are @NonNull." 2019-03-01 14:58:28 +00:00
Issei Suzuki
ea5e754c37 Merge "Add comment to clarify use case of the new constructors." 2019-03-01 11:02:05 +00:00
TreeHugger Robot
023183101c Merge "Add null checks for attribute getters in View." 2019-03-01 06:35:17 +00:00
Jeff Sharkey
9e8f83db6d All Parcelable CREATOR fields are @NonNull.
If they were null, then the Parcelable would fail to work.

Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
2019-02-28 23:29:04 -07:00
Qasid Sadiq
3d8f117bfc Merge "Revert "Revert "Fix a11y cache correctness bug""" 2019-03-01 02:25:26 +00:00
Felipe Leme
50a8c75b49 Merge "Autofill, Content Capture, and Augmented Autofill API fixes:" 2019-03-01 02:04:30 +00:00