Commit Graph

10904 Commits

Author SHA1 Message Date
Dianne Hackborn
8b4c4f09f6 Merge "Fix issue #37360626: Apps can schedule alarms (and other things) with temp whitelist" into oc-dev
am: c3b938ca5e

Change-Id: I585bf57074064761c7d216f05be23d7f044208fa
2017-05-11 18:45:00 +00:00
Dianne Hackborn
c3b938ca5e Merge "Fix issue #37360626: Apps can schedule alarms (and other things) with temp whitelist" into oc-dev 2017-05-11 18:28:46 +00:00
Svet Ganov
d0bfa95b4c Merge "Properly position dataset picker UI" into oc-dev
am: d915aecfaa

Change-Id: Ic480311a515e5a096f6b62319d677a07dd22c391
2017-05-11 02:48:46 +00:00
Dianne Hackborn
983055231b Fix issue #37360626: Apps can schedule alarms (and other things) with temp whitelist
There is now an IBinder "token" that must be specified when setting
the whitelist duration for an Intent.  To have the whitelist supplied,
the caller to send a PendingIntent must pass in the same token.  The
PendingIntent and IntentSender classes now internally maintain this token
to pass in when their send() is called.

The big complexity for making this work is we now need to associate this
whitelist token correctly with the actual PendingIntent objects that
applications and other code is getting.  To do this, we propagate the
token in the Notification object, and have a new API on Parcel that allows
us to make it available to PendingIntent when it is unmarshalled.  And
this allows to deal with PendingIntents appearing in nested bundles, as
we can propagate that information from the original Parcel to the new
Parcel that Bundle keeps to delay unmarshalling.

Test: manual
Change-Id: Idda00490ccfe2be37e4ab21354b9ab7528a52750
2017-05-10 17:23:02 -07:00
Makoto Onuki
07db193ebc Merge "Tweak for b/37809561." into oc-dev
am: ca50e88b6b

Change-Id: I7ecbf3e077cdd9b06e9c1a13455c572c6f21c00e
2017-05-11 00:04:14 +00:00
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
Adrian Roos
ec9559ddc6 Merge "AOD: Notification groups on Ambient Display" into oc-dev
am: bafe438d71

Change-Id: I159e4543f15c5d2f89bbfee10f77ed33aaaad7a7
2017-05-10 22:55:58 +00:00
Makoto Onuki
ca50e88b6b Merge "Tweak for b/37809561." into oc-dev 2017-05-10 22:20:34 +00:00
Svet Ganov
c911e0e76f Merge "Revert "Fixed placemente of Autofill UI for virtual views."" into oc-dev
am: e59c6ef346

Change-Id: I3c615043966131d206967bbb7d230af9b6652f47
2017-05-10 22:09:50 +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
537ece988a Merge "Prevent non-fullscreen activities from influencing orientation" into oc-dev
am: 8a698a1721

Change-Id: I7dd30182184fc5ce6ec5e9750eaa26f174b79b38
2017-05-10 15:04:05 +00: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
0e4f1bab09 Merge "Allow null fill values to support authentication case" into oc-dev
am: 90bcc1c8bc

Change-Id: Ic065135e2812818ac90e814d5759f343eed6d862
2017-05-10 06:27:07 +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
George Mount
817d37c154 Merge "Protect shared element transitions from removed views." into oc-dev
am: 70c1e51bc1

Change-Id: Ibd68e64eef362e02ad2764024f8fbed99c59afd3
2017-05-09 19:49:19 +00: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
0311911b9e Merge "Update SystemUpdatePolicy wording" into oc-dev
am: 7cf5f74f3f

Change-Id: Ifac890402f5f352d00ccb5eb3809b67a125d2b24
2017-05-09 11:57:57 +00:00
Rubin Xu
7cf5f74f3f Merge "Update SystemUpdatePolicy wording" into oc-dev 2017-05-09 11:49:00 +00:00
Philip P. Moltmann
169989822e Merge changes I7c2c9411,Ibc72c84d,Ib3968644 into oc-dev
am: f512575c68

Change-Id: I590a658c92ad271c7b4f18f5768c1a4e581ffe94
2017-05-09 02:05:24 +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
cc360f9b69 Merge changes from topic 'background_inflation' into oc-dev
am: 03fbdbe6ff

Change-Id: I1848e1f5a1ec5f9785872690b4d653afd590399f
2017-05-08 21:37:31 +00:00
Felipe Leme
e6342dcecc Merge "Fixed placemente of Autofill UI for virtual views." into oc-dev
am: 370b040cf9

Change-Id: I3741b0ef8893eb660230698432c7d316995642b8
2017-05-08 21:24:48 +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
Fyodor Kupolov
4b00db5492 Merge "Do not call updateApplicationInfo with mResourceManager lock" into oc-dev
am: bf34f4922d

Change-Id: Id7ccea22af67938883995a37c0acc054d9751aad
2017-05-08 18:18:00 +00:00
TreeHugger Robot
bf34f4922d Merge "Do not call updateApplicationInfo with mResourceManager lock" into oc-dev 2017-05-08 18:10:16 +00:00
Daniel Nicoara
41950bc2c6 Merge "Remove controller connection API" into oc-dev
am: daefe1dcc7

Change-Id: Ic46c8ed4e41b80927f74b2fa96ed997f6b581134
2017-05-08 16:38:56 +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
1d1a8c512c Merge "Fix issue #38037532: Toasts cause apps to become foreground" into oc-dev
am: 1801f688b9

Change-Id: Ib812e0357e50b5af010552d0ef18d27e071370b2
2017-05-07 01:07:41 +00: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
Philip P. Moltmann
889b15b4c2 Merge "Report less data in structure to autofill provider" into oc-dev
am: d19113b390

Change-Id: I492245dee87450b1b54fef2c06c600ac290adffe
2017-05-06 02:19:39 +00:00
Jeff Sharkey
8c921a8f14 Merge "Offer to wait until broadcasts have drained." into oc-dev
am: 6f4aab2c01

Change-Id: Id6045353ed2293ece7ecdb7697904fa7993a7ed3
2017-05-06 02:08:27 +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
Fyodor Kupolov
f9c94ddef7 Merge "Call ActivityManager to request activity relaunch" into oc-dev
am: 748405a0f5

Change-Id: I2780805663b223d82b1b7d3582ae5850c30c7b7d
2017-05-06 02:06:04 +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
George Mount
277e42ffdb Merge "Remove duplicated onBackStackChanged() call." into oc-dev
am: c110c5edf4

Change-Id: Iab69422e0f47c2f7bf83664948dc6accee7da52f
2017-05-05 21:53:54 +00: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