Commit Graph

10878 Commits

Author SHA1 Message Date
Svet Ganov
374cae1e61 Properly position dataset picker UI
Test: all autofill CTS tests pass

bug:37958210
bug:37986800

Change-Id: Ic2cb3b8c6762a922bdb7c632e451772b7a006739
2017-05-10 23:38:51 +00:00
Makoto Onuki
ca50e88b6b Merge "Tweak for b/37809561." into oc-dev 2017-05-10 22:20:34 +00:00
Adrian Roos
bafe438d71 Merge "AOD: Notification groups on Ambient Display" into oc-dev 2017-05-10 18:17:44 +00:00
TreeHugger Robot
e59c6ef346 Merge "Revert "Fixed placemente of Autofill UI for virtual views."" into oc-dev 2017-05-10 17:21:33 +00:00
Svet Ganov
a6de318604 Revert "Fixed placemente of Autofill UI for virtual views."
This reverts commit 4745fb6b29.

Change-Id: I07c108dc53d13ff6fdd16f8f486b35d8ca9a7c58
2017-05-10 08:16:02 -07:00
Bryce Lee
8a698a1721 Merge "Prevent non-fullscreen activities from influencing orientation" into oc-dev 2017-05-10 14:45:39 +00:00
Svetoslav Ganov
a9379d0b44 Allow null fill values to support authentication case
If a dataset needs to be authenticated the fill service
may not have the values but needs to tell the system for
which fields to show the fill UI. We now allow passing
a null value to mean the view is a part of the dataset
semantically but its value should remain unchanged.

If a dataset has no values, i.e. the related autofill ids
are mapped to null, we cannot properly filter. In this case
we always match such items regardless what the user typed.

While at this improved accessibility support for filtering
to announce when the number of items being filtered changes.

Also while at this allowed a dataset authentication to return
a response which replaces the current response and refreshes
the UI. Matching datasets with null values to any text plus
allowing a response to be returned from a dataset auth enables
the use case where there is always "Import" item at the
end of the list which when clicked can show arbitrarily more
data entries associated to other apps.

Another change is that we now provide the client state
bundle on both request and dataset auth.

Finally, this change gets rid of dataset waiting auth and
response waiting auth concepts since the reference to the
response and the dataset is piped with the auth request.

Fixed a bug where the width of the autofill UI was not
properly measured by going over all items in the adapter.
Now we measure enough height to fit the first three and the
width id the width of the widest item in the adapter.

Test: Added LoginActivityTest#testDatasetAuthTwoFieldsReplaceResponse
      Added LoginActivityTest#testDatasetAuthTwoFieldsNoValues
      Added LiginActivityTest#filterTextNullValuesAlwaysMatched
      All autofill CTS tests pass

bug:37724701
bug:37424539

Change-Id: Ic19e5d7cbdbb7d110c9e7da0ad60b540cbf1aecf
2017-05-09 17:40:28 -07:00
Adrian Roos
6f6e159484 AOD: Notification groups on Ambient Display
Bug: 36690937
Test: receive notification group on ambient display
Change-Id: I9dd91b85432e3d4309e0eb78a7b03ada87c3554e
2017-05-09 17:02:25 -07:00
Bryce Lee
3979159456 Prevent non-fullscreen activities from influencing orientation
This changelist enforces that activities targeting O and beyond
can only specify an orientation if they are fullscreen. The
change ignores the orientation on the server side and throws an
exception when the client has an orientation set in onCreate or
invokes Activity#setRequestedOrientation.

Fixes: 33483680
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerAppConfigurationTests#testNonFullscreenActivityProhibited
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerAppConfigurationTests#testLegacyNonFullscreenActivityPermitted
Change-Id: I4f7f79744918fad6465a537633dfadec8d05c6df
2017-05-09 16:13:51 -07:00
Makoto Onuki
08408b9338 Tweak for b/37809561.
From the WTF log we know Args.run() sometimes gets called multiple
times.

Remove the Runnable interface from the Args class to make it
impossible to cast it to Runnable.

If the WTF still happens with this change, that'd be *very* interesting.

Test: Build and boot
Bug: 37809561
Change-Id: Id4bd9bd8d4098086649235fddfc2136527805838
2017-05-09 14:10:16 -07:00
TreeHugger Robot
70c1e51bc1 Merge "Protect shared element transitions from removed views." into oc-dev 2017-05-09 17:22:16 +00:00
Rubin Xu
7cf5f74f3f Merge "Update SystemUpdatePolicy wording" into oc-dev 2017-05-09 11:49:00 +00:00
TreeHugger Robot
f512575c68 Merge changes I7c2c9411,Ibc72c84d,Ib3968644 into oc-dev
* changes:
  No need to deal with windowTokens
  Persistable accessibility ID from ContextWrappers
  Check callbacks when operting on UI
2017-05-09 01:49:58 +00:00
Selim Cinek
03fbdbe6ff Merge changes from topic 'background_inflation' into oc-dev
* changes:
  Fixed the contrast for low-priority notifications
  Moving Row inflation to the background too
  Moving the inflation to the background
2017-05-08 21:11:37 +00:00
Felipe Leme
370b040cf9 Merge "Fixed placemente of Autofill UI for virtual views." into oc-dev 2017-05-08 21:08:06 +00:00
Philip P. Moltmann
134cee27b8 No need to deal with windowTokens
we have a link to the client which is enough to find the views.

Also there was some cases where the windowToken was not updated
properly. This is moot now.

Also: Read a array of views from the client to speed up the
client<->AutofillManager communication.

Fixes: 38070352
Test: CtsAutoFillServiceTestCases
      1 Started autofill, saw fill UI
      2 Home button
      3 Kill activity in background
      4 Recents -> back to activity
      5 Saw fill UI restored
Change-Id: I7c2c9411204fa5d65867efae9b7296399121c3a2
2017-05-08 14:02:58 -07:00
TreeHugger Robot
bf34f4922d Merge "Do not call updateApplicationInfo with mResourceManager lock" into oc-dev 2017-05-08 18:10:16 +00:00
TreeHugger Robot
daefe1dcc7 Merge "Remove controller connection API" into oc-dev 2017-05-08 16:30:37 +00:00
Rubin Xu
59af7a82fa Update SystemUpdatePolicy wording
Make supporting security patch behaviour optional

Bug: 37266712
Test: make -j32 docs
Change-Id: Ied73b386396169d83bd152fcb882926f3222b599
2017-05-08 15:17:43 +01:00
Dianne Hackborn
1801f688b9 Merge "Fix issue #38037532: Toasts cause apps to become foreground" into oc-dev 2017-05-07 00:59:11 +00:00
TreeHugger Robot
d19113b390 Merge "Report less data in structure to autofill provider" into oc-dev 2017-05-06 02:07:59 +00:00
Jeff Sharkey
6f4aab2c01 Merge "Offer to wait until broadcasts have drained." into oc-dev 2017-05-06 01:58:12 +00:00
TreeHugger Robot
748405a0f5 Merge "Call ActivityManager to request activity relaunch" into oc-dev 2017-05-06 01:52:14 +00:00
Fyodor Kupolov
cb93d6ff06 Call ActivityManager to request activity relaunch
Instead of relaunching activity in-process, ask ActivityManager.
requestActivityRelaunch to relaunch it. It can make the correct
decision when activity needs to be relaunched.

Test: manual - switch between users to trigger ActivityThread.handleApplicationInfoChanged

Bug: 37992833
Bug: 37412579
Change-Id: I662a04e3cd82115a6008cef9308a2cf1038d51e1
2017-05-05 16:55:47 -07:00
Dianne Hackborn
f965f4038c Fix issue #38037532: Toasts cause apps to become foreground
ForegroundToken is now ImportanceToken, and doesn't actually
cause an app to become foreground (that is not needed for
toasts anyway).

Also improved output and logging -- new logs for changing
in key uid stats, and when force stopping services after a
uid goes idle.

Test: manual

Change-Id: I44dd391bb8d37857be1359f4b7021dc8d2cd0285
2017-05-05 23:39:19 +00:00
Fyodor Kupolov
b7865ce763 Do not call updateApplicationInfo with mResourceManager lock
Otherwise it may cause a deadlock due to reversed lock ordering.

Test: create guest/switch/remove
Change-Id: Id11263ee2d358ab97b212477f896db7313605448
Fixes: 37347817
2017-05-05 15:08:30 -07:00
TreeHugger Robot
c110c5edf4 Merge "Remove duplicated onBackStackChanged() call." into oc-dev 2017-05-05 21:43:04 +00:00
Philip P. Moltmann
c368a240c9 Report less data in structure to autofill provider
Fixes: 35899963
Test: CtsAutoFillServiceTestCases, CtsAccessibilityTestCases,
      CtsAccessibilityServiceTestCases
Change-Id: Ia7dba3e252e7678c033d67bcf653e592f3134304
2017-05-05 14:20:11 -07:00
Jeff Sharkey
fd65813157 Offer to wait until broadcasts have drained.
We've seen evidence of lab devices racing with other apps that are
using cache space immediately after tests wipe it clean, which can
cause test failures.  To mitigate this, try our best to wait for the
device to go "idle" by watching for broadcast queues to fully drain.

Also improve javadocs along the way.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 37486230, 37566983, 37913442, 37914374
Change-Id: I4d430db443b6fa6d33a625fe07b90279b5d51c12
2017-05-05 14:58:47 -06:00
Felipe Leme
4745fb6b29 Fixed placemente of Autofill UI for virtual views.
The PopupWindow anchoring offset should be based on the bottom of the anchor
view, but we were using top. Hence, the PopupWindow.tryFitVertical() was
failing to place it above the view in some cases, even when there was plenty
of space.

Fixes: 37991460
Test: manual verification with virtual view sample
Test: CtsAutoFillServiceTestCases pass

Change-Id: Iffdfe0d7858e865192338184d63bf5b93ba7108f
2017-05-05 08:31:38 -07:00
Dianne Hackborn
4ae51e09d8 All kinds of little foreground services fixes.
- Better explanations of some strings.
- Fix to use the right package when an item is pressed in
  the foreground services dialog.
- Improve java docs on Service.startForeground().

Bug: 37925387
    735566 lv - Android - [Source] Context unclear or missing:
    Apps running in background
Bug: 37925888
    735566 lv - Android - [Source] Context unclear or missing:
    Tap for details on battery and data usage
Bug: 37897953
    735566 gl - Android - [Source] Context unclear or missing:
    LEFT_SIDE, RIGHT_SIDE
Bug: 37943079
    Music is dying mid playback

Test: manual
Change-Id: Ied41932c61f59335bd18dfba3fcb13af28a0bddd
2017-05-04 23:31:33 -07:00
George Mount
e06b816e0e Protect shared element transitions from removed views.
Bug 37970839

When a view is removed from the hierarchy during the shared element
transition, it should not cause a NullPointerException.

Test: I524d99c7235e5888e5be2567c5410644e187b196
Change-Id: I59cadec15ae782c18d95923ceda9851827649341
2017-05-04 15:48:33 -07:00
Selim Cinek
ac5f02749a Fixed the contrast for low-priority notifications
The low priority notifications had their contrast calculated
against the white background and weren't satisfying
our contrast requirements.
This also aligns the case where the app had no colors better,
and ensures that it's actually using the secondary text
color there.

Test: existing tests pass
Change-Id: Ic11e9d06783e60998f35e0eb7f6f29fb1d86c7df
Fixes: 37444266
2017-05-04 15:30:33 -07:00
TreeHugger Robot
af4bfcdb7e Merge "Fix frozen alarm issue" into oc-dev 2017-05-04 21:12:39 +00:00
Daniel Nicoara
1336a806f9 Remove controller connection API
No longer need the proxy since VR Window Manager is in VrCore.

Bug: 36506799, 37542947
Test: Compiled and ran in VR on device.
Change-Id: Id5b5f34a1ad2b6da263527463d63777d40f18085
2017-05-04 16:42:34 -04:00
Winson Chung
c5e289d479 Merge "Workaround launching PiP task with CLEAR_TASK & NEW_TASK flag." into oc-dev 2017-05-04 16:16:33 +00:00
Makoto Onuki
a7d39cff96 Fix frozen alarm issue
Bug 34724174
Test: Manual test with "dumpsys alarm" + putting device into doze

Change-Id: I1d9ec3ac1e78ea263b2598a8c7ab4157ec40c535
2017-05-04 08:38:07 -07:00
Karthik Ravi Shankar
1d01f9cf67 Merge "Rename CompatibilityDisplay to Vr2dDisplay" into oc-dev 2017-05-04 05:17:17 +00:00
Karthik Ravi Shankar
2b9aaedf63 Rename CompatibilityDisplay to Vr2dDisplay
CompatibilityDisplay used for displaying 2D activities in Vr world. This
is confusing in more than one way. To clarify what it really means,
rename it to Vr2dDisplay.

Changes in this CL -

- /s/CompatibilityDisplay/Vr2dDisplay
- /s/Compatibility/Vr2d - in CompatibilityDisplay context.

Bug: 37851944
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
CtsServicesHostTestCases android.server.cts.ActivityManagerDisplayTests
passes on Marlin.

Change-Id: I0a442302fa9d0f48bbd0c01a7766b94369e04386
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
2017-05-03 22:16:02 -07:00
Siyamed Sinir
5073b91236 Merge "Don't copy NoCopySpans for assist and autofill" into oc-dev 2017-05-04 00:27:31 +00:00
TreeHugger Robot
246cc5bf51 Merge "Removed deprecated ViewStructure.setUrl() method." into oc-dev 2017-05-03 23:16:15 +00:00
Adrian Roos
37963d61b2 Merge "Notification: Remove actions from public view" into oc-dev 2017-05-03 21:11:41 +00:00
Winson Chung
e6385a23d7 Workaround launching PiP task with CLEAR_TASK & NEW_TASK flag.
- When launching an activity with CLEAR_TASK and NEW_TASK, the result code
  of the start is START_SUCCESS, but we still need to notify SystemUI to
  expand the PiP.  However, because the PiP transition now waits for the
  first draw, this can cause severe jank and delay if the original activity
  is a trampoline activity. As a workaround, we immediately move the task
  to the fullscreen stack when clearing and restarting the task to ensure
  that the new task shows without delay.

Bug: 37501224
Test: Open YT in PIP, launch sub-shortcut from Home

Change-Id: I16bebf19b082f30695e99da1d93bc4adf5e9df0c
2017-05-03 12:04:27 -07:00
Ben Lin
d6bfaba59c Merge "Remove snippet regarding ContentProvider#notifyChange in documentation." into oc-dev 2017-05-03 02:25:08 +00:00
Adrian Roos
b19b06b64c Notification: Remove actions from public view
Change-Id: I9d95e2ea3ff89110f58f6d5585771ad301494e41
Test: Turn on "hide sensitive notifications on lockscreen", receive notification, make sure it has no actions
Fixes: 37907366
2017-05-02 19:17:30 -07:00
TreeHugger Robot
e497b698d2 Merge "Add more information to WTF to investigate bug 37809561" into oc-dev 2017-05-02 23:51:37 +00:00
Winson Chung
ca754789c1 Restoring old methods for compatibility.
Bug: 37637423
Test: Build and test PIP apps
Change-Id: I9ccb49a3e42de55a249ab54bde2f3c5a1c179c1c
2017-05-02 15:18:23 -07:00
Ben Lin
dac516ef32 Remove snippet regarding ContentProvider#notifyChange in documentation.
For ContentProvider and DocumentsProvider, throwing an exception in
their query methods will result in no Cursor returned to the remote
side. Without a cursor, there is no way to listen in on changes.
Removing the part regarding notifyChange since there's no established
paradigm on which URI to listen/notify changes on.

Test: Documentation change only.
Bug: 37876119
Change-Id: I0739794a1e8182918758ba953251ed9a3268f227
2017-05-02 13:35:13 -07:00
Felipe Leme
a8fce3b29e Don't copy NoCopySpans for assist and autofill
For AssistStructure, and AutofillValue, create a copy of the text in 
setText and forText methods if it is a Spanned.

Fixes: 36838999
Test: cts-tradefed run cts -m CtsAutoFillServiceTestCases
Test: cts-tradefed run cts -m CtsAssistTestCases
Test: cts-tradefed run cts --test android.widget.cts.TextViewTest -m \
      CtsWidgetTestCases

Change-Id: I52e780fa9baa17c375d3945dc714171f41fd7db5
2017-05-02 13:33:07 -07:00
Makoto Onuki
f3bb6f31f4 Add more information to WTF to investigate bug 37809561
Bug 37809561
Test: Build & boot -- didn't actually exercise the WTF case but it should work
since getStackTraceString accepts null too.

Change-Id: Iabfbe1fcde293fec919c65df7ea9650e1b247b9a
2017-05-02 12:02:23 -07:00