Commit Graph

13488 Commits

Author SHA1 Message Date
Kevin Chyn
f67a780c33 Merge "[DO NOT MERGE] Add sysUiSessionId between BiometricService and AuthController" into rvc-dev 2020-05-07 23:22:02 +00:00
Kevin Chyn
fa7069d83c [DO NOT MERGE] Add sysUiSessionId between BiometricService and AuthController
Bug: 155420058

Test: BiometricPromptDemo, inspect logs

Change-Id: I47cffa4e8acb1e5f098572d26e47882ff5e9be26
2020-05-07 14:06:57 -07:00
Matt Pietal
2f16758a0a Merge "Sharesheet/Resolver a11y adjustments" into rvc-dev 2020-05-07 11:38:59 +00:00
Antoan Angelov
afbd12c4ed Merge "Fix sharesheet scroll jankiness." into rvc-dev 2020-05-07 10:56:05 +00:00
Feng Cao
254545cae5 Merge "Support re-attaching the inline suggestion view to window" into rvc-dev 2020-05-07 05:23:15 +00:00
Feng Cao
b46851c964 Support re-attaching the inline suggestion view to window
* Before this change, when the inline suggestion view is detached from
  the IME window (e.g. due to layout change), the remote view content
  will not show again even after the view is reattached to the window
  on the IME side. This patch fixes it by requesting the remote view
  owner (the ext services) for a new SurfacePackage when the view is
  re-attached to the window (see javadoc of SurfaceControlViewHost for
  why this works).
* This patch also fixes the issue where the SurfaceControlViewHost was
  never released in the ext services. This is done by notifying the
  ext services (through system server) when the view is detached from
  the IME window, and then the system server will release the
  SurfaceControlViewHost if after N(=500) ms the view is not re-attached
  to a window.
* After the SurfaceControlViewHost is released, if the view is
  re-attached to the window later, a new SurfaceControlViewHost will be
  created to back the same InlineContentView.
* The current code structure also lays a foundation for a subsequent
  change to allow reusing the same remote view for inline suggestions
  during filtering.

Test: atest CtsAutofillServiceTestCases (sanity test)

Bug: 153615023
Bug: 154683107

Change-Id: Idc587e1e82a96b792c351796464821b7aad7cd89
2020-05-06 19:30:39 -07:00
Ben Lin
c43997ba15 Merge "Enforce max size for resizing operations." into rvc-dev 2020-05-06 21:17:02 +00:00
Matt Pietal
877b5ec262 Sharesheet/Resolver a11y adjustments
1. Announce app name with direct share targets
2. Don't speak 'heading' in direct share rows
3. Don't close resolver/sharesheet when swiping left
4. Talkback will announce # of rows and columns for sharesheet

Fixes: 141908464
Fixes: 155153657
Fixes: 151897812
Fixes: 149437892
Fixes: 80319063
Test: talkback
Change-Id: I16586208407ba56814d3cf69648e660bded72ccf
2020-05-06 15:27:54 -04:00
Song Hu
f52438f9a2 Merge "Send onCreatePredictionSession, sortAppTargets, requestPredictionUpdate immediately instead of sending them to main thread Looper queue of ChooserActivity." into rvc-dev 2020-05-06 19:03:46 +00:00
Song Hu
d52863d12b Send onCreatePredictionSession, sortAppTargets, requestPredictionUpdate
immediately instead of sending them to main thread Looper queue of
ChooserActivity.

These methods are relatively latency-sensitive. When main thread Looper queue has many backlogs, it takes long time
to dispatch requests.

Bug: 155551642
Test: atest CtsSharesheetTestCases:android.sharesheet.cts.CtsSharesheetDeviceTest
Test: manually test on the device
Change-Id: I7d00e49c6a30fec478e620bc98180d379f801fc8
2020-05-06 10:17:29 -07:00
arangelov
706316db0f Fix sharesheet scroll jankiness.
This CL makes the following changes:
1. Cache the itemViewType in the ViewHolder, so that we don't
have to call it again from onBindViewHolder
2. Cache the result of shouldDisplayLandscape to reduce the
number of IPC calls while scrolling the list, as this is called
indirectly by the ChooserGridAdapter's getRowCount and
getItemCount. It calls Activity#isInMultiWindowMode which makes
an IPC call to the ActivityTaskManager.
3. Cache the work profile user handle to reduce the number of
IPC calls while scrolling the list, as this is called
indirectly by ChooserGridAdapter's getRowCount and getItemCount.

Test: atest ChooserActivityTest
Test: atest ResolverActivityTest
Test: manually verify there is no jankiness when scrolling
Test: manually change orientation between portrait and
landscape to make sure screen orientation cache gets invalidated
Test: launched share sheet in multi-window mode and then removed
one window - sharesheet properly updated its views
Fixes: 151117747
Fixes: 154766645

Change-Id: Ib8e329b534f3de1d4906f6a07908cc7879dcaa47
2020-05-06 16:35:16 +01:00
Antoan Angelov
950aca5795 Merge "Use intent resolver strings for sharesheet when picking intent" into rvc-dev 2020-05-06 14:23:13 +00:00
Song Hu
efa0eab058 Merge "Enable ChooserTarget ranking of the same app." into rvc-dev 2020-05-06 00:02:06 +00:00
Song Hu
60c131e869 Enable ChooserTarget ranking of the same app.
Bug: 151112858
Test: atest CtsSharesheetTestCases:android.sharesheet.cts.CtsSharesheetDeviceTest
Change-Id: If5a4edfec7116cd54ed0ae6543cab0beb011f987
2020-05-05 10:27:52 -07:00
Collin Fijalkovich
a131a0c64f Merge changes from topic "rvc-telephony-caching" into rvc-dev
* changes:
  Cache getPhoneId and getSlotIndex binder calls.
  Refactor SubscriptionManager caching code
  Cache getDefaultSmsSubscriptionId Binder calls
  Cache getActiveDataSubscriptionId Binder calls
2020-05-05 16:30:39 +00:00
Kholoud Mohamed
d4d2427c01 Merge "Fix bug in IntentForwarderActivity" into rvc-dev 2020-05-05 13:37:54 +00:00
kholoud mohamed
06335279aa Fix bug in IntentForwarderActivity
Bug: 155096621
Test: atest com.android.cts.devicepolicy.ManagedProfileCrossProfileTest#testCrossProfileIntentFilters
Test: atest IntentForwarderActivityTest
Test: atest ResolverActivityTest
Test: atest ChooserActivityTest
Change-Id: Ieb99f566fa9cfc14254fecfa5897d421fd39482f
2020-05-05 09:56:07 +00:00
Jing Ji
e9fbacf6c5 Merge "Support to pull aggregated procstats associations" into rvc-dev 2020-05-05 01:05:47 +00:00
Adam Bookatz
316bc6ff66 Merge "Listener to watch op starts" into rvc-dev 2020-05-05 00:52:12 +00:00
Yuncheol Heo
8f4363a226 Merge changes from topic "immersive" into rvc-dev
* changes:
  Add test api getStatus/NavigationBarBackgroundView.
  Notify the visibility change to update color views without control.
2020-05-05 00:14:09 +00:00
Adam Bookatz
182862e595 Listener to watch op starts
Currently, there is
onOpNoted - tells listeners that noteOp has occurred
onOpActiveChanged - tells listeners that an op's 'active' state has
changed, i.e. that a successfull startOp or stopOp has happened

There was, however, no way of telling a listener that a startOp has
happened (regardless of whether it was successful). This cl introduces
it, via a OnOpStartedListener.

This is required by the ForegroundServiceAppOpSessionEnded atom,
which counts the number of accepted vs. rejected attempts, and
therefore also needs to know when a rejected start happened.

This cl also contains some cosmetic moving of code so that
startOperation() and noteOperationImpl() are almost
exactly parallel.

* Also *
This cl fixes a bug I discovered in stopWatchingNoted, in which
the callback wasn't fully removed. Consequently, if a callback
was unregistered and then re-registered, the re-registration would
mistakingly be ignored (in direct contradiction to the javadoc).

Test: atest UidAtomTests#testForegroundServiceAccessAppOp
Test: atest AppOpsStartedWatcherTest AppOpsActiveWatcherTest AppOpsNotedWatcherTest
Test: manually monitor: adb shell cmd stats print-logs && adb logcat -v uid -s statsd | grep "statsd  : {" | egrep '\(256\)'
Bug: 152800926
Change-Id: Icdb9edf6b2b7c5807b339c1aabb32e882190b071
2020-05-04 21:59:29 +00:00
Yuncheol Heo
70c4bb9007 Add test api getStatus/NavigationBarBackgroundView.
Introduces new test api to access the background view of status bar and
navigation bar.

Bug: 154720832
Test: atest WindowInsetsPolicyTest

Change-Id: If38d3f57edfbb2631d4c1e47ed5347a332edacfb
2020-05-04 14:36:43 -07:00
Jing Ji
060d68630d Support to pull aggregated procstats associations
Bug: 145203981
Test: b/152397079#comment12
Test: atest CtsStatsdHostTestCases
Change-Id: If5b9723a41a9d2eefc2cb132b3a3bf16f57872e9
2020-05-04 14:33:06 -07:00
Song Hu
4a9bd0da70 Merge "Pass ChooserTarget sharing and impression info to AppPredictor. Rank ChooserTargets of the same component as per available scores returned by AppPredictor. These two features are guarded by flag "mChooserTargetRankingEnabled" Add relevant logging to make it easy to figure out root cause from bug report." into rvc-dev 2020-05-04 16:39:00 +00:00
Song Hu
5aab2d3fbe Pass ChooserTarget sharing and impression info to AppPredictor.
Rank ChooserTargets of the same component as per available scores returned by AppPredictor.
These two features are guarded by flag "mChooserTargetRankingEnabled"
Add relevant logging to make it easy to figure out root cause from bug report.

Bug: 151112858
Test: atest CtsSharesheetTestCases:android.sharesheet.cts.CtsSharesheetDeviceTest
Change-Id: Id8c4b373ba9e2e1ae29281791e49dde8722ba9d1
2020-05-03 15:17:54 -07:00
Winson Chung
4ef84183e7 Account for getDimension() also doing a pixel conversion
Change-Id: Ie35eb98d6063a0747851e06f6da17b86ede19b41
Bug: 148104018
Test: Ensure edge swipe thresholds match resources
2020-05-01 15:24:49 -07:00
arangelov
993d63b339 Use intent resolver strings for sharesheet when picking intent
Fixes: 154290625
Test: manual
Test: atest ChooserActivityTest
Test: atest ResolverActivityTest
Change-Id: Ibf28daaf42859df2d9093e871c102d0a327231f2
2020-05-01 15:32:57 +01:00
Rubin Xu
bc7d9bdd5a Merge "Refresh strong auth alarm when admin changes policy" into rvc-dev 2020-05-01 10:14:28 +00:00
Ben Lin
d14589e051 Enforce max size for resizing operations.
Previously, maxVisibleSize is only enforced when we want to preserve
orientation. However, we should enforce it when in complete freeform
also.

Even for preserve orientation case, since it calculates two possible
rectangles and grab the bigger one if it's a grow operation, it's
possible the bigger rectangle is beyond the max possible size. By
setting the limitations early, this will no longer happen.

Bug: 154936459
Bug: 155433395
Test: Drag-resize a window that has a max size set (PIP window), and now
it is properly constrained.
Test: atest TaskPositionerTests

Change-Id: I3e9bc615554561e035a5c7110d0400687c6ba365
2020-04-30 16:32:24 -07:00
Maryam
a142e5210b Add Flags to be able to run experiments for the Back Gesture Problem.
Test: manual atest, adb shell device_config put systemui back_gesture_bottom_height 1000
Bug: 148104018
Change-Id: I5b0e696ca2e015d2d9a1718785f4a140cfff083f
2020-04-30 16:23:43 +00:00
Yunfan Chen
9f804f7593 Merge "Report caption insets change when layout" into rvc-dev 2020-04-30 04:43:47 +00:00
Rubin Xu
9e765abc56 Refresh strong auth alarm when admin changes policy
When admin sets a new strong auth timeout policy, replace the existing
alarm (which enforces strong auth after the timeout) with a new one
with updated timeout.

Bug: 146188984
Test: atest com.android.server.locksettings.LockSettingsStrongAuthTest
Test: atest MixedManagedProfileTest#testRequiredStrongAuthTimeout
Change-Id: Ibcc13eb0d66697aff44192769b8fd817ca6800b8
2020-04-29 16:00:04 +01:00
PETER LIANG
c463e56a80 Merge "Replace the switch item with the text for multiple shortcut menu." into rvc-dev 2020-04-29 04:08:36 +00:00
Collin Fijalkovich
41f94629c9 Cache getPhoneId and getSlotIndex binder calls.
Use PropertyInvalidatedCache to avoid redundant calls to
SubscriptionController getSlotIndex and getPhoneId.
Bug: 151953109
Test: Verified cache operated correctly when phone process is killed.
Test: atest SubscriptionControllerTest
Test: atest android.telephony.cts.SubscriptionManagerTest

Change-Id: I70552537af44f3e05b156cd190ebb28f0d940bf6
2020-04-28 16:30:40 -07:00
Jeffrey Huang
144788b5bb Merge "Update process_state_changed logging" into rvc-dev 2020-04-28 22:56:29 +00:00
Jeffrey Huang
419197630e Update process_state_changed logging
Log only the parent state to avoid unnecessary process states from being
sent to statsd. This may not work for all cases, but the edge cases can
be revisited later.

Bug: 135965535
Bug: 135375287
Test: manually tested using chrome
Change-Id: I87b79f5d21f186f227a5a50bbe83b56a9105348c
2020-04-28 13:48:06 -07:00
TreeHugger Robot
bc000662c3 Merge "Fix a bug in InlinePresentationStyleUtils#bundleEquals" into rvc-dev 2020-04-28 20:17:02 +00:00
TreeHugger Robot
04ccfdfae7 Merge "Don't pass initial intents to the inactive profile." into rvc-dev 2020-04-28 19:19:17 +00:00
TreeHugger Robot
821b7f21b0 Merge "Move conversation app name into header" into rvc-dev 2020-04-28 18:51:35 +00:00
Feng Cao
ca8cf2776d Fix a bug in InlinePresentationStyleUtils#bundleEquals
* before the fix, the method would return false if the two bundles both
  contains a nested bundle for the same key, and the nested bundles are
  equal. i.e. the test case
  InlinePresentationStyleUtilsTest#testBundleEquals_nestedBundle_equal
  would fail.

Test: atest InlinePresentationStyleUtilsTest
Bug: 154957669

Change-Id: Ia2cf682619fa245d846972a8683d03333551df78
2020-04-28 11:27:59 -07:00
arangelov
acc8243564 Don't pass initial intents to the inactive profile.
Otherwise the initial intents will be shown in the other
profile as share targets. This would cause a crash when
the user selects the app, as the activity cannot
be resolved.

Fixes: 155088755
Test: manual
Test: atest ChooserActivityTest
Test: atest ResolverActivityTest
Change-Id: I0604c15c35ecddf163460286b84c27daf6ca9a5b
2020-04-28 18:52:54 +01:00
TreeHugger Robot
8862ee3891 Merge "Only perform autolaunch if list has completely rebuilt" into rvc-dev 2020-04-28 13:59:33 +00:00
arangelov
1b11cc1a17 Only perform autolaunch if list has completely rebuilt
Previously we would check for autolaunch the first time
onPostListReady is called, but that is too early in the case
when we start the async task for sorting the targets. In
that case onPostListReady is called twice - once before
task is launched, and once after task is finished.

We fix this by passing the rebuildListCompleted parameter to
the onPostListReady callback and use it to check for autolaunch.

Test: atest ChooserActivity
Test: atest ResolverActivity
Test: manual
Fixes: 154728817
Change-Id: Ib1b049af00d791898b908bdb65971c07c558f3ac
2020-04-28 12:59:18 +01:00
Yunfan Chen
a07fb93cb0 Report caption insets change when layout
This patch let DecorCaptionView report back to it's owner about height
change, instead of let the DecorView query the height. The previous
query points enableCaption() and updateDecorCaptionStatus() cannot
ensure the caption layout is finished and attached to the phone window.
Such that it may return a zero caption insets when it shouldn't be, if
the app do window configuration change handling by restarting.

The layout will ensure the caption insets get set when everything is
ready.

There will be no caption height change when resizing or moving, make
sure the calculated insets always include the caption regardless of the
frame position.

Bug: 154792488
Test: Manuel test with message and settings app.
Test: go/wm-smoke
Test: atest InsetsControllerTest#testCaptionInsetsStateAssemble
Test: atest InsetsSourceTest#testCalculateInsets_caption_resizing
Change-Id: I1728628eccb32b912210a64fe3a1c9cbe9e3b302
2020-04-28 11:35:43 +09:00
TreeHugger Robot
5e9aed81d0 Merge "Support WRAP_CONTENT in InlineSuggestion#inflate" into rvc-dev 2020-04-27 23:52:59 +00:00
Feng Cao
bd26abbc5b Support WRAP_CONTENT in InlineSuggestion#inflate
Test: atest android.autofillservice.cts.inline
Bug: 154887895

Change-Id: Ie420bd40e8f0fb7d6e6b1e47ed0f41dc3f85b25e
2020-04-27 15:12:14 -07:00
TreeHugger Robot
1ef9f259c4 Merge "Keep the intent resolver button bar stuck to the bottom." into rvc-dev 2020-04-27 19:53:32 +00:00
TreeHugger Robot
9153a323fd Merge "Update one-line layout for conversation notifs" into rvc-dev 2020-04-27 19:53:23 +00:00
Steve Elliott
f7ef4efeda Move conversation app name into header
Bug: 154511267
Test: visual, manual, atest
Change-Id: I929569a5e3f39df69258f1ec5ee58057c95d2387
2020-04-27 15:40:18 -04:00
Miranda Kephart
c8f22beefe Merge "Keep screenshot process bound" into rvc-dev 2020-04-27 18:00:43 +00:00