Commit Graph

14031 Commits

Author SHA1 Message Date
TreeHugger Robot
39cea4718d Merge "Also listen to ACTION_MANAGED_PROFILE_AVAILABLE in sharesheet ResolverActivity." into rvc-dev am: 3c34454ae9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11987765

Change-Id: Ia26c3c37e74c993eb73d793ff559f83bf38e4edc
2020-06-25 16:41:34 +00:00
TreeHugger Robot
3c34454ae9 Merge "Also listen to ACTION_MANAGED_PROFILE_AVAILABLE in sharesheet ResolverActivity." into rvc-dev 2020-06-25 16:29:26 +00:00
Daniel Sandler
f9cf277bcf Merge "Fixed bug: Not everyone has home controls yet, or pets." into rvc-dev am: fc86cfb5bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11933640

Change-Id: I92f667e4a82998393354e33262a8da0e213bd14a
2020-06-25 14:45:31 +00:00
Daniel Sandler
fc86cfb5bd Merge "Fixed bug: Not everyone has home controls yet, or pets." into rvc-dev 2020-06-25 14:34:52 +00:00
Jonathan Scott
cab7ed2b2e Also listen to ACTION_MANAGED_PROFILE_AVAILABLE in sharesheet
ResolverActivity.

Test: Manual, using `adb shell su 1000 service call user 72 s16 android
i32 1 i32 10 i32 0 i32 0 && adb shell su 1000 service call user 72 s16
android i32 0 i32 10 i32 0 i32 0` to quickly toggle work profile while
on share sheet. Confirm that the work profile is visible again.
Fixes: 159646289

Change-Id: I29e5600b6d416e1bb6150629c9d94d20b344e4a9
2020-06-25 15:08:03 +01:00
Dan Sandler
f4e83e0a4a Fixed bug: Not everyone has home controls yet, or pets.
Fixes: 156301524
Test: # to enable controls component
      adb shell am start -n com.android.egg.test/com.android.egg.neko.NekoActivationActivity
      # manual step: activate controls from GlobalActions
      # to visit the cat list
      adb shell am start -n com.android.egg.test/com.android.egg.neko.NekoLand
      # to check on the status of the food bowl job (once
      # the food bowl control has been tapped)
      adb shell cmd jobscheduler get-job-state com.android.egg.test 42
      # to trigger the food immediately
      adb shell cmd jobscheduler run com.android.egg.test 42
Change-Id: I985a930bb5dd56d99eb57a340e4affe08c09724b
2020-06-24 16:54:37 -04:00
Josh Tsuji
b88071930b Merge "Hide the IME using InputMethodManagerInternal, because doing it that way actually works." into rvc-dev am: 88e88190eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11948939

Change-Id: I3700ae275241501de82f2eafae4ed702037b2b6e
2020-06-24 02:43:32 +00:00
Josh Tsuji
88e88190eb Merge "Hide the IME using InputMethodManagerInternal, because doing it that way actually works." into rvc-dev 2020-06-24 02:31:47 +00:00
TreeHugger Robot
a05d793f1a Merge "Tap convo avatar to expand/collapse" into rvc-dev am: 254b6cbd3a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11973242

Change-Id: I4c3b82315c11104a1bafcadd66690b39b1859e66
2020-06-23 21:42:30 +00:00
TreeHugger Robot
254b6cbd3a Merge "Tap convo avatar to expand/collapse" into rvc-dev 2020-06-23 21:41:18 +00:00
TreeHugger Robot
8af7e4a68f Merge "Fix NPE in sharesheet on devices without Work Profile." into rvc-dev am: 58bb12f7f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11971848

Change-Id: Ifc0aa5d27d23fc6f96d7690b7297acc1938c4f9a
2020-06-23 21:31:38 +00:00
TreeHugger Robot
58bb12f7f8 Merge "Fix NPE in sharesheet on devices without Work Profile." into rvc-dev 2020-06-23 21:25:24 +00:00
Alison Cichowlas
c391362e95 Fix NPE in sharesheet on devices without Work Profile.
Fixes: 159710864
Test: chooseractivitytests & manual
Change-Id: I664955eef96eebab0b412d19ed31292c7439f142
2020-06-23 14:20:32 -04:00
Steve Elliott
0afc301462 Tap convo avatar to expand/collapse
Fixes: 153751368
Test: manual
Change-Id: I42b0f05604797faba6ae3769b32bcbbe74d56a4e
2020-06-23 13:55:16 -04:00
TreeHugger Robot
07a3cde7b5 Merge "Remove circular ref from MessagingLinearLayout" into rvc-dev am: f33516115a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11971391

Change-Id: Id905112a84a4d418bc87f40a6fa2171d0d5ed5a2
2020-06-23 17:50:22 +00:00
TreeHugger Robot
f33516115a Merge "Remove circular ref from MessagingLinearLayout" into rvc-dev 2020-06-23 17:35:37 +00:00
Joshua Tsuji
53f6e83df0 Hide the IME using InputMethodManagerInternal, because doing it that way actually works.
This technique is also used by the Recents animation to hide the IME. It replaces the AV back press workaround entirely, which fixes the IME hanging around issue (and by extension, the weirdness around the insets).

Test: open a bubble (go/use-bubbles), focus an input field, then tap outside the bubbles UI to close the stack, observe that the IME hides
Test: open a bubble, focus an input field, switch to another bubble, observe IME hides
Test: open bubble, focus input field, switch to another bubble, focus input field, switch to the original bubble, focus input field, collapse stack, observe IME hides (previously the IME would remain visible)
Bug: 159369847
Bug: 159561847
Change-Id: I09f27b3c187a7bcfbef663cd3101a74ad8ab95ab
2020-06-23 11:57:34 -04:00
Steve Elliott
1b0f20efee Remove circular ref from MessagingLinearLayout
Fixes: 157507646
Test: manual
Change-Id: Ic2b2f99f9f80c11639849128670b335b5ec25566
2020-06-23 10:51:56 -04:00
Adrian Roos
f771bf5301 Merge "IME animation: hide IME-related navbar icons until perceptible" into rvc-dev am: e658c76b5c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11837615

Change-Id: I8f32e4d6109277b36303fe1c3b1a94d49040a34b
2020-06-23 07:11:19 +00:00
Adrian Roos
e658c76b5c Merge "IME animation: hide IME-related navbar icons until perceptible" into rvc-dev 2020-06-23 07:06:48 +00:00
Alison Cichowlas
7f69e3e6a1 Merge "When Nearby is present as a chip, exclude it from app list." into rvc-dev am: 974d17209e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11931365

Change-Id: Ic93edc726da182ef377ca6204e837463bc428f66
2020-06-22 16:49:53 +00:00
TreeHugger Robot
c903377bc7 Merge "Turn off quiet mode in the background, allowing the dialog to dismiss quicker." into rvc-dev am: 63458fb6e5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11931083

Change-Id: Ia5e2305d91e8ebae80c7be6807d1f11dc25bda3b
2020-06-22 16:48:59 +00:00
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
d3a0198031 Merge "Ignore onStartInput when WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR" into rvc-dev am: 70ad33113f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11863061

Change-Id: I44a6add590bdc70b99201a2c0e517d0815b8f9b5
2020-06-22 15:01:26 +00:00
Adrian Roos
c22eec9d35 IME animation: hide IME-related navbar icons until perceptible
During transitions and while the IME is controlled by the app,
the IME may be "visible" as far as the IME framework is concerned,
but not actually perceptible by the user due to offsets or alpha
applied to the leash.

This may lead to out-of-place navbar symbols for the IME, especially
in gesture nav.

To avoid this, the ImeInsetsSourceConsumer now notifies the IMF of
whether it has made the IME unperceptible to the user.

For now, we ignore the cases where the IME is controlled by something
other than the client window - in that case, we just revert to the
previous behavior of it being always considered perceptible.

Fixes: 158079255
Test: manual, launch email compose activity, observe that back button only indicates once IME appears
Test: atest InsetsAnimationControlImplTest
Change-Id: I4dc9d6513d0559156f7da39244f3fc5ebc952ed4
2020-06-22 16:55:54 +02: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
b841426ac5 Merge "Refresh both lists and pinning preferences on change." into rvc-dev am: 582aeba50c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11947583

Change-Id: Ia754efaef47403e43e4bac27335c80ecf1b91974
2020-06-22 13:15:23 +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
Stanislav Zholnin
b234c0a600 Merge "Prevent developer provided strings from being uploaded through statsd." into rvc-dev am: 7a65a7a37c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11930479

Change-Id: I8fc36dcc5d7a1769e302735a1a613356329926ff
2020-06-22 08:25:18 +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
bf8f7506dd Merge "Fix support for split-screen w/ non-resizable home" into rvc-dev am: a9233b0aab
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11897517

Change-Id: I49184008332140d7fa4d4671d1af1e64712a9024
2020-06-19 02:17:13 +00: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
413da06bd3 Merge "Resolver/Chooser - Fix reuse of textview" into rvc-dev am: ab3811efea
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11914259

Change-Id: I47c339042eb16d7f80e77ca059ea2e06145d47fb
2020-06-18 18:10:55 +00:00
TreeHugger Robot
ab3811efea Merge "Resolver/Chooser - Fix reuse of textview" into rvc-dev 2020-06-18 17:56:30 +00:00
Hunter Knepshield
5b622bb7bf Merge changes from topic "bugreport-stub" into rvc-dev am: 9568960297
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11856802

Change-Id: I29f29e33157cec7f99d2966acc2a57940ff346d3
2020-06-18 17:03:41 +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
83c84faff4 Merge "Resolver - Center text with no sublabel" into rvc-dev am: ae64ae50de
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11898401

Change-Id: Ide2c127b8acaa4d3dd0dc9a552adc50930490d23
2020-06-18 13:23:04 +00:00
TreeHugger Robot
ae64ae50de Merge "Resolver - Center text with no sublabel" into rvc-dev 2020-06-18 13:16:56 +00:00
Sudheer Shanka
8861ef2cfb Merge "Maintain the fuse buffer pool keyed by inode instead of threadId." into rvc-dev am: b52a288e0c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11885304

Change-Id: I14a9b532835122e41408aeccc4319eb9e7441514
2020-06-18 10:00:13 +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
dae5d3f223 Merge "Disable sockets and DNS if process lacks INTERNET permission." into rvc-dev am: 7144459282
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11881939

Change-Id: I7c285a848ac947e0acf1acc8bc32f3ece3456412
2020-06-18 03:23:46 +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