Commit Graph

10300 Commits

Author SHA1 Message Date
Jan Althaus
ec3ded8686 Change default smart select range for logging to [0,0]
Bug: 64914512
Test: Manually tested that logs are correct. Will follow up with automated tests.
Change-Id: I5eb151f49f9dd665c6c76625ebb2b9c0be96a11d
2017-09-14 09:31:24 +02:00
Abodunrinwa Toki
cd2497b534 Fix smart selection logging bugs.
- Fix count with selection start index inside a word
- Properly handle whitespace characters
- Set the model version tag

Bug: 64914512
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: Manually tested that logs are correct. Will follow up with automated tests.
Merged-In: Ib73b52ebce999f2cb6e5734e556cd09e47c89a29
Change-Id: Ib73b52ebce999f2cb6e5734e556cd09e47c89a29
2017-09-12 00:20:40 +01:00
Evan Rosky
c8b91ecbae Merge "Fixed some small keyboard nav bugs (TabHost, directional focus)" into oc-mr1-dev 2017-09-11 20:25:50 +00:00
TreeHugger Robot
a729236399 Merge "Revert "Remove a compat hack SurfaceView#setWindowType()"" into oc-mr1-dev 2017-09-10 05:31:42 +00:00
TreeHugger Robot
beff427903 Merge "Documented use of AutofillManager.notifyViewVisibilityChanged()" into oc-mr1-dev 2017-09-10 04:37:35 +00:00
Yohei Yukawa
9309c19513 Revert "Remove a compat hack SurfaceView#setWindowType()"
This CL reverts my previous CL [1] that aimed to get rid of
a nasty compatibility hack that was introduced for Bug 36345857.

For those who are interested in, what happenned are:

 1. @hide method SurfaceView#setWindowType() was removed [2].
 2. It broke some app (Bug 36345857).  We had to work around
    it by re-introducing SurfaceView#setWindowType()
    temporarily [3].
 3. Some app switched to the correct implementation when
    running on Android O devices.
 4. We removed that compatibility hack [1] (Bug 62054282).
 5. Android O MR1 is set to be "REL" [4].
 6. It broke some app, probably because of some unfortunate
    mistake in the version check logic in that app.
 7. We end up introducing the same hack again for O MR1.

 [1]: Icee198c554de558cfa4ffe0b264064969839654e
      7a1ad6d97c
 [2]: Ie56b6f7ab16f32d7fc459b8eba26594337ad55de
      d5c7dd6da8
 [3]: I5217f6417a73690ae8a978754218b7b089070fdd
      3b5011afc9
 [4]: I054e3ecff49803e61e7741753fe6764a567d72c4
      62a835d0ef89e51f4a97fecf8576224551b545a5

Bug: 36345857
Bug: 62054282
Fixes: 65508814
Test: Manually verified that Bug 65508814 is not reproducible
Change-Id: If8a3f726789daa22f73e1962e938f071d3c09414
2017-09-09 17:45:27 -07:00
Sujith Ramakrishnan
f8942c0c88 Make ASSIST launch VIS and add a new keycode for TV (ALL_APPS)
- KEYCODE_ASSIST: Looks for default VIS in system partition
      and launches it.
    - Ensure foreground activity assist context extras are collected
      and sent to VIS.
    - KEYCODE_ALL_APPS: Sends Intent.ACTION_ALL_APPS. For TV,
      this targets default launcher package in system partition.

Test: Manual: ASSIST: adb shell input keyevent 219
Test: Manual: ALL_APPS: adb shell input keyevent 284
Test: also tested with --longpress for these keys
Test: Manual: Checked with dummy app populating overridden
      onProvideAssistData()
Test: Keypresses after overriding ALL_APPS and ASSIST
      on Nexus Remote

Bug: 37950079
Bug: 38496261
Change-Id: I96d9de67d4a442a8c6cb7feec28fc9aeb0dcbc18
2017-09-07 16:19:53 -07:00
Felipe Leme
4ae4169f7b Documented use of AutofillManager.notifyViewVisibilityChanged()
Test: mmm -j108 frameworks/base/:doc-comment-check-docs
Bug: 38509603

Merged-Id: I83c7089b071a82b7d887cb48c18683b671b0c4d6

Change-Id: I83c7089b071a82b7d887cb48c18683b671b0c4d6
2017-08-31 14:10:46 -07:00
Abodunrinwa Toki
692b196cc1 Introduce SmartSelectionEventTracker.
This will be used for logging text selection interaction.

Bug: 64914512
Test: No test. Everything builds fine.
Change-Id: Idb28864e0fc969be05d81855b2e7cd8389bd835e
2017-08-30 13:38:51 +01:00
TreeHugger Robot
102520f88e Merge "Clear focused-in-cluster on focusability changes" into oc-mr1-dev 2017-08-29 21:01:05 +00:00
Felipe Leme
c24a56ae06 Hides the Save UI while handling a pending intent from CustomDescription.
When the AutofillService sets a PendingIntent to launch an activity when
clicking a chield view (for example, to lauch a web page displayign the terms
and conditions of saving something), the system must hide the Save UI and
restore it after the new activity is dismissed.

That sounds simple in the surface, but it requires a huge refactoring behind
the scenes, such as injecting a token in the activity intent and using that
token to hide / cancel the UI during some activity lifecycle events.

Test: lotta of brand-new shinning tests on CtsAutoFillServiceTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Change-Id: Ie8ec7aeb2c63cab68467046c1a9dcf85dbcc24ec
Fixes: 64309238
2017-08-28 18:04:15 -07:00
Felipe Leme
ca03b3fbe6 Merge "Clarified that getAutofillValue() must return same value passed to autofill()." into oc-dev am: 7d29b6f2df
am: da31220015

Change-Id: I1ccd7b54c27ce65edcf9b1aceba7097bd8fc32e2
2017-08-25 21:54:45 +00:00
Felipe Leme
da31220015 Merge "Clarified that getAutofillValue() must return same value passed to autofill()." into oc-dev
am: 7d29b6f2df

Change-Id: Ibfabc9d32aa0da80e636a27eebf1b50bdd9692b3
2017-08-25 21:36:04 +00:00
TreeHugger Robot
f3b78305ff Merge "New haptic feedback constants" into oc-mr1-dev 2017-08-24 21:02:57 +00:00
Andrii Kulian
7ee92d5291 Merge "Apply API review comments for SHOW_WITH_INSECURE_KEYGUARD" into oc-mr1-dev 2017-08-24 19:59:08 +00:00
Yohei Yukawa
262dadf870 New haptic feedback constants
This CL introduces several haptic feedback constants that are ready
to be exposed to developers.

Test: checkbuild
Fixes: 64537070
Change-Id: If54d5bc6cab4e2c405615b7a40648c74a1097ea3
2017-08-24 10:51:00 -07:00
Jorim Jaggi
f1ef6ef742 Merge "Sleep activities with AOD" into oc-mr1-dev 2017-08-24 13:19:42 +00:00
Andrii Kulian
732a90a794 Apply API review comments for SHOW_WITH_INSECURE_KEYGUARD
Applied review comments but keeping the flag hidden for now.

Bug: 36555156
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testExternalDisplayActivityTurnPrimaryOff
Test: #testLaunchExternalDisplayActivityWhilePrimaryOff
Test: #testShowWhenLockedPublicVirtualDisplay
Change-Id: I1aa1289424d0d778bc0668c9ec69bc56f47891e3
2017-08-23 15:42:16 -07:00
Andrii Kulian
0d008e3204 Merge "Track app visibility updates on the client" into oc-mr1-dev 2017-08-23 18:06:50 +00:00
Jorim Jaggi
f12ec0fb64 Sleep activities with AOD
Previously in the last release we started sleeping as soon as
the device was not interactive anymore. However, this caused
issues with ambiactive activites on Android Wear.

Instead, we introduce a new private flag on a window that signals
that all activities should be put to sleep. We use this flag in
SystemUI as soon as SystemUI is "dozing", which means its ambient
display is showing. This flag gets set before we request PWM to
wake-up, so it's ensured that this will not cause any spurious
lifecycle events.

Test: go/wm-smoke
Test: android.server.cts.KeyguardTests
Change-Id: I20f6dd4bfde220f945ef94d2ac1b89dd3694de32
Fixes: 64940094
2017-08-23 16:24:07 +02:00
Phil Weaver
c6c9e089db Merge "Place focus on window when a11y performs an action" into oc-mr1-dev 2017-08-22 16:42:13 +00:00
Andrii Kulian
74b561a1fc Track app visibility updates on the client
When client receives two consecutive app visibility updates
sometimes it might handle them in single traversal pass and
in ViewRootImpl#performTraversals it will not detect a
visibility change.
Server side in this case will be stuck waiting for relayout
call from the client and will not draw the app window. This
can also cause focus not being switched properly and WM
remain with no focused window.

Bug: 64517357
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testEnterPipFromTaskWithMultipleActivities
Test: Run the test and check if there are no focused window logs
Change-Id: I714da72a881e2dee5cf8dafd62113fbb9f2f3f4d
2017-08-21 13:43:44 -07:00
Phil Weaver
5dc3ebcec6 Place focus on window when a11y performs an action
Bug: 62344706
Test: Now able to bring up keyboard in split-screen mode.
Also a11y CTS and unit tests pass.

Change-Id: Ic4340425680c89e8fc5e586aa1d363b01fd69763
2017-08-17 16:48:48 -07:00
Felipe Leme
a96f7af211 Clarified that getAutofillValue() must return same value passed to autofill().
Test: m doc-comment-check-docs
Bug: 64114048

Change-Id: I618cc3703db64315a848cc483f460f1b27fec98b
2017-08-17 16:18:44 -07:00
Casey Burkhardt
02f3b807db Make isAccessibilityButtonSupported public
Bug: 62342696
Test: Builds
Change-Id: I02082f2db349181473b2a7fd367fc8892d495fc1
2017-08-17 02:50:45 -07:00
TreeHugger Robot
10d176009d Merge "Revert "Dismiss Autofill Save UI when a new Activity is launched."" into oc-mr1-dev 2017-08-17 03:07:02 +00:00
Philip P. Moltmann
4c0e55d0fc Merge "Don't get struct of children of !laidout viewGroup" into oc-mr1-dev 2017-08-16 23:49:21 +00:00
Felipe Leme
cf1ff6ca3d Revert "Dismiss Autofill Save UI when a new Activity is launched."
This reverts commit 05ea98a3f9.

Bug: 64693551

Change-Id: I8e7a7b2c5f575cee28f977ae7f3c10752a15d49c
2017-08-16 23:34:06 +00:00
Evan Rosky
5b20e0942c Clear focused-in-cluster on focusability changes
Bug: 63424225
Test: Added CTS test. Checked that it fixes the issue in Docs

Change-Id: I3f986abbeed9473b5008662b53ce35cc183619ad
2017-08-16 22:03:54 +00:00
Romain Guy
010f082490 Hide shared buffer mode/auto refresh on Surface
Bug: 63858546
Test: Compile & boot

Change-Id: I34372593d4b47b143e65d30f669f883c69653f62
2017-08-16 10:02:10 -07:00
Philip P. Moltmann
083d8aace7 Don't get struct of children of !laidout viewGroup
Some view groups (e.g. the support.v4.viewPager) need to be laid out
to determine the order of it's children. As we need the order before
being able to collect the structure of the children we need to skip
their collection until they are laid out.

Fixes: 38198484
Test: cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
      cts-tradefed run cts-dev -m CtsAccessibilityTestCases
      cts-tradefed run cts-dev -m CtsAccessibilityServiceTestCases

Change-Id: I1f7bee1505edaf70c9d9a686be6f9a76d8aedd0b
2017-08-16 16:03:15 +00:00
Felipe Leme
05ea98a3f9 Dismiss Autofill Save UI when a new Activity is launched.
Test: manual verification using Settings
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -tandroid.autofillservice.cts.SimpleSaveActivityTest#testDismissSave_byLaunchingNewActivity
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -tandroid.autofillservice.cts.LoginActivityTest#testSaveGoesAwayWhenLaunchingNewActivity
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 64693551

Change-Id: I323031c7285a4b49f9f0ca06618425a0ab7833da
2017-08-14 17:56:30 -07:00
Cindy Kuang
61130c49a3 Merge "docs: replaced "i.e." to fix formatting error" into oc-dev am: 0580ac8a65
am: 07f5257b19

Change-Id: I0ac6fa46922bb2866cfb416763dfcfac10fdd909
2017-08-11 21:34:57 +00:00
Cindy Kuang
07f5257b19 Merge "docs: replaced "i.e." to fix formatting error" into oc-dev
am: 0580ac8a65

Change-Id: I094bd99bcaaf51633ac887d38a9323ed5fdc54e2
2017-08-11 21:01:15 +00:00
Phil Weaver
34f79a67ee Merge "Stop focusing views before layout." into oc-dr1-dev
am: a5dab05b61

Change-Id: I31f4ce541ac56887549a654b5e313e1f361152c3
2017-08-10 22:44:39 +00:00
Phil Weaver
a5dab05b61 Merge "Stop focusing views before layout." into oc-dr1-dev 2017-08-10 22:34:03 +00:00
Phil Weaver
edbcf2c4bf Stop focusing views before layout.
Rolls back one line of ag/2257919.

Bug: 63811145
Test: TalkBack no longer reads the page backwards in:
Settings > System > Reset > Factory data reset
Settings > Connected devices > Android Beam

Change-Id: I6b04e64cd650ebda193da4a54bf0721bd256820c
2017-08-10 12:31:34 -07:00
Cindy Kuang
12d3747c0b docs: replaced "i.e." to fix formatting error
Test: make ds-docs

Bug: 6440865
Change-Id: I428476ddfe55f14df531ea6a1c3e3a09f7a29e7d
2017-08-10 09:59:58 -07:00
Phil Weaver
7cf51ed889 Merge "Fix source for PiP hover accessibility events" into oc-dr1-dev
am: a4b5e0893f

Change-Id: I5e79cbadd085c2ce3eacae628388ce13bdded508
2017-08-10 00:19:04 +00:00
Phil Weaver
a4b5e0893f Merge "Fix source for PiP hover accessibility events" into oc-dr1-dev 2017-08-10 00:13:04 +00:00
TreeHugger Robot
cb5a109d17 Merge "Optimize filterByLanguage by caching locale objects" into oc-mr1-dev 2017-08-09 18:35:01 +00:00
Phil Weaver
0a8caa1ccc Fix source for PiP hover accessibility events
The events were ending up not important for a11y and
with invalid window ids, which prevented TalkBack from
seeing them properly.

Bug: 64428961
Test: Ran YouTube in PiP, now able to select it.
Change-Id: I38ccbf5f2f35ffda255b84f229e98ca23e6b11aa
2017-08-09 11:28:41 -07:00
Tony Mak
afcd19c71e Optimize filterByLanguage by caching locale objects
According to traceview, most of the time spent in filterByLanguage
is calling getLocaleObject to create java.util.Locale objects.
The solution is to cache the object to save the cost. Note that both
mSubtypeLangugageTag and mSubtypeLocale are final, so it is fine to
cache the locale object.

Test: bit FrameworksCoreTests:android.view.inputmethod.InputMethodSubtypeTest
Test: bit FrameworksCoreTests:com.android.internal.inputmethod.LocaleUtilsTest
Test: Try to switch user back and forth, and tap a textview to show IME.

Bug: 37647204
Fix: 37647213

Change-Id: Ib6ff7e97b17fc547c8109af8177f05fc3ea41b08
2017-08-09 15:50:57 +00:00
Felipe Leme
9457911997 Clarifies autofill lifecycle. am: 744976e298
am: af40bb0dc4

Change-Id: I48f797f62c120b352045cb93e5067ee20c3154d3
2017-08-09 12:30:16 +00:00
Felipe Leme
af40bb0dc4 Clarifies autofill lifecycle.
am: 744976e298

Change-Id: Ia1c9652ded5c5ea6af9dc7872f89bd776a58e6d4
2017-08-08 17:34:14 +00:00
Felipe Leme
744976e298 Clarifies autofill lifecycle.
Test: m update-api

Bug: 64125551
Bug: 64114048
Change-Id: I17c5bc2e2e64fa27e877301dbcb983ac8497209e
2017-08-07 17:22:50 -07:00
Andrii Kulian
66994114e7 Merge "Add black frame behind app window" into oc-dr1-dev
am: cbdaf04101

Change-Id: I9ce5cf5aea7f0fd93fbe24664bbd583d5057d3e6
2017-08-07 22:21:08 +00:00
Jeff Sharkey
67f9d5070a Fix broken javadocs.
Bug: 64337634
Test: make -j32 doc-comment-check-docs
Change-Id: I20fdd3dcddef09111d35946c41c596c7689effa6
2017-08-06 07:37:08 -06:00
Andrii Kulian
283acd20ca Add black frame behind app window
Add black background behind letterboxed apps on displays with tall
aspect ratio. This is needed to make sure that other windows won't
bleed through status/navigation bar area, because letterboxed
windows are not considered fullscreen.

Bug: 63156733
Bug: 62893418
Test: go/wm-smoke
Test: Trigger animations to/from recents with different rotations.
Change-Id: If0eac9a3801518185d560a87d9f88ee0aafa3a9c
2017-08-04 14:32:26 -07:00
TreeHugger Robot
38bbbdfae6 Merge "Remove LangId related code." into oc-mr1-dev 2017-08-03 17:54:29 +00:00