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
Sometimes a suspended app may be started while the device is locked. The
suspend dialog should request the user to unlock in these cases.
Test: Manual:
1. Suspend camera app.
2. Lock the screen.
3. Try to launch the camera while the screen is locked, e.g., by double
tapping the power button.
Bug: 157867645
Change-Id: Ie3b5e2903804bc8b385de4fc9276dd55a8108c0f
Merged-In: Ie3b5e2903804bc8b385de4fc9276dd55a8108c0f
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
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
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
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
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
- 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
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
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
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
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
- 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
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
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
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