Commit Graph

6167 Commits

Author SHA1 Message Date
Hongming Jin
60d32dbf5d Merge "API on AccessibilityService side to support customized system actions." 2020-01-17 19:09:11 +00:00
Ryan Lin
be69a3b62f Merge "Added an interface between Sysui and system_server" 2020-01-17 07:40:04 +00:00
Siddhartha Chhabra
4b01b414c6 Merge "Added query and SearchResults." 2020-01-17 06:37:37 +00:00
TreeHugger Robot
64259a3b43 Merge "Simplify the activity lifecycle from START to STOP" 2020-01-17 05:03:28 +00:00
sidchhabra
16e5fefb59 Added query and SearchResults.
Bug: 145631811
Test: atest core/tests/coretests/src/android/app/appsearch/SearchResultsTest.java
Change-Id: Ie1bb0028b6ff999401cb96f9b9c4b121c9d0e448
2020-01-16 18:38:28 -08:00
Hongming Jin
8302c6cd85 API on AccessibilityService side to support customized system actions.
Test: atest AbstractAccessibilityServiceConnectionTest
      atest AccessibilityServiceTest
      atest AccessibilityManagerServiceTest
Bug: 136286274
Change-Id: I6810cc9d2fff3f81f76b63fb075a68973e9757c8
2020-01-17 01:35:27 +00:00
TreeHugger Robot
747bbfafb8 Merge "Fix remounting overlay tests failure" 2020-01-17 00:00:23 +00:00
Ryan Mitchell
55aaaa178e Fix remounting overlay tests failure
The tests were running before boot complete but required
StorageManager to finish initialization before a package could be
installed.

This change makes the test wait for the device to be available by
using reboot(). Also remove code to retrieve resource value from
target APK and use "cmd overlay lookup" to see if the resources
are overlaid.

Bug: 147660952
Test: atest OverlayRemountedTest
Change-Id: I5929d3a57ad492ce0128b4a18e636ae96982bc62
2020-01-16 13:35:17 -08:00
Anton Hansson
b2f709db1d Add <extension-sdk> manifest tag inside <uses-sdk>
This allows apps to specify the minimum versions they need
of extension sdks, and fails install if they aren't met.

There is additional work required to prevent local rollbacks
from triggering a downgrade of SDK versions after an install.

Bug: 137191822
Test: atest PackageParserTest
Exempt-From-Owner-Approval: PS4 was approved
Change-Id: If61ae6c67ceb752bec6876006a29e52b996901e7
2020-01-16 11:59:52 +00:00
Jorim Jaggi
73c2063811 Merge "Handle cases when multiple type are animating" 2020-01-16 09:41:24 +00:00
Terry Wang
68b8332ebd Merge "Add AppSearch.java, containing the Document class, base Builder, and Email." 2020-01-16 00:01:28 +00:00
Alexander Dorokhine
0731f57193 Add AppSearch.java, containing the Document class, base Builder, and Email.
Document is the basic entity to be indexed and queried in AppSearch.
AppSearch.java contains all AppSearch Document types and their Builders.
They are grouped here to avoid potential collisions with other
generically-named classes like Email and Contact).

Bug: 143789408
Test: atest FrameworksCoreTests:android.app.appsearch
Change-Id: I7bb607ad4114451a3db11b9ade9c197da1e6556a
2020-01-15 13:31:45 -08:00
Nikita Dubrovsky
f404290312 Merge "Add test case to TextViewActivityMouseTest for selection handles" 2020-01-15 19:47:33 +00:00
Nikita Dubrovsky
ca73951a92 Merge "Add explicit check to not trigger a cursor drag via the mouse" 2020-01-15 18:46:59 +00:00
Nikita Dubrovsky
f32903df0f Merge "Handle ACTION_CANCEL in EditorTouchState (editable TextView)" 2020-01-15 16:42:49 +00:00
ryanlwlin
2cc1d117a8 Added an interface between Sysui and system_server
This interface is used to interact between system UI and system
server for winodow magnification. When magnification mode is window
mode, system UI will set the connection to AccessibilityManagerService
to manipulate window magnification.

Bug: 146400227
Test: WindowMagnificationConnectionWrapperTest
Test: AccessibilityManagerTest
Test: WindowMagnificationManagerTest
Change-Id: I64b22eac3a7be2e1dbced0573988fe75ace921f6
2020-01-15 17:24:43 +08:00
Jacky Kao
873cbc0e14 Merge "Implementing new API : takeScreenshot()" 2020-01-15 08:29:49 +00:00
Jacky Kao
09789e4168 Implementing new API : takeScreenshot()
Implementing the new API for A11y services to take the screenshot
of the specified display.
Bitmap takeScreenshot(int displayId)
1. The main codes is moved from the UiAutomationConnection class and
let the UiAutomation change to use this API.
2. Add a capability at metadata to check whether the A11y services could use this
API or not.
3. This API is a async one for A11y services, but is a sync one for
UiAutomation.

Bug: 10931661
Test: a11y CTS & unit tests
Change-Id: I478bd93c60d4742bef20ae0e423ca9de1bda55d2
2020-01-15 16:23:52 +08:00
Rhed Jao
70cb293d44 Merge changes from topic "A11yShortcut_NeedWithUi"
* changes:
  Accessibility shortcut improvement (10/n)
  Accessibility shortcut improvement (9/n)
  Accessibility shortcut improvement (8/n)
2020-01-15 07:22:32 +00:00
Nikita Dubrovsky
bd50f3b07a Add explicit check to not trigger a cursor drag via the mouse
Cursor drag without the handle is only for touch and should not trigger
for events from a mouse. This was already the case before this CL but it
was not explicit: SelectionModifierCursorController happened to trigger
first so the cursor drag would not get activated. This change updates
the cursor drag logic so that mouse events are explicitly excluded from
the feature.

Bug: 145535274
Bug: 143852764
Test: Manual and automated tests
  atest FrameworksCoreTests:EditorCursorDragTest
  atest FrameworksCoreTests:TextViewActivityMouseTest

Change-Id: I3ccf5106b8e9a9e3c271dff38a4d6a0c0aa19597
2020-01-14 22:49:25 -08:00
Jackal Guo
7fd8e937bf Merge "Support accessibility on embedded hierarchies (1/n)" 2020-01-15 05:40:36 +00:00
Alexander Dorokhine
3d7993dcbf Add implementation tests for AppSearchSchema framework classes.
Test: atest FrameworksCoreTests:AppSearchSchemaTest
Bug: 145635424
Change-Id: I6e8b9c9d9748cc15b6b6d7872b0e9546d6ead1c6
2020-01-14 15:48:44 -08:00
Nikita Dubrovsky
d69517ebf1 Merge "Fix NPE in InsertionPointCursorController.onTouchEvent" 2020-01-14 16:00:53 +00:00
Nikita Dubrovsky
99b55fa6a5 Fix NPE in InsertionPointCursorController.onTouchEvent
Calls to SelectionModifierCursorController must be guarded by
hasSelectionController() because it's possible to have a TextView
with an Editor but no selection controller if the TextView is
configured to have non-selectable text.

Bug: 147366705
Bug: 145535274
Bug: 143852764
Test: Manual and unit test
  atest FrameworksCoreTests:EditorCursorDragTest
Change-Id: I7fdec754e6fa51561b08fab024ea672c43f2c8f5
2020-01-13 21:54:20 -08:00
Nikita Dubrovsky
9afd708630 Merge "Fix and re-enable TextViewActivityMouseTest" 2020-01-14 05:51:24 +00:00
Nikita Dubrovsky
65ed05f0ca Add test case to TextViewActivityMouseTest for selection handles
Bug: 147643179
Test: atest FrameworksCoreTests:TextViewActivityMouseTest
Change-Id: I1c4de06e0f78d00d6266e7cebf5fe6c4687181db
2020-01-13 21:47:29 -08:00
Rhed Jao
f526c9995b Accessibility shortcut improvement (10/n)
Update AccessibilityManagerService:
 - Enable multiple shortcut targets support for accessibility button.
 - Remove navibar magnification enabled setting key.

Bug: 136293963
Test: atest AccessibilityShortcutTest
Test: atest AccessibilityUserStateTest
Test: atest AccessibilityShortcutControllerTest
Change-Id: I69facd958307a22f3a0193dd769e595cef324f9f
2020-01-14 12:15:23 +08:00
Jackal Guo
79b182e752 Support accessibility on embedded hierarchies (1/n)
To support embedded hierarchies (leash):
1. Add new APIs for leashed child in AccessibilityNodeInfo.
2. SurfaceView needs to use this API to add such child when
   initializing the AccessibilityNodeInfo.

Bug: 137593247
Test: a11y CTS & unit tests
Change-Id: Ieaa57c6ad65f4c199175d929c3bcba7fb7e6ef26
2020-01-14 10:29:54 +08:00
TreeHugger Robot
f8e29c1d60 Merge "Supplying the IBinder to binderDied" 2020-01-14 01:09:45 +00:00
Suprabh Shukla
b8f20004f1 Supplying the IBinder to binderDied
Plugging the binder instance that dies. This helps a single
DeathRecipient to listen for multiple binder deaths.

Test: atest FrameworksCoreTests:BinderDeathRecipientTest

Bug: 135633339
Change-Id: I976ee2a138877830885ee1cbbd2b313ecb87aeb3
2020-01-13 14:57:03 -08:00
Qingxi Li
21c2d78f07 Merge "Create an until function to check location permission" 2020-01-13 21:23:09 +00:00
Ryan Mitchell
0252b862de Merge changes from topic "shared-lib-tele-res"
* changes:
  Allow for overlaying dynamic shared libraries
  Assign shared libraries stable package ids
2020-01-13 15:15:57 +00:00
Minche Li
b95dfee332 Merge "Add new switchToInputMethod API" 2020-01-13 02:31:53 +00:00
Nikita Dubrovsky
b7e8cfc356 Handle ACTION_CANCEL in EditorTouchState (editable TextView)
When testDragAndDrop_longClick() performs the long-press, the events
triggered are ACTION_DOWN, ACTION_CANCEL, ACTION_DOWN, ACTION_CANCEL.
It's not clear why there is the additional ACTION_DOWN / ACTION_CANCEL
pair; performing the same gesture manually only produces a single
ACTION_DOWN / ACTION_CANCEL pair. Still, Editor should be able to handle
this scenario since ACTION_CANCEL is a valid event.

Previously there was no handling for ACTION_CANCEL in EditorTouchState
at all, so the sequence of events triggered by the test would end up
getting treated as a double-tap scenario and drag-and-drop would not be
started.

This CL adds handling for ACTION_CANCEL in EditorTouchState, attempting
to follow GestureDetector as closely as possible (essentially resetting
state whenever ACTION_CANCEL is received, so that subsequent events
start a "fresh sequence").

Bug: 29591177
Test: Manual and ran tests
  atest FrameworksCoreTests:TextViewActivityMouseTest
  atest FrameworksCoreTests:TextViewActivityTest
  atest FrameworksCoreTests:EditorTouchStateTest
  atest FrameworksCoreTests:EditorCursorDragTest

Change-Id: Ia0ee531af64083a4f670842188bdc7e35b617397
2020-01-12 17:01:26 -08:00
Nikita Dubrovsky
4dca994b24 Fix and re-enable TextViewActivityMouseTest
The main problem was in MouseUiController: when generating an ACTION_UP
event, button state was not being reset so the event was getting
filtered out by the check in Editor.shouldFilterOutTouchEvent.

This CL also removes the slow negative assertions for the selection
handles (assertNoSelectionHandles).

There is one remaining issue in testDragAndDrop_longClick() which for
now is still suppressed. The real for this will be in a separate CL
because it requires updates to the touch state logic of Editor.

Bug: 29591177
Test: Ran tests
  atest FrameworksCoreTests:TextViewActivityMouseTest
  atest FrameworksCoreTests:TextViewActivityTest
Change-Id: I6ce73bf30d9c49ec1b5a5930db0f9cf52929bf43
2020-01-12 17:01:10 -08:00
Ryan Mitchell
ee4a564d4f Allow for overlaying dynamic shared libraries
Overlays targeting shared libraries should be loaded into the
resources of every target that depends on the shared library.

Static shared libraries are currently not supported because overlays
should override all versions of static shared libraries and there is
not currently support for an overlay targeting multiple APKs.

Also created a test instrumentation and host test suite for testing
overlays and packages on the system image.

Bug: 140790224
Test: atest OverlayRemountedTest
Change-Id: I20a217b6368d6cf92b2b9f46908fd58012933f72
2020-01-10 23:20:19 +00:00
Jorim Jaggi
1f2c7eb7f5 Handle cases when multiple type are animating
We need to keep track of the animations, but also it's nature,
such that we can make an appropriate decision whether to cancel or
ignore in show/hide.

Test: InsetsControllerTest
Bug: 111084606
Change-Id: I9d13a22ce179c2949b889fea80d29094845260e7
2020-01-11 00:04:16 +01:00
Qingxi Li
97d01e2ff0 Create an until function to check location permission
This util function will check whether the app has location permission
and whether the location mode is enabled for the users. This function
will be used by both connectivity service and wifi networks.

Bug: 142072839
Test: atest ConnectivityUtilTest
Change-Id: I5558ed04e5ef28033a1c649f5491f2f15aa63557
2020-01-10 14:01:55 -08:00
Automerger Merge Worker
60579b88eb Merge changes I401c064c,I16431a4d am: 84464cae37 am: 2d6a025c1d am: 16f33e4381
Change-Id: I7827a9ed8fa46cdac667d1af42719e7d84133a91
2020-01-10 19:34:50 +00:00
Automerger Merge Worker
16f33e4381 Merge changes I401c064c,I16431a4d am: 84464cae37 am: 2d6a025c1d
Change-Id: I10f8439a8e8dbca17c163f9a5561b4ebbd2372be
2020-01-10 18:16:03 +00:00
David Su
84464cae37 Merge changes I401c064c,I16431a4d
* changes:
  NetworkScoreServiceTest: Remove usages of @hide Wifi APIs
  NetworkKeyTest: remove @hide Wifi API usages
2020-01-10 17:54:10 +00:00
Jorim Jaggi
fa833b69b4 Merge "Move visible insets calculation to client" 2020-01-10 17:17:42 +00:00
Nikita Dubrovsky
28bd186e32 Merge "Simplify state in SelectionModifierCursorController" 2020-01-10 15:55:50 +00:00
Jorim Jaggi
4e04eb24ae Move visible insets calculation to client
As otherwise they may be out of sync, leading to shifting when the
IME disappears.

Bug: 111084606
Test: InsetsSourceTest, InsetsStateTest, InsetsSourceProviderTest
Change-Id: Ifd7dfa6694efccf8693fd46bec1a9dea879790ff
2020-01-10 15:36:51 +00:00
Automerger Merge Worker
2134fc50d0 Merge "Using WifiCommand to toggle the Wi-Fi state" am: bec5dc830e am: e1ba791c28 am: ae63f23efa
Change-Id: I0ae684b52989d9d02d8d78a1afcef40c1469c9b4
2020-01-10 15:36:05 +00:00
Automerger Merge Worker
ae63f23efa Merge "Using WifiCommand to toggle the Wi-Fi state" am: bec5dc830e am: e1ba791c28
Change-Id: I4d42acafbebd1ca11e50573d3b3458f5e931074e
2020-01-10 15:18:36 +00:00
Treehugger Robot
bec5dc830e Merge "Using WifiCommand to toggle the Wi-Fi state" 2020-01-10 14:39:40 +00:00
TreeHugger Robot
f093b48b58 Merge "Correct layout/draw/animation interleaving for insets callbacks" 2020-01-10 13:35:28 +00:00
Jorim Jaggi
a51168aaee Correct layout/draw/animation interleaving for insets callbacks
See WindowInsetsAnimationCallback.onPrepare for detailed
description of new behavior.

Also rename InsetsSourceConsumer.setVisible to setRequestedVisible
to communicate that this is client intent vs. current state.

Test: windowinsetstest application
Bug: 111084606
Change-Id: Id35c60e0f59a8aa4f0d300220391d1e2b96a91fd
2020-01-10 11:24:31 +01:00
Automerger Merge Worker
aa58c0d5c3 Merge "Rename android.util.TimestampedValue to android.os" am: 641fa6730a am: fee904a5fb
Change-Id: Ib439759dbee692a624491267d07f72b0d754779d
2020-01-10 09:18:38 +00:00