Commit Graph

10392 Commits

Author SHA1 Message Date
Felipe Leme
f04ea961a0 Merge "Remove finished sessions on ACTION_CLOSE_SYSTEM_DIALOGS." into oc-mr1-dev am: 56e5c3944b
am: 64a6188032

Change-Id: I568c3a67d43b0a1eb1af4350f523ba291c5ea9f2
2017-09-21 17:14:41 +00:00
Karthik Ravi Shankar
896564bef1 Merge "Fix window visibility during layout" into oc-mr1-dev am: 7a59a62276
am: 11f25ba1a0

Change-Id: I3620a51554e6e8101d5a013f9287339bb1031806
2017-09-21 01:38:23 +00:00
TreeHugger Robot
e551ca7751 Merge "Changed reparentChild method name to reparent." 2017-09-21 01:04:06 +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
chaviw
7643140c7c Changed reparentChild method name to reparent.
The native reparentChild was changed to reparent to represent that the
current layer is getting re-parented. Updated the jni and Java code to
reflect that.

Test: Device boots

Change-Id: I390d2efba61c626f2162f75f650700d53ab178a5
2017-09-20 17:35:43 +02:00
TreeHugger Robot
7a59a62276 Merge "Fix window visibility during layout" into oc-mr1-dev 2017-09-20 03:17:44 +00:00
Felipe Leme
204605d891 Merge "Autofill optimization: don't contact server when session is finished." into oc-mr1-dev am: 2748ffcef7
am: 667fb12d37

Change-Id: Ib4d8b85be3d38131d606569913939d10199c63f7
2017-09-19 23:12: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
096a47d59f Merge "Improve WMP dumpsys readability." 2017-09-19 14:36:52 +00:00
Felipe Leme
f60da8690f Merge "Added more metrics for Autofill:" into oc-mr1-dev am: d4f72ac3c4
am: b093daa296

Change-Id: Iae09ba2c6a082b87b74bd05320222955bde30dda
2017-09-18 21:26:55 +00:00
TreeHugger Robot
d4f72ac3c4 Merge "Added more metrics for Autofill:" into oc-mr1-dev 2017-09-18 21:05:44 +00:00
Felipe Leme
cbb7bc1511 Merge "Merge "Clarified how to set for autofill views representing creditcard expiration dates." into oc-mr1-dev am: daf9b2ee15" into oc-mr1-dev-plus-aosp
am: 606f2d1b93

Change-Id: I704f41d28f27c6c1559ab778cd49c35169995fc5
2017-09-18 20:37:44 +00:00
Michael Wright
1985976b66 Improve WMP dumpsys readability.
It's hard enough to read bugreports without having to decipher all of
the various IntDef's littered around; let's go ahead and just translate
them to something readable.

Bug: 65563703
Test: adb shell dumpsys window policy
Change-Id: Iea6cd309eb3411a65e54217fef814a66107a8e31
2017-09-18 21:21:47 +01: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
TreeHugger Robot
a2dfc3cc68 Merge "New metrics fields for selection logs" 2017-09-15 15:54:59 +00:00
Clara Bayarri
d8c5e7fc41 Fix hint text updates in Extracted text mode
Updates to the hint on a TextView were not notified to the
ExtractEditText, so there was no way it could know to update.
This change pipes through the hint value when the extracted
mode becomes visible and informs it of changes.

The Editor#reportExtractedText method has been refactored to
be more readable. Note that checks on whether the content
changed are done in the two places in the code that already
called this method, and we explicitely don't want to check
contents when there is a hint change.

Bug: 63980155
Bug: 65691495
Test: bit CtsWidgetTestCases:.TextViewTest
Change-Id: I357dd5c74b61d149cf8612d1f52c7118ec70c696
2017-09-15 12:19:29 +01:00
Jan Althaus
786a39dfa5 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.
Change-Id: If12daa2f206fb42be53587decbe2c4abfd689f41
2017-09-15 10:41:16 +02:00
Jan Althaus
eb59c45ae4 Removing redundant setTimestamp call
As per the documentation, client supplied values are ignored and the timestamp is set when the log is persisted.
This is purely a cosmetic cleanup and doesn't change behaviour.

Bug: 64914512
Test: Confirmed in MetricsReader impl that timestamp is overridden, and tested logcat output for regressions.
Change-Id: Ia7db6410f82f08fe501607def0a87925a6aa9329
2017-09-15 09:25:41 +02:00
Jan Althaus
bed836cba2 Change default smart select range for logging to [0,0] am: ec3ded8686
am: 654d8a3e6a

Change-Id: Ifeda15bfa4e9de38a95588b3b07754815637e8ab
2017-09-15 04:37:43 +00: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
TreeHugger Robot
33e9e7d5e6 Merge "Fix smart selection logging bugs." 2017-09-12 11:00:04 +00: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
a0cff8b547 Merge "Fixed some small keyboard nav bugs (TabHost, directional focus)" into oc-mr1-dev am: c8b91ecbae
am: 2e7e7a9960

Change-Id: I4843d0b8409909d9b0c1af2950321918adc722bb
2017-09-11 21:24:01 +00: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
Abodunrinwa Toki
d62a86e64c 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.
Change-Id: Ib73b52ebce999f2cb6e5734e556cd09e47c89a29
2017-09-11 18:23:44 +01:00
Yohei Yukawa
e1ca7f2056 Merge "Revert "Remove a compat hack SurfaceView#setWindowType()"" into oc-mr1-dev am: a729236399
am: b0b685bab7

Change-Id: I3a5278b423544fc1f64f4c3424ea67899d4d5975
2017-09-11 15:59:47 +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
a9910648ab Merge "Make ASSIST launch VIS and add a new keycode for TV (ALL_APPS)" into oc-mr1-dev am: 224e2daf5b
am: 399f9b83bc

Change-Id: Id751e4685687b4fa87adf72255d1bcbc76bb38ae
2017-09-08 04:48:12 +00: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
Felipe Leme
072d18b6f7 Documented use of AutofillManager.notifyViewVisibilityChanged()
Test: mmm -j108 frameworks/base/:doc-comment-check-docs
Bug: 38509603

Change-Id: I83c7089b071a82b7d887cb48c18683b671b0c4d6
2017-08-31 14:05:22 -07:00
Abodunrinwa Toki
8a9866298d Merge "Introduce SmartSelectionEventTracker." into oc-mr1-dev am: 16da1f545c
am: f44588afb1

Change-Id: I3fcbd9d99c844068ec793c4f80319b85a9f90043
2017-08-30 23:18:13 +00:00
Jorim Jaggi
11b58a917c Add theme attribute for light navigation bar
Such that apps can set this in the theme and get a splash screen
that has a light navigation bar if requested.

Test: LightBarThemeTest
Change-Id: Iee93c49743f66ecad76e0a056ba16a1785f22784
Fixes: 62429332
2017-08-30 15:37:19 +02: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
Evan Rosky
3b322865f6 Merge "Merge "Clear focused-in-cluster on focusability changes" into oc-mr1-dev am: 102520f88e" into oc-mr1-dev-plus-aosp
am: 2af6037836

Change-Id: Ie1622654c6e295daed8ad0a08d04d1f554c33354
2017-08-30 00:23:53 +00: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
f3ee0b4c84 Merge "Hides the Save UI while handling a pending intent from CustomDescription." into oc-mr1-dev am: 55309e79cf
am: 1f9f8597e9

Change-Id: Ie57ae681b0068f4b060aa1a8c87c92cb511ca9ed
2017-08-29 03:38:45 +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
TreeHugger Robot
2e41218797 Merge "Adding group divider support in Android Menus" 2017-08-25 23:33:17 +00:00
Felipe Leme
eefedbaf5b Merge "Merge "Clarified that getAutofillValue() must return same value passed to autofill()." into oc-dev am: 7d29b6f2df am: da31220015 am: d29128d699" into oc-mr1-dev-plus-aosp
am: 08a6dde180

Change-Id: If13789fd96dde6ded9c32eabfcb62e29facd3673
2017-08-25 22:35:00 +00:00
Felipe Leme
8c9167565b Merge "Clarified that getAutofillValue() must return same value passed to autofill()." into oc-dev am: 7d29b6f2df am: da31220015
am: d29128d699

Change-Id: If8eae5bc9f2985c913179b2fc881d7bf03510276
2017-08-25 22:05:01 +00: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
Tarun Lohani
0b842b465e Adding group divider support in Android Menus
Added a divider view in popup_menu_item_layout.
Hiding divider where they are not required in MenuAdapter.

Bug: 32172964
Test: Added test method testGroupDividerEnabledAPI to PopupMenuTest.java
Change-Id: I9cf0e9a72f085336e9f136a7ed17aead0e30760c
2017-08-25 20:18:11 +00:00