Commit Graph

12626 Commits

Author SHA1 Message Date
Felipe Leme
5a5b6c38f5 Merge "Checks package name belongs to called UID on some content capture methods." 2019-03-29 14:52:02 +00:00
Tiger Huang
c2bd56a30a Merge "Reduce the window tap exclude region for child above it" 2019-03-29 09:53:06 +00:00
Felipe Leme
afbba9fb36 Checks package name belongs to called UID on some content capture methods.
Also refactored how the SecurityException is thrown back to the caller app.

Bug: 122959591
Test: manual verification
Test: atest CtsContentCaptureServiceTestCases # sanity check (minus usual flakiness)

Change-Id: I4d2a68e61dc1c801d80734a30f4bbe6fdae8555d
2019-03-28 19:31:52 -07:00
Felipe Leme
a8d33c24f8 Implemented ContentCaptureConditions APIs.
Test: atest ContentCaptureConditionTest \
       CustomViewActivityTest#testContentCaptureConditions \
       CustomViewActivityTest#testContentCaptureConditions_otherPackage
Test: atest CtsContentCaptureServiceTestCases # sanity check (minus usual flakiness)

Fixes: 129266058

Change-Id: I199c3ae99fa6b407da64562a71d8d7581ebf80e6
2019-03-28 18:48:31 -07:00
Felipe Leme
ae9f6953ad Merge "Refactored ContentCapture sessions to use an int id." 2019-03-29 00:55:13 +00:00
TreeHugger Robot
e2dc2d0bd0 Merge "Improved Content Capture and LocusId javadocs." 2019-03-28 21:24:08 +00:00
Felipe Leme
080542019a Refactored ContentCapture sessions to use an int id.
This is an internal change that will save memory:
- ids themselves are smaller (one int vs ~20 chars string)
- can be mapped with SparseArrays
- parcel objects will be smaller

Test: atest CtsContentCaptureServiceTestCases \
  FrameworksCoreTests:android.view.contentcapture.ContentCaptureEventTest \
  FrameworksCoreTests:android.view.contentcapture.ContentCaptureSessionTest

Fixes: 121197119

Change-Id: I4b4367bd7238400ade385c2bcc4b0595ed0b1c7b
2019-03-28 13:50:06 -07:00
Qasid Sadiq
46b5d13a54 Merge "Deprecate boundsInParent in favor of boundInScreen." 2019-03-28 19:55:43 +00:00
Tiger Huang
2b210c234c Reduce the window tap exclude region for child above it
For letting touches directly go to the embedded display, we've opened a
tap exclude region for the ActivityView. However, if there is a view on
top of the region, the view cannot be touched within the region.

In this CL, we reduce the tap exclude region if there is a can-receive-
pointer-event view on top of the region.

Bug: 128517544
Test: atest CtsActivityManagerDeviceTestCases:ActivityViewTest
Test: atest FrameworksCoreTests:ViewGroupTest
Test: Menual test with ActivityViewTest and Bubbles
Change-Id: I68e2a9fe9d0891801b533ab8d25074f64bef5a79
2019-03-28 16:53:20 +08:00
Qasid Ahmad Sadiq
31d0cedcc4 Deprecate boundsInParent in favor of boundInScreen.
If the service has boundsInScreen the boundsinparent can be computed.
Also for its whole existence, boundsInParent is the bounds within the
ViewParent's coordinates. But the ViewParent is quite often not the
AccessibilityParent (if it isn't important for accessibility), so the
service can't really do anything with that information because the
service doesn't have access to the ViewParent, only the
AccessibilityParent.

Test: It builds.
Bug: 1084662
Change-Id: If88dcaac6dcb824d72d7f483c05cbb544314423c
2019-03-27 23:52:05 +00:00
Felipe Leme
f0d44c6aa8 Improved Content Capture and LocusId javadocs.
Test: mmm frameworks/base/:doc-comment-check-docs # and checked resulting HTML

Fixes: 123577059
Fixes: 128427733
Fixes: 123954513

Change-Id: I955e99efa099cbb68477b394450fa468c85f352c
2019-03-27 13:42:24 -07:00
Felipe Leme
159cb007d4 Improved autofill logging on savable ids.
Bug: 127700872
Test: manual verification

Change-Id: Ia14152c53c3542f0e9ba9b701bb5281c3e403faf
2019-03-27 11:08:37 -07:00
Nader Jawad
40a43424ee Merge "Added framework APIs to leverage new BlendMode API" 2019-03-27 16:39:03 +00:00
Nader Jawad
dadf251a0d Added framework APIs to leverage new BlendMode API
Updated various framework APIs to leverage the new BlendMode API
that parallels the corresponding porterduff mode equivalent.

Added new Drawable#onApplyBlendMode API that provides a backward
compatible solution for Drawable implementations that leverage
the new BlendMode API as well as fall back on the traditional
setTintMode(PorterDuff.Mode) API for instances where it is not
implemented

Bug:126726419
Test: Re-ran CTS graphics test cases
Change-Id: I119a7f57dce0a095c0a73cf83dc50b82beff5e32
2019-03-26 16:44:10 -07:00
Felipe Leme
df1aa85444 Merge "Defined new APIs to whitelist content capture for specific URLs." 2019-03-26 16:01:10 +00:00
Leon Scroggins
75ca391bbe Merge "Clean up references to @ColorLong" 2019-03-26 12:45:45 +00:00
Jackal Guo
5e94ae17ae Merge "Stop recycling in AccessibilityCache" 2019-03-26 08:30:33 +00:00
Jackal Guo
a27e4b7b07 Stop recycling in AccessibilityCache
Explicitly allocate windows and nodes instead of obtain/recycle in
AccessibilityCache.

Bug: 117999988
Test: build and boot
Test: a11y CTS & unit tests
Change-Id: I269c6b9d8bc67568fd90f8690a7bfb7a782e7fe7
2019-03-26 09:14:59 +08:00
Felipe Leme
790be0463b Defined new APIs to whitelist content capture for specific URLs.
Test: m update-api # not implemented yet
Fixes: 129267994

Change-Id: Ibd83368ce79e8dfe901164f921304091c41428fc
2019-03-25 15:35:57 -07:00
Jackal Guo
a4d92da88d Merge "Refine adjustIsVisibleToUser" 2019-03-25 01:11:36 +00:00
TreeHugger Robot
1987dfa035 Merge "Added a "lite" flag on ContentCaptureOptions." 2019-03-23 04:33:21 +00:00
TreeHugger Robot
dd72d2f8cd Merge "Restrict access to FLAG_USE_CHILD_DRAWING_ORDER." 2019-03-23 00:26:47 +00:00
TreeHugger Robot
23537e3995 Merge "Conversation Actions: support multiple models." 2019-03-22 23:36:21 +00:00
TreeHugger Robot
4f3f18dec3 Merge "Fixed Content Capture workflow when service package is updated." 2019-03-22 23:00:01 +00:00
Peiyong Lin
260b714200 Merge "Revert "Revert "Allow screenshot to carry more information.""" 2019-03-22 22:24:51 +00:00
Winson Chung
dece92b287 Merge "Add overlays for nav bar interaction mode." 2019-03-22 21:02:07 +00:00
TreeHugger Robot
4e59b8d992 Merge "Restrict access to mGroupFlags." 2019-03-22 20:22:16 +00:00
TreeHugger Robot
6f59ef8a37 Merge "Restrict FLAG_SUPPORT_STATIC_TRANSFORMATIONS usage" 2019-03-22 20:06:36 +00:00
Rob Carr
087af2d89a Merge changes from topic "sv-background"
* changes:
  SurfaceView: Only show background when behind ViewRoot.
  SurfaceControl: Respond to more API Feedback
2019-03-22 19:21:59 +00:00
TreeHugger Robot
90cd0ce1d0 Merge "Restrict access to View's hierarchy listener." 2019-03-22 19:09:45 +00:00
TreeHugger Robot
25ad27eb6c Merge "New method ContentCaptureManager.getServiceSettingsComponentName()" 2019-03-22 18:35:58 +00:00
TreeHugger Robot
7d8a948b9d Merge "Restrict accesss to FLAG_DISALLOW_INTERCEPT" 2019-03-22 18:35:26 +00:00
Winson Chung
d9f2fb36ce Add overlays for nav bar interaction mode.
- Add config for nav bar interaction mode
- Add overlay packages for overriding the nav bar interaction mode
- Migrate existing swipe up setting into the resource overlay
  P2 P->Q:
    def/off -> 3 button overlay enabled (from default)
    set on  -> 2 button overlay enabled (from setting)
  P3 (default on):
    def (setting not exposed) -> 2 button overlay enabled (from default)

Bug: 127366543
Test: adb shell cmd overlay dump

Change-Id: I75590f81d9dd6a017776e0a34c295575bfe1bf2a
2019-03-22 11:33:52 -07:00
Peiyong Lin
e3e5efd8b6 Revert "Revert "Allow screenshot to carry more information.""
This reverts commit bf9d677afd.

Below is the original commit message:
Previously screenshot returns a GraphicBuffer without any other information
about how to interpret this buffer, especially color space. We could not take
any WCG screenshot, and the color space information is also lost by the time we
create bitmap from the GraphicBuffer. This patch adds a ScreenshotGraphicBuffer
as a wrapper around GraphicBuffer with more information, for example color
space. And make screenshot native method return ScreenshotGraphicBuffer.

BUG: 116112787
Test: Build, flash and boot. Verify with WCG Photos.
Change-Id: I4db6aeaf086a183a8be4f731d9f1a10205d3b8ae
2019-03-22 09:53:07 -07:00
Tony Mak
237f37b7f4 Conversation Actions: support multiple models.
This allows us to use the universal model when there is no model available for the
supported language.

Test: adb shell dumpsys textclassification. Observe that both en
      and univerisal actions model are listed properly.
Test: Switch to traditional chinese, observe that url action is working.

BUG: 128312720
Change-Id: I38258c8859e8ce505535ccf1f650ccf9daf64f46
2019-03-22 16:07:50 +00:00
TreeHugger Robot
37d4372c35 Merge "AccessibilityRequestPreparer shouldn't crash if the view is released before the preparer is added or removed." 2019-03-22 04:56:16 +00:00
Brad Stenning
75eaf771f8 Merge "Provide a hook for forcing all system bars to be displayed at all times" 2019-03-22 02:18:58 +00:00
TreeHugger Robot
3662ca14a9 Merge "Trigger Augmented Autofill when the standard service is not set." 2019-03-22 01:26:15 +00:00
Felipe Leme
2f28843249 Fixed Content Capture workflow when service package is updated.
The workflow already handles the case where the service dies and the framework re-establishes
the binder connection, but that didn't work when it died because the package was being updated.

This CL fixes this scenario by gracefully pausing the existing sessions before the package is
updated, then resuming them afterwards.

Test: manual verification
Test: atest CtsContentCaptureServiceTestCases # sanity check minus flakiness

Bug: 126266412
Fixes: 129072171

Change-Id: Ibc6b723c7bc08b4f920436f365d6006bc8fac7b6
2019-03-21 18:15:05 -07:00
Felipe Leme
df30f27052 Trigger Augmented Autofill when the standard service is not set.
Test: atest AugmentedLoginActivityTest#testAugmentedAutoFill_mainServiceDisabled
Test: atest CtsAutoFillServiceTestCases # sanity check

Fixes: 123100813

Change-Id: I16bf7f583a4be13584f1fa20c76c2b1c32cf4409
2019-03-21 14:39:37 -07:00
Peiyong Lin
36ae1dedb4 Merge "Revert "Allow screenshot to carry more information."" 2019-03-21 20:54:46 +00:00
Peiyong Lin
bf9d677afd Revert "Allow screenshot to carry more information."
This reverts commit 42d5d0322a.

Below is the original commit message:

Previously screenshot returns a GraphicBuffer without any other information
about how to interpret this buffer, especially color space. We could not take
any WCG screenshot, and the color space information is also lost by the time we
create bitmap from the GraphicBuffer. This patch adds a ScreenshotGraphicBuffer
as a wrapper around GraphicBuffer with more information, for example color
space. And make screenshot native method return ScreenshotGraphicBuffer.

BUG: 116112787
Test: Build, flash and boot. Verify with WCG Photos.

Reason for revert: Break master build

Change-Id: I36efb7a1274bdcd31b6a7f1070a96d522c0f124a
2019-03-21 20:53:42 +00:00
Leon Scroggins III
fda4f61060 Clean up references to @ColorLong
Bug: 120904891
Test: make docs && look at the output

Remove instances of {@link ColorLong}. Although the link is supposed to
go to
    https://developer.android.com/reference/android/annotation/ColorLong.html
my web browser redirects me to
    https://developer.android.com/reference
Perhaps there's a bug somewhere in the generation (I am able to navigate
to
    https://developer.android.com/reference/android/support/annotation/ColorLong?hl=en
by searching on developer.android.com - notice the addition of
"support"), but I still think it would make more sense to send users to
the page for android.graphics.Color directly.

Switch over to {@code ColorLong} (which does not generate a link) and a
reference to look at the {@link Color} class.

Update parameter named "c" to one named "color".

Unify various Canvas#drawColor APIs to say "to draw onto the canvas"
(previously some said this, while others said "to draw with").

Change-Id: I78eff5c35e350f763aac0416f6ec1ccf12f89418
2019-03-21 16:04:06 -04:00
Peiyong Lin
49b7d471fb Merge "Allow screenshot to carry more information." 2019-03-21 19:45:19 +00:00
TreeHugger Robot
e05cda0916 Merge "Corresponding changes for latest libtextclassifier import" 2019-03-21 19:18:13 +00:00
Andrei-Valentin Onea
bb5089fbd9 Merge "Add @UnsupportedAppUsage annotations" 2019-03-21 19:11:51 +00:00
Felipe Leme
5001b3bb44 Added a "lite" flag on ContentCaptureOptions.
It will be used to let activities from the ContentCapture service package to use
the ContentCaptureManager APIs (such as isContentCaptureFeatureEnabled()), without
triggering content capture per se.

Bug: 122958583
Test: manual verification
Test: atest CtsContentCaptureServiceTestCases # sanity check

Change-Id: I0305fa9f3adb68e6faff80afcb965ae4643f2992
2019-03-21 10:13:49 -07:00
Robert Carr
6b727e57c6 SurfaceView: Only show background when behind ViewRoot.
The old implementation of the SurfaceView background didn't show
when the Surface was in front of the  ViewRoot surface, and the new one does.
This is causing problems with apps that float invisible SurfaceViews on top
of themselves and with apps that don't implement draw notification. Here we restore
the old behavior.

Bug: 123920952
Bug: 115969839
Test: Manual
Change-Id: I12a6f3910551ba0fa2ab71a37475a9b78cf384b6
2019-03-21 09:29:59 -07:00
Robert Carr
29fe58a619 SurfaceControl: Respond to more API Feedback
1. Cleanup exception usage
2. Reference isValid from release and vice-verse
3. Clarify Transaction.close()
4. Fix "assosciated"->associated
5. Clarify builder defaults

Bug: 126360307
Test: Builds
Change-Id: Iead03c97f5dadba55b88b4217756bd5409937091
2019-03-21 09:29:55 -07:00
Andrei Onea
e30e3928f9 Add @UnsupportedAppUsage annotations
For packages:
  android.companion
  android.filterfw
  android.hardware.camera2.utils
  android.inputmethodservice
  android.net.nsd
  android.os
  android.preference
  android.security.keymaster
  android.service.dreams
  android.telecom
  android.telephony.ims.compat.feature
  android.telephony
  android.util
  android.view.accessibility
  android.media.effect

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I9c2f8347952f3cc65759472b0e1a2717b285e44e
2019-03-21 14:04:57 +00:00