Commit Graph

4972 Commits

Author SHA1 Message Date
Julia Reynolds
73bc1e84e8 Merge "Fix notification history ordering" 2020-01-21 18:58:20 +00:00
Neil Fuller
246c873f2b Merge "Rename tzdata module -> tzdata2 for R" 2020-01-21 17:36:51 +00:00
Julia Reynolds
1cc5f842e4 Fix notification history ordering
Newest first!

Test: atest
Bug: 137396965
Change-Id: I83f8ddde5e5f929dff2bcafe55e26a51f82f90f5
2020-01-21 12:24:03 -05:00
kholoud mohamed
30bf54729b Teach permission checker about appop permissions
Changed APIs in PermissionChecker to check if the permission is an appop
permission or a runtime permission and treat it accordingly.

BUG: 140728653
BUG: 136249261
Test: atest PermissionCheckerTest

Change-Id: I742dad5b0e1e9cd65920f0366f1887ab33959f5b
2020-01-21 11:57:58 +00:00
Tiger Huang
b8429e8051 Merge "Window Manager Flag Migration (11/n)" 2020-01-21 10:13:44 +00:00
Tiger Huang
41ae5e8505 Window Manager Flag Migration (11/n)
This CL dispatches the compatible system UI visibility to the app.

There are some changes about the flag of low profile in the new insets
mode:
- A window cannot detect if another window changes the system bars to
  the low profile mode via OnSystemUiVisibilityChangeListener.
- SYSTEM_UI_FLAG_LOW_PROFILE won't be cleared by swiping to show bars.

Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
            InsetsPolicyTest WindowStateTests CommandQueueTest
            RegisterStatusBarResultTest InsetsFlagsTest
            LightBarControllerTest RegisterStatusBarResultTest
            ViewRootImplTest DisplayPolicyLayoutTests
            DisplayPolicyInsetsTests DisplayPolicyTests
            TaskSnapshotSurfaceTest InsetsAnimationControlImplTest

Change-Id: I85b720fd6b09c206ec56ca661cd5b645f7add404
2020-01-20 22:06:14 +08:00
Shawn Lin
d459dc237c Merge "Add a new flag ALWAYS for layoutInDisplayCutoutMode" 2020-01-20 14:02:57 +00:00
Jorim Jaggi
0865f08f5a Merge "Migrate LAYOUT_STABLE in new insets world" 2020-01-20 13:33:26 +00:00
Rhed Jao
14763d1497 Merge "More tests for AccessibilityShortcutInfoTest." 2020-01-20 11:38:21 +00:00
Rhed Jao
5a1b274913 More tests for AccessibilityShortcutInfoTest.
Bug: 138149472
Test: atest AccessibilityShortcutInfoTest
Change-Id: I77e84e288c5fcf2a3b2cf3c9173eecbf44a111a4
2020-01-20 16:06:34 +08:00
Alexander Dorokhine
0231ac864b Merge "Implement putDocuments() support in AppSearchImpl." 2020-01-19 19:33:53 +00:00
Alexander Dorokhine
0c457e57e3 Implement putDocuments() support in AppSearchImpl.
Bug: 143789408
Test: AppSearchManagerTest
Change-Id: I4ef0540e0655a0b65a32b8d6a903ae955c687f4f
2020-01-19 03:00:28 -08:00
shawnlin
7dabcab3dd Make DisplayCutout support waterfall insets
For waterfall display, also take the waterfall insets into accout to
comput safe insets.

Change-Id: I1d5663ebd8588021387b7ae5296851769954f996
Bug: 146876976
Test: atest DisplayCutoutTest
2020-01-19 14:49:12 +08:00
Cassie Wang
42b34aef9a Merge "Update appsearch with new upstream changes" 2020-01-18 03:42:23 +00:00
Alexander Dorokhine
aff0c2a9e1 Merge "Remove IndexingConfig and merge its constants into PropertyConfig." 2020-01-18 03:42:02 +00:00
Cassie Wang
d70271a839 Update appsearch with new upstream changes
* Switch CreationTimestampSecs to CreationTimestampMs.
* Switch SearchResult error handling

Bug: 143789408
Test: atest --rebuild-module-info CtsAppSearchTestCases
FrameworksCoreTests:android.app.appsearch
FrameworksServicesTests:com.android.server.appsearch.impl
Change-Id: Ib1381ba2714d1d0a2a2d5d4bfe1cc3a095ebcda4
2020-01-17 17:53:06 -08:00
Jorim Jaggi
7f7618748d Migrate LAYOUT_STABLE in new insets world
WindowInsets.getSystemInsets returns the stable insets if the
window has set SYSTEM_UI_FLAG_STABLE set.

Furthermore, consuming stable will also consume system insets, and
consuming system insets will consume stable. However, DecorView
will not longer consume stable.

Bug: 118118435
Test: InsetsStateTest, WindowInsetsTest
Change-Id: I232e90a6ec34036e830a53437cf32a2b794c5257
2020-01-17 22:42:02 +00:00
Hongming Jin
60d32dbf5d Merge "API on AccessibilityService side to support customized system actions." 2020-01-17 19:09:11 +00:00
Neil Fuller
bbc61610fe Rename tzdata module -> tzdata2 for R
Bug: 147582976
Test: boot
Change-Id: I64778af35a7ff24d33232b7b6fd9f6881282ad2b
2020-01-17 09:17:14 +00:00
shawnlin
d0e23be2e7 Add a new flag ALWAYS for layoutInDisplayCutoutMode
In R, we will allow cutouts on long edges of a display.
We need to add a new flag for this.

Test: atest PhoneWindowTest
Bug: 146875740
Change-Id: Iebb5f14c0a693f8229fef67d80f2afc3029c3deb
2020-01-17 16:29:46 +08: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
Alexander Dorokhine
0a26313afb Remove IndexingConfig and merge its constants into PropertyConfig.
With 4-tab indents, these nested structures become difficult to write
and maintain. The information encoded here doesn't seem to benefit from
being separated into its own config.

Test: atest CtsAppSearchTestCases FrameworksCoreTests:android.app.appsearch FrameworksServicesTests:com.android.server.appsearch.impl
Bug: 145635424
Change-Id: I6c771e0af1ca34a05b09d1532f0f227a069e0d2e
2020-01-16 19:37:58 -08: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
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
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