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
This reverts commit 6d834d86fb.
Reason for revert: <http://b/159230864 WhatsApp image is visible after existing a chat>
Bug: 159230864
Change-Id: Ib266cff2e06a82ae9a0e85142ef80ae00328a040
When IME has zero insets, it doesn't map to any side and doesn't have
can't be animated.
IME can have zero insets in following cases:
1. Floating IME
2. Fullscreen IME (in landscape)
3. IME doesn't overlap with IME target window.
In order to animate a type, it must have insets. We can animate IME
from negative insets to zero and vice-versa. This makes zero insets IME a
special case of ISIDE_BOTTOM.
Deprecate SIDE_FLOATING because it shouldn't logically map to a side.
Fix: 153909316
Test: atest WindowInsetsAnimationImeTests#testZeroInsetsImeAnimates
Change-Id: I6d1d3430888db4632cb2f93e9042f692b35ebaeb
If we don't explicitly go through the doDie process the
WindowManagerGlobal instance will hold the ViewRoot alive
indefinitely. This accidental leak could be very expensive so
we prevent it with a finalizer.
Bug: 157709599
Test: Existing tests pass
Change-Id: I4fdf368eed4b4e43faacd9f62b6d9fddfd9b7ef2
If we pass immediate=false to the doDie without
updating the visibility, we may destroy the hardware renderer
but then try to draw again anyway, and then crash. It seems
theres no reason we can't call immediate=true and
properly shut down immediately.
Bug: 159250432
Test: Existing tests pass
Change-Id: Ibc6be8901be10c0985681d83f4ce16dd1ab54925
- 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
Do not disallow reprocessable session to use physical streams.
At the same time, we cannot claim reprocessing to/from physical streams
work because:
1. It's undefined behavior to reprocess an input buffer into a physical
stream of different physical camera, or an input physical stream buffer
into an output buffer of different physical camera.
2. If the reprocessing input buffer comes from different physical cameras
with different sizes, because the current HAL API doesn't support sending
different size buffers through input stream, there isn't a
non-vendor-specific solution available.
Bug: 157123506
Test: vendor testing
Change-Id: I1ccf2b3918c1cb475b1baec10d35c6785b25208d
The "App keeps crashing" dialog appears on Android TV even
though it should not. This would usually be accounted for
by setting mShowDialogs to false in the ActivityTaskManagerService
on boot. However, this does not happen because the service uses a
method of the ActivityTaskManager which pulls its configuration
from the context, which at this point is not yet updated to reflect
relevant values like the uiMode.
This change solves this problem by introducing an internal method
in the ActivityTaskManager, which acts on a given configuration
instead of the one from the context. This is helpful because the
caller ActivityTaskManagerService is holding on to the correct
configuration in the first place.
Furthermore, this change does not impact any outward-facing
behavior, nor does it introduce code duplication as the old
method of ActivityTaskManager new merely delegates its task
to the new one with the same configuration it would have
originally pulled from the context.
Test: Manually on ADT-3 device
Bug: 159019027
Change-Id: I0fac574a69a19243c2e62b967978ef5d8318ee51
- Replace InsetsState ArrayMap with simple array.
- Cache same values in InsetsPolicy.
- Only access Dimmer if dimming
Test: InsetsState test etc.
Bug: 159056748
Change-Id: I3e9e4f473eaa05b2013b7a6d0f37cd9c1fac81dd
Activity cannot be released because the context be holded by multiple
objects.
* Activity holds ContentCaptureManager.
* ContentCaptureManager holds the context and MainContextCaptureSession.
* MainContextCaptureSession holds the context and ContentCaptureManager.
* The system server holds some binder references to MainContentCaptureSession.
If the system service never released the binder references, then the
activity is also never GC'd.
To avoid the issue,
1. Make the session state receiver of MainContextCaptureSession to be
static and uses weak reference to MainContextCaptureSession.
2. The direct service vulture may miss to do unlinkToDeath(), do a checking
while the session destory.
Bug: 143210612
Test: manual check Objects on the meminfo
Test: Activities should be released after a period of time
Test: adb shell dumpsys meminfo com.google.android.dialer
Change-Id: I12037483addb1efe444c74fa189ef6afd15821dd
Moved setting so we can use Tunable:
adb shell settings put secure qs_media_resumption 1
If setting is changed, removes all existing resume players
Bug: 154039093
Test: manual
Test: atest SettingsProviderTest
Test: atest com.android.systemui.media
Change-Id: Iad056fbad4520cfe762d9e9f5ed62d38ea1117b1
Allow physical stream's field-of-view to be larger than that of the
logical stream, thus enabling more robust depth-from-stereo or motion
tracking.
Test: Build
Bug: 153583897
Bug: 157676445
Bug: 157138779
Bug: 155393103
Change-Id: Ibc059396e9d5e7db80b6c2632d26f48774aad4d4
Background
* Historically, when the screen capture disabled
policy was set on the personal profile, screen
capture was disabled for the whole device
(per-device).
* This should be changed to only be disabled in
the personal profile (per-profile).
Changes
* Renamed DevicePolicyCache methods to setScreenCaptureAllowed
and isScreenCaptureAllowed
* Added parameter ownerCanAddInternalSystemWindow to
isScreenCaptureAllowed
Bug: 148453838
Bug: 157035400
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: If1bd68f0ec3e88497c5d3b4382977b526b2364ba
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
The behavior of the adjacent flag is changed. It can be changed to split-screen mode if supported by the system.
Fixes: 155050369
Test: n/a
Change-Id: Ia19e0228442e7c8847d403ee2def841f1c0b712b