Commit Graph

13528 Commits

Author SHA1 Message Date
Alison Cichowlas
974d17209e Merge "When Nearby is present as a chip, exclude it from app list." into rvc-dev 2020-06-22 16:31:47 +00:00
TreeHugger Robot
63458fb6e5 Merge "Turn off quiet mode in the background, allowing the dialog to dismiss quicker." into rvc-dev 2020-06-22 16:09:41 +00:00
TreeHugger Robot
70ad33113f Merge "Ignore onStartInput when WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR" into rvc-dev 2020-06-22 14:51:15 +00:00
Alison Cichowlas
582aeba50c Merge "Refresh both lists and pinning preferences on change." into rvc-dev 2020-06-22 12:58:57 +00:00
Ming-Shin Lu
48bfc3165c Ignore onStartInput when WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR
CL[1] introduces new WINDOW_FOCUS_GAIN_REPORT_ONLY flows to notify
InputMethodService only reports IME input target to WM when focusing to
the next window and its input connection remains.

Originally in android Q and prior devices, we don't need such report
mechnism but just skip to start new input connection and ignore
onStartInput / onFinishInput for the above use case.

Since starts from Android R, new IME insets control APIs relying on this
mechanism (see CL[2]) to keep the actual IME input target up-to-date.

As we expected there should be no new input connection and additional
onFinishInput when CL[1] landed.

However, in IMMS, startInputUncheckedLocked will be called
to callback additional onStartInput for InputMethodService, which mostly
is not expected, except when focusing the same window after device
turned screen on, we need to start input and callback onStartInput to
align with the behavior of android Q or the prior platform.

Besides, to have more clear code logic and debugging concept of
ignoring onStartInput and onFinishInput only when focused the same editor
with input connection remains, we remove WINDOW_FOCUS_GAIN_REPORT_ONLY
reason and introduced 2 more start input reasons to distinguish the
different behavior:
    - WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR
    - WINDOW_FOCUS_GAIN_REPORT_WITHOUT_EDITOR

[1]: I45a9814d812ad906f417c24200fd4219959e2423
[2]: I9e8984b7e5aa989a53ece9e2576393f795b9ef94

Fix: 158624922
Test: atest FocusHandlingTest InputMethodStartInputLifecycleTest
Test: manual as below steps:
    1. Use Gboard, Open the emoji keyboard
    2. Swipe down to reveal notification shade
    3. Swipe up to dismiss notifications
    4. Expect the Emoji keyboard is still open without close

Change-Id: I2da99ae67b9ce4051dec0c0f0e975ebe6e1ab118
2020-06-22 12:22:33 +08:00
Alison Cichowlas
d5c946dae9 Refresh both lists and pinning preferences on change.
This fixes several issues relating to pinning and work profile.
(In future, we might want to maintain a separate pinned list for
WP than for main profile - this CL doesn't address that but
doesn't prevent it.)

Fixes: 159038941, 159035711
Test: atest ChooserActivityTest, manual with WP enabled thru TestDPC
Change-Id: Ibbe908a60dfeee859e576c5e1473123f02147958
2020-06-21 10:23:30 -04:00
Alison Cichowlas
3d88dccf7c When Nearby is present as a chip, exclude it from app list.
Fixes: 156514997
Test: atest ChooserActivityTest; manual with Nearby enabled
Change-Id: Ibfb1cd2b25d41e56aea7ecd861af78ae7b48898b
2020-06-19 14:43:16 -04:00
Stanislav Zholnin
54762b293e Prevent developer provided strings from being uploaded through statsd.
- in situation when developer provides message when op is noted, do not
report it through stack trace collection infrastructure
 - collect only statcktraces for OP_FLAG_SELF and OP_FLAG_TRUSTED_PROXIED to
match collection of appops counts

Test: atest  android.app.appops.cts.RuntimeMessageCollectionTest
Fixes: 159433071
Change-Id: I1ab56a530832873a1f1f68aba5ab6eabc9e8a17a
2020-06-19 19:43:03 +01:00
Jonathan Scott
3e7c68412e Turn off quiet mode in the background, allowing the dialog to dismiss
quicker.

Test: Manual test of launching a work app with quiet mode on.
Bug: 158934594
Change-Id: I36a9e8717ce5b6aa5e4009468364914fcc73b80c
2020-06-19 18:17:53 +01:00
Evan Rosky
a9233b0aab Merge "Fix support for split-screen w/ non-resizable home" into rvc-dev 2020-06-19 02:06:38 +00:00
Evan Rosky
89c285ebde Fix support for split-screen w/ non-resizable home
First, this treats non-resizable minimized the same as
resizable minimized except with a status-bar height primary.
This differs from before in that the dividerbar remains
visible/usable -- this makes it more obvious to the user that
they are in split-screen mode.

Second, this actually places the home stack into the split
secondary root and overrides its windowing-mode to fullscreen.
This is needed because otherwise it can't properly interleave
with the other secondary tasks -- which would cause backing-out
of the secondary task to return to recents instead of home.

Both of these combined also allows us to clean up some
special-case code.

Bug: 159247878
Test: Use split-screen with non-resizable 3p home.
Change-Id: Idc2050703d972a4b2fa8f74f5827bcc126dce832
2020-06-18 14:25:27 -07:00
TreeHugger Robot
ab3811efea Merge "Resolver/Chooser - Fix reuse of textview" into rvc-dev 2020-06-18 17:56:30 +00:00
Hunter Knepshield
9568960297 Merge changes from topic "bugreport-stub" into rvc-dev
* changes:
  Reevaluate some carrier-associated apps' status on SDK changes.
  Add new "addedInSdk" attribute to carrier-associated apps.
2020-06-18 17:01:01 +00:00
Matt Pietal
2d0c7b02bc Resolver/Chooser - Fix reuse of textview
Upon reuse of a view by the recyclerview, it was possible to show a
reused view's sublabel, as it was doing incorrect comparisons. Make
sure to always reset the textviews, and hide it if necessary.

Fixes: 150813955
Test: manual, but helpful to have many apps installed and launch the sharesheet
Change-Id: Idb0c03c0b0917104bd9f26cdd9ed33a0055fa6f2
2020-06-18 12:16:56 -04:00
TreeHugger Robot
ae64ae50de Merge "Resolver - Center text with no sublabel" into rvc-dev 2020-06-18 13:16:56 +00:00
Sudheer Shanka
b52a288e0c Merge "Maintain the fuse buffer pool keyed by inode instead of threadId." into rvc-dev 2020-06-18 09:46:29 +00:00
Luke Huang
7144459282 Merge "Disable sockets and DNS if process lacks INTERNET permission." into rvc-dev 2020-06-18 03:03:06 +00:00
Luke Huang
6f214e8ebe Disable sockets and DNS if process lacks INTERNET permission.
This is a Client-only solution.
  - Add to NetdClient a per-process std::atomic_boolean
    similar to netIdForProcess and netIdForResolv.
  - The boolean says whether the process should be
    allowed Internet connectivity.
  - Add an @hide method to NetUtils.java to set the boolean;
    call it from the initialization code of the new
    process just after forking from zygote.
  - Make netdClientSocket and dnsOpenProxy check the
    boolean. If the boolean is false, return EPERM from
    socket calls.

Bug: 150028556
Test: atest NetworkUtilsTest
Test: atest CtsAppSecurityHostTestCases:UseProcessTest
Change-Id: If002280fbad493dfc2db3d9d505c0257d49a9056
Exempt-From-Owner-Approval: OWNERS already approved identical patchset 5
2020-06-18 03:02:06 +00:00
TreeHugger Robot
b0c2439535 Merge "Include orignal componentName of ChooserTargets, when pass ChooserTargets sharing and impression events to AppPredictionService." into rvc-dev 2020-06-17 21:45:44 +00:00
Matt Pietal
a4d5e8c9b7 Merge "Sharesheet - Don't update list on bg thread" into rvc-dev 2020-06-17 19:49:41 +00:00
TreeHugger Robot
728da7002e Merge "Fix collapsed group message text alignment" into rvc-dev 2020-06-17 19:16:49 +00:00
TreeHugger Robot
8525b71e2a Merge "Rename "Westworld" to "Statsd"" into rvc-dev 2020-06-17 18:50:27 +00:00
Matt Pietal
dd6ed8ecbb Resolver - Center text with no sublabel
Also avoid breaking sharesheet, as the sublabel was intentionally
being marked visible with no text for better alignment.

Fixes: 149622636
Test: manual + atest ResolverActivityTest
Change-Id: Id65058de70cf70c4cb18940e75f4c5051f1da25c
2020-06-17 13:54:57 -04:00
Steve Elliott
70f970f80b Merge changes If8d5b906,I861d6ef7 into rvc-dev
* changes:
  Fix alignment of expanded bundled group convo avatar
  Truncate sender name in collapsed group message.
2020-06-17 17:47:02 +00:00
Winson Chung
a1423286b2 Merge "Use new insets apis for determining the stable/system insets" into rvc-dev 2020-06-17 17:26:49 +00:00
Antoan Angelov
3258a3e170 Merge "Also check inactive profile targets in onHandlePackagesChanged" into rvc-dev 2020-06-17 16:05:07 +00:00
Winson Chung
05b5f976d7 Use new insets apis for determining the stable/system insets
- The old calls appear to account for the display cutout now which causes
  the landscape/seascape comparison to fail

Bug: 157878422
Test: atest TaskSnapshotControllerTest
Test: TaskSnapshotSurfaceTest
Test: DecorViewTest
Test: Open an app with displaycutout layout shortEdge or always, and
      rotate to landscape in non-gestural mode, and ensure that the
      divider and background are drawn in the right place
Change-Id: Ib51964a76e25f902858aad4e8aeb810dfca2edc0
Merged-In: Ib51964a76e25f902858aad4e8aeb810dfca2edc0
2020-06-17 16:01:46 +00:00
Steve Elliott
3e8e61df11 Fix collapsed group message text alignment
Fixes: 155499457
Test: manual
Change-Id: Ib98ac5204f5518368b76df852241f33d39a05490
2020-06-17 11:58:00 -04:00
Antoan Angelov
acfac74964 Merge "Re-setup viewpager on configuration change for RTL languages" into rvc-dev 2020-06-17 15:00:51 +00:00
arangelov
581a3c5800 Also check inactive profile targets in onHandlePackagesChanged
Before we would only check the active tab for available
targets and finish the activity if there are none.
However, with the work tab, there can be cases where
the active tab has no targets, but the inactive tab does.

Fixes: 159202588
Test: manual
Change-Id: Ie03ebd1b022362681df432ec29299df86dceb490
2020-06-17 12:57:57 +00:00
arangelov
5f416b9452 Re-setup viewpager on configuration change for RTL languages
Otherwise rotating the device while showing a tab with RTL
shows blank tab content. This could be due to ViewPager
bugs when handling RTL.

Fixes: 158862939
Test: manually rotating the device with RTL layout
Test: manually rotating the device with LTR layout
Change-Id: Iba4c71cf88747d6fbbc36d19b5102460e8aa7cec
2020-06-17 12:57:47 +00:00
arangelov
9a960b740e Disable side swiping on RTL languages
The internal ViewPager seems to not handle RTL well. This CL
disables side swiping in that case.

Fixes: 159110029
Test: manually confirmed side swiping does not happen on RTL
languages
Test: manually side swiped on non-RTL languages

Change-Id: I30272426d1d1ef4f17ec656630cee01505f66c59
2020-06-17 10:15:38 +00:00
Muhammad Qureshi
4f4910ab73 Rename "Westworld" to "Statsd"
Bug: 158725651
Test: N/A; trivial name change
Change-Id: I1bac4ad010ff7fea62a9d9564ba981d74b206aff
2020-06-16 18:45:22 -07:00
Steve Elliott
4594603f1e Fix alignment of expanded bundled group convo avatar
Fixes: 159043203
Test: manual
Change-Id: If8d5b906d79c9dfcc5e99d8162f73d0f7d09e6e1
2020-06-16 20:58:52 -04:00
Steve Elliott
7da4bccd8a Truncate sender name in collapsed group message.
Fixes: 158769554
Test: manual, visual
Change-Id: I861d6ef755eac2c41e3ae2e2ca01d4a2dfeeecc8
2020-06-16 20:58:52 -04:00
Hunter Knepshield
1172ffa7c2 Add new "addedInSdk" attribute to carrier-associated apps.
Previously, the sysconfig wasn't capable of understanding
carrier-associated apps that were added after a device's initial launch
(i.e. via OTA) because the logic in CarrierAppUtils explicitly avoids
disabling such apps a second time.

Most of this change is just plumbing everything through. For now, it's
all @hide due to R API deadlines. It will be made public in S.

Bug: 154872019
Test: manual, QA, atest FrameworksTelephonyTests:CarrierAppUtilsTest
Change-Id: I530a4f73146b09879547ca2e0c26428957fef37a
2020-06-16 16:48:38 -07:00
TreeHugger Robot
892d269b65 Merge "Guard against NPE in ServiceConnector" into rvc-dev 2020-06-16 23:11:11 +00:00
Eugene Susla
2ae38f3856 Guard against NPE in ServiceConnector
Fixes: 157759109
Test: presubmit
Change-Id: Ic1f594e667af50c0df8e566be4efdbaab6dccb26
2020-06-16 13:38:48 -07:00
Sudheer Shanka
c608143486 Maintain the fuse buffer pool keyed by inode instead of threadId.
In order to save memory, FuseAppLoop maintains a buffer pool to use
when dispatching the read/write requests. Currently, it uses
the threadId of the ProxyFileDescriptorCallback as the key for this
buffer pool and this can result in an issue when a caller creates
multiple ProxyFileDescriptors with ProxyFileDescriptorCallbacks
running on the same thread. When this happens, it is possible that
a buffer is reused before a read/write request which was using it
earlier has been handled and would result in data from read/write
requests on different fds getting mixed up.

Bug: 158568683
Test: atest --test-mapping apex/blobstore
Change-Id: Iaffd54f4430ecb3778f01c80f5a1684ac448f8dc
2020-06-16 13:07:42 -07:00
Matt Pietal
0aefc0cefc Sharesheet - Don't update list on bg thread
Found a potential issue where the adapter list was being updated on
the bg thread, and could cause conflicts while the recyclerview is
loading.

Fixes: 159028662
Test: atest ChooserActivityTest
Change-Id: I60abd9a8325964ed2ca1218e8846f816b02da431
2020-06-16 14:04:52 -04:00
TreeHugger Robot
26dfdc587f Merge "Implementation of sharding for procstats atoms" into rvc-dev 2020-06-16 17:12:16 +00:00
Song Hu
c6297c89f9 Include orignal componentName of ChooserTargets, when pass ChooserTargets sharing and impression events to AppPredictionService.
Bug: 159121173
Test: atest CtsSharesheetTestCases:android.sharesheet.cts.CtsSharesheetDeviceTest
Change-Id: Ifd4bfbdaec55ed16c4fcb3f835f8bc4569b87a40
2020-06-16 09:28:55 -07:00
Jorim Jaggi
8ec4d3a33f Merge "Revert "Revert "Remove IME surface when occured in multi-window mode""" into rvc-dev 2020-06-16 12:56:20 +00:00
Yunfan Chen
c02a5ac5bb Revert "Revert "Remove IME surface when occured in multi-window mode""
This reverts commit 2a38a35622.

Reason for revert: The original CL was reverted for b/158836294 and it turned out to be innocent. Re-land the CL.

Bug: b/155660756

Change-Id: Iada83e80059e7cb9566bb7ad4e4c9909b4ed794a
2020-06-16 01:54:41 +00:00
Richard Gaywood
52a2edf548 Implementation of sharding for procstats atoms
Oftentimes, the ProcStats protobuf is larger than StatsEvent can handle.
With this CL, we detect that state before it happens, and attempt to
shard the ProcStats data over multiple protobufs, each with its own
StatsEvent.

Test: see b/158294266
Bug: 158294266
Change-Id: I1787d0ddeb6825a55adb8e0e1ec55c89af6990c5
2020-06-15 16:08:35 +00:00
TreeHugger Robot
3fb94d8e9d Merge "Add logging on sharesheet displayList to help investigate issue that icons launch different apps unexpectedly." into rvc-dev 2020-06-15 12:12:07 +00:00
Lorenzo Colitti
242087ad3e Merge "Automatically add FEATURE_IPSEC_TUNNELS for Q+ devices." into rvc-dev 2020-06-15 09:06:29 +00:00
Song Hu
f473e42f96 Add logging on sharesheet displayList to help investigate issue that icons launch
different apps unexpectedly.

Bug: 158172791
Test: manual test on the phone
Change-Id: I003b83f6a76dca2f97cfd43b2f265ad572f0e5c5
2020-06-14 14:50:54 -07:00
TreeHugger Robot
a840c1f3ea Merge "Revert "Remove IME surface when occured in multi-window mode"" into rvc-dev 2020-06-12 23:08:13 +00:00
Jerome Gaillard
2a38a35622 Revert "Remove IME surface when occured in multi-window mode"
This reverts commit 460dabda46.

Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testTopPositionSwitchOnTapTimeoutDifferentProcess&testClass=android.server.wm.lifecycle.ActivityLifecycleTopResumedStateTests&atpConfigName=cts%2Fframework%2Fgce-presubmit-wm-cloud-tf-3&testModule=CtsWindowManagerDeviceTestCases&fkbb=6585261&lkbb=6585728&lkgb=6581565&testResults=true&badBuildCount=13&branch=git_rvc-qpr-dev-plus-aosp&target=aosp_cf_x86_phone-userdebug, bug b/158836294

Bug: 158836294
Change-Id: Iec015564030658845a5b1262c23c5b72570af9cf
2020-06-12 22:45:20 +00:00