Commit Graph

10330 Commits

Author SHA1 Message Date
Yoshiaki Naka
d143760239 Support ENVELOPE (EVENT DOWNLOAD - User activity) command
The terminal shall send the ENVELOPE (EVENT DOWNLOAD - User activity)
command to the UICC when some user activity like a key-press or touch is
detected if the user activity event is a part of the current event list.
This change allows the SIM Toolkit application to support that event.
Please refer to the specification of SET UP EVENT LIST command described
in ETSI TS 102.223.

Bug: 65884891
Test: Confirmed the expected seq 1.1 of ETSI TS 102.384 TC 27.22.4.16
Change-Id: I7d3faa09cd4625db53bcfe21f90570389a4ea037
Merged-In: I7d3faa09cd4625db53bcfe21f90570389a4ea037
2018-03-08 17:02:38 -08:00
Niklas Brunlid
e842e266a6 Merge "Avoid overflow in focus fudge calculation"
am: 795d4a5aa4

Change-Id: Id15034f5a02f93a4fe8487b5516993a9bf6f4ada
2017-11-15 18:59:35 +00:00
Treehugger Robot
795d4a5aa4 Merge "Avoid overflow in focus fudge calculation" 2017-11-15 18:42:28 +00:00
Koji Fukui
8d36beec24 Merge "Remove AutofillManagerClient after AutofillManager is finalized"
am: dd5384a4fe

Change-Id: If0b092c5e18005fb4b8c1fd8405f4d666c98de5a
2017-11-15 02:35:18 +00:00
Treehugger Robot
dd5384a4fe Merge "Remove AutofillManagerClient after AutofillManager is finalized" 2017-11-15 02:23:27 +00:00
Xin Li
220871a697 Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.

Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7
Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
2017-11-14 12:31:11 -08:00
Niklas Brunlid
2ecbe69ddd Avoid overflow in focus fudge calculation
When comparing decoding the next View to get focus, the last-resort
calculation (magic number and square of distance between the View
corners) could overflow, giving a false positive. This causes the
focus to jump around in certain cases. Change from int to long to
avoid in the foreseeable future.

Test: Manual
- Use a phone with an 18:9 ratio (1080*2160)
- make FrameworksCoreTests
- adb install -r out/target/product/aurora/data/app/FrameworksCoreTests/FrameworksCoreTests.apk
- adb shell am instrument -r -w -e class android.widget.scroll.ScrollViewButtonsAndLabelsTest#testArrowScrollUpOffScreenVerticalFadingEdge com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I119cd66f563cfa312c2304bb910c27075e674e59
2017-11-14 10:17:56 +01:00
Koji Fukui
ccec6a6ae8 Remove AutofillManagerClient after AutofillManager is finalized
Symptom:
Global reference table overflow happens on system_server.

Root cause:
If a process repeatedly create a context and get AutofillManager
from the context, each BinderProxy of AutofillManagerClient are
registered to AutofillManagerServiceImpl. They aren't removed until
the process is died. BinderProxy consumes global reference and finally
causes crash on system_server.

Solution:
Remove AutofillManagerClient from AutofillManagerServiceImpl after
AutofillManager is finalized.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Bug: 68747744
Change-Id: I8b76c5368b54317b8696cac470cc390b36e910e7
2017-11-09 15:44:12 -08:00
Tetsutoki Shiozawa
978e7f87cc Fix: WindowManagerGlobal#setStoppedState failed by IOOBE
Symptom:
An application crashed due to IndexOutOfBoundsException.
The exception was thrown at WindowManagerGlobal#setStoppedState.

Root cause:
setStoppedState invokes setWindowStopped for each ViewRoot by
ascending order. If an application removes its view within the
loop, loop index exceeds the number of items.

Solution:
Loop in descending order.

Bug: 69018607
Change-Id: I7e20282dc99b767912be4e00d81ffb49fe6c7ac0
2017-11-08 16:46:09 +09:00
TreeHugger Robot
96da027196 Merge "DO NOT MERGE: Don't let keyguard to influence orientation when dismissing" into oc-mr1-dev 2017-10-16 18:56:49 +00:00
Andrii Kulian
9d588a7013 DO NOT MERGE: Don't let keyguard to influence orientation when dismissing
When keyguard is being dismissed it still was overriding orientation
for the display, which caused report of wrong configuration to
activity that was becoming visible.

Bug: 66979760
Bug: 36897968
Bug: 62796190
Bug: 62904487
Bug: 38494778
Test: Launch Unity 4 based game, lock and unlock screen, check UI
Test: com.android.server.wm.DisplayContentTests#testOrientationDefinedByKeyguard
Change-Id: I0a180b8e941a85ba4174a40cdec2ff0b8f3e00eb
2017-10-13 18:16:58 +00:00
Abodunrinwa Toki
ba60ab604c Flags to enable/disable smart selection in EditText
1. smart_selection_enabled_for_edit_text
   Disables smart selection for editable text.
2. smart_selection_dark_launch
   Dark launch TextClassifierImpl.suggestSelection(...)
   In this mode we run the method, but never change the user's
   selection to measure the quality of the results based on what
   the user actually wanted.

Bug: 65959640
Test: Manually tested flags turn on/off feature with 'adb shell
settings put global' and GServices override.
Test: bit FrameworksCoreTests:android.provider.SettingsBackupTest
Merged-In: Iacc561c8ee004b0123de66ad1ee06b1f56b4e4b4
Change-Id: Iacc561c8ee004b0123de66ad1ee06b1f56b4e4b4
2017-10-13 16:45:31 +01:00
Abodunrinwa Toki
d7a8103be1 DO NOT MERGE Turn off logcat logging for smart selection logs.
Bug: 64914512
Test: none
Change-Id: Ia85f021171a40ebc58bd98020626911961055302
2017-10-12 22:01:13 +01:00
Phil Weaver
9704426d14 Don't recycle replaced nodes in a11y cache
This is a patch for another bug. When the cache refreshes
nodes, it marks the transaction to bypass the cache. We
still, however, replace the cached node. If we recycle
the node as well, we end up refreshing it after it's been
recycled and end up with a sealed node in the cache. That
node can then be obtained and then throw an exception when
a setter is called. These exceptions are almost impossible
to debug.

I'm going to leave the bug open to roll this CL back and
fix the cache's behavior, but this fix seems safer this
late.

Bug: 35626351
Test: Ran a11y CTS and unit tests. Verified on instrumented
master build that the error indeed goes away. Removing one
line from unit tests that requires recycling.

Change-Id: Icc9a43ee49cf7c6bfa996839b35954faaf31621c
2017-10-11 15:51:33 -07:00
Felipe Leme
bb567ae6c0 Sets AutofillClient on attachBaseContext()
When an activity overrides attachBaseContext(), the attached context must share
the same AutofillCient, otherwise it will break autofill in the activity.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.AttachedContextActivityTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 67350639

Change-Id: I6b0c4c2fab5fa68eb6ee0714e107ca0816efb2cb
2017-10-04 12:23:23 -07:00
Phil Weaver
4dfeb4f0e4 Merge "Add null check in a11y callback" into oc-mr1-dev 2017-09-26 19:22:51 +00:00
TreeHugger Robot
8e5e30c5eb Merge "Hide autofill popup if anchor removed" into oc-mr1-dev 2017-09-25 22:24:25 +00:00
Jan Althaus
34aa294b96 Fixed bug in handling of OTHER as terminal
This bug resulted in a tap on a non-default action mode item to get logged
as OTHER, followed by ABANDON.

Bug: 64914512
Test: Manually tested that logs are correct.
Change-Id: I3cdba7ccff896939e22c567843f335c54d4a97f3
2017-09-25 09:56:21 +02:00
Svet Ganov
77150c5fbb Hide autofill popup if anchor removed
Test: Manual
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

bug:64601372

Change-Id: Ic55dabb99cd5015d318ab3be1231b6aa5c67294e
2017-09-23 10:13:06 -07:00
Phil Weaver
05a2982f0c Add null check in a11y callback
Bug: 65475473
Test: Verified it still builds
Change-Id: I9ad1249c44cb73153066f67164c90333779d284e
2017-09-22 20:09:14 +00:00
Felipe Leme
650f7abc3f Remove finished sessions on ACTION_CLOSE_SYSTEM_DIALOGS.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.SimpleSaveActivityTest#testTapHomeWhileSaveUiIsShowing
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.SimpleSaveActivityTest#testTapHomeWhileDatasetPickerUiIsShowing
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 65414762

Change-Id: I7dc9fd8f40341164e0ca320ff49b99cf8614fdbf
2017-09-20 17:19:29 -07:00
TreeHugger Robot
7a59a62276 Merge "Fix window visibility during layout" into oc-mr1-dev 2017-09-20 03:17:44 +00:00
TreeHugger Robot
2748ffcef7 Merge "Autofill optimization: don't contact server when session is finished." into oc-mr1-dev 2017-09-19 22:47:16 +00:00
Felipe Leme
c7b4529aa9 Autofill optimization: don't contact server when session is finished.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases
Bug: 65414762

Change-Id: I214a7835727c3ff71de9dc65c8d6fe54507265fb
2017-09-19 11:49:29 -07:00
TreeHugger Robot
d4f72ac3c4 Merge "Added more metrics for Autofill:" into oc-mr1-dev 2017-09-18 21:05:44 +00:00
Felipe Leme
f3d30a2139 Clarified how to set for autofill views representing creditcard expiration dates.
Test: mmm -j108 frameworks/base/:doc-comment-check-docs
Fixes: 65673410

Change-Id: I0ebf452dff401d0863d841d714fc1350f73c2542
2017-09-15 13:38:56 -07:00
Felipe Leme
b22d635dad Added more metrics for Autofill:
- AUTOFILL_VALUE_RESET
- FIELD_AUTOFILL_PREVIOUS_LENGTH
- AUTOFILL_DATASET_AUTHENTICATED
- AUTOFILL_INVALID_DATASET_AUTHENTICATION
- AUTOFILL_INVALID_AUTHENTICATION
- FIELD_AUTOFILL_SAVE_TYPE
- AUTOFILL_SAVE_CUSTOM_DESCRIPTION
- AUTOFILL_SAVE_CUSTOM_SUBTITLE
- AUTOFILL_SAVE_LINK_TAPPED
- AUTOFILL_SAVE_VALIDATION
- AUTOFILL_PENDING_SAVE_UI_OPERATION

Also tagged all metrics with FIELD_AUTOFILL_SERVICE, and added missing
package name on AUTOFILL_DATASET_APPLIED.

Test: CtsAutoFillServiceTestCases pass

Bug: 65118073
Bug: 65376559
Bug: 65697068

Change-Id: I678193c99d9d1b2dac56a62a88dcf20043d1b401
2017-09-15 13:08:24 -07:00
Jan Althaus
019389a638 New metrics fields for selection logs
Changes that affect logging:
- Switched to new category/actions/fields that are used exclusively by
  selection logging.
- Action types are now logged in the tron type (the information that was
  previously in the field could be derived from other fields).
- Entity types are now logged in the tron sub type.
- Delta time from previous event is now zero for first event (was time
  since epoch).
- The smart select model version is now written for all events after
  smart select has run. (i.e. better support for analysis based on
  terminal events alone)
- Restoring the logging removed in ag/2901629.

Internal only changes:
- Made debug statement conditional on DEBUG_LOG_ENABLED.
- Reduced logging tag length to fit into 23char limit.

Bug: 64914512
Test: Manually tested that logs are correct. Will follow up with automated tests.
Merged-In: If12daa2f206fb42be53587decbe2c4abfd689f41
Change-Id: Iec0f6cf1f9f2efdc8518133cf8551cd96b095ad8
2017-09-15 18:17:57 +02:00
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
Karthik Ravi Shankar
a59c3a5a3a Fix window visibility during layout
Avoid the conditional requestTransparentRegion() and make it more
precise in onAttachedToWindow().

Testing: 20 attempts to launch in TreasureHunt, never results in black
screen as compared to 2-3 attempts to get into black screen before.
Bug: 62235292

Suggested-By: racarr@google.com
Change-Id: If04c97670f24c10bf9e4ce95b9d33fb750053323
2017-09-11 17:38:57 -07: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