Commit Graph

104552 Commits

Author SHA1 Message Date
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
Stanislav Zholnin
7a65a7a37c Merge "Prevent developer provided strings from being uploaded through statsd." into rvc-dev 2020-06-22 08:10:52 +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
TreeHugger Robot
48e9dc67f1 Merge "Revert "Fix transition return issues when more than 1 level depth"" into rvc-dev 2020-06-22 03:04:37 +00:00
TreeHugger Robot
8b3783c8e5 Merge "Camera: Adjust documentation and comments for insensitive language." into rvc-dev 2020-06-21 22:53:21 +00:00
Jeff Chang
79f5a49b3c Revert "Fix transition return issues when more than 1 level depth"
This reverts commit 6d834d86fb.

Reason for revert: <http://b/159230864 WhatsApp image is visible after existing a chat>
Bug: 159230864

Change-Id: Ib266cff2e06a82ae9a0e85142ef80ae00328a040
2020-06-20 06:09:04 +00:00
Taran Singh
4291410118 Animate IME with zero insets
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
2020-06-20 03:51:00 +00:00
TreeHugger Robot
48dc192499 Merge changes I4fdf368e,Ibc6be890 into rvc-dev
* changes:
  SurfaceControlViewHost: Release ViewRoot from finalizer
  SurfaceControlViewHost: Call doDie with true
2020-06-20 00:07:56 +00:00
Beth Thibodeau
ab9e7facdf Merge "[DO NOT MERGE] Support toggling resumption in Settings" into rvc-dev 2020-06-19 22:26:57 +00:00
Eino-Ville Talvala
14c753626e Camera: Adjust documentation and comments for insensitive language.
Test: Builds
Bug: 159480149
Change-Id: I0daadbfa6505339bdcec4a49c6e4577424832f75
2020-06-19 15:26:39 -07:00
TreeHugger Robot
7ec25249ab Merge "Save AsyncOps for later forwarding instead of SyncOps." into rvc-dev 2020-06-19 21:29:40 +00:00
TreeHugger Robot
08465447a2 Merge "Camera: Relax physical stream cropping behavior" into rvc-dev 2020-06-19 21:10:22 +00:00
TreeHugger Robot
861a8178f9 Merge "Camera: Allow reprocessing session to configure physical streams" into rvc-dev 2020-06-19 20:46:04 +00:00
Robert Carr
7a31b8b1df SurfaceControlViewHost: Release ViewRoot from finalizer
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
2020-06-19 13:14:00 -07:00
Robert Carr
5409e24105 SurfaceControlViewHost: Call doDie with true
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
2020-06-19 13:10:13 -07:00
Stanislav Zholnin
456b496e4a Save AsyncOps for later forwarding instead of SyncOps.
Fixes: 159082266
Test: atest AppOpsLoggingTest
Change-Id: I3f8da9d7c2925233e5e53cfa7fd5e4cd1c258b29
2020-06-19 19:48:35 +01: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
Khaled Abdelmohsen
592da34c0b Merge "Modify source stamp format" into rvc-dev 2020-06-19 18:36:27 +00:00
Nikolas Havrikov
0cf1ad8495 Merge "Ensure mShowDialogs gets updated as part of global config update" into rvc-dev 2020-06-19 17:49:34 +00:00
Shuzhen Wang
84a475a20f Camera: Allow reprocessing session to configure physical streams
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
2020-06-19 17:23:52 +00:00
Jorim Jaggi
5cc486b1a1 Merge changes Ia7d9514e,I3e9e4f47 into rvc-dev
* changes:
  Yearly Window Manager spring cleaning #2
  Yearly Window Manager spring cleaning #1
2020-06-19 13:58:45 +00:00
Nikolas Havrikov
7771e6ebf5 Ensure mShowDialogs gets updated as part of global config update
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
2020-06-19 15:23:50 +02:00
Alex Johnston
2a02c8e381 Merge "Change behaviour of screen capture disabled" into rvc-dev 2020-06-19 12:20:38 +00:00
Jorim Jaggi
bfa95a71fb Yearly Window Manager spring cleaning #1
- 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
2020-06-19 13:18:38 +02:00
TreeHugger Robot
44b233c55d Merge "Fix the context leak in the ContentCapture" into rvc-dev 2020-06-19 06:38:19 +00:00
TreeHugger Robot
1471727cdb Merge "Remove the feature flag of contextual home V2" into rvc-dev 2020-06-19 05:06:11 +00:00
TYM Tsai
c9f0c232ae Fix the context leak in the ContentCapture
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
2020-06-19 12:09:54 +08:00
Jason Chiu
7ebdce50cd Remove the feature flag of contextual home V2
Bug: 159393461
Test: rebuild
Change-Id: I0873794e398bca35820a23860a6325a7b6097da4
2020-06-19 11:30:13 +08:00
Remi NGUYEN VAN
6555756e90 Merge "Move Inet[4]AddressUtils to libs/net" into rvc-dev 2020-06-19 00:49:29 +00:00
Beth Thibodeau
c1bc307bce [DO NOT MERGE] Support toggling resumption in Settings
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
2020-06-18 23:58:11 +00:00
Shuzhen Wang
9c9b1085c3 Camera: Relax physical stream cropping behavior
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
2020-06-18 15:53:49 -07:00
TreeHugger Robot
a2dbc3b3ee Merge "Camera: Fix race for onCaptureBufferLost callback (take 2)" into rvc-dev 2020-06-18 22:00:11 +00:00
Alex Johnston
302c1fe947 Change behaviour of screen capture disabled
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
2020-06-18 22:58:28 +01:00
Yuncheol Heo
c53014cbf6 Merge "Gets the userId from Context for AccessibilityManager in ToastPresenter." into rvc-dev 2020-06-18 17:29:13 +00:00
Evan Rosky
058a713a74 Merge "Use actual resizability for split-screen operations" into rvc-dev 2020-06-18 17:25:53 +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
TreeHugger Robot
8411d73710 Merge "Update Java doc for FLAG_ACTIVITY_LAUNCH_ADJACENT" into rvc-dev 2020-06-18 16:40:32 +00:00
TreeHugger Robot
c5c35fc376 Merge "Add try-catch for the augmented autofill UI to avoid crashing" into rvc-dev 2020-06-18 16:36:10 +00:00
Michael Groover
67cb3a610d Merge "Relax minimum signature scheme version for apps on system partition" into rvc-dev 2020-06-18 16:13:30 +00:00
jun.h.cho
c3540cc2f9 Update Java doc for FLAG_ACTIVITY_LAUNCH_ADJACENT
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
2020-06-18 07:55:15 -07:00
TreeHugger Robot
e1ed6dcf57 Merge "Controls API - Update template docs" into rvc-dev 2020-06-18 14:33:24 +00:00
Matt Pietal
68943be01d Controls API - Update template docs
Add more clarity around which control template to select.

Fixes: 150630500
Test: manual
Change-Id: I215e485e1cf81aae7e2c6c8b469945069136aad8
2020-06-18 08:03:44 -04:00
TreeHugger Robot
cf5f65cbe3 Merge "Callback the surface package after the views are drawn locally" into rvc-dev 2020-06-18 11:03:17 +00:00
Lorenzo Colitti
db056d4043 Merge "Move DnsPacket to libs net" into rvc-dev 2020-06-18 10:14:47 +00:00
Wei Sheng Shih
ec30716a6b Merge "Force relayout when wallpaper engine become visible." into rvc-dev 2020-06-18 08:21:58 +00:00
Luke Huang
c1a52b82c9 Move DnsPacket to libs net
This class might be used by some mainline modules.

Bug: 151052811
Test: atest DnsPacketTest
Test: atest DnsResolverTest
Change-Id: I8841d91456952ded5efbf8ea221289aecc7746ad
2020-06-18 16:17:04 +08:00
Feng Cao
ffd9affb74 Callback the surface package after the views are drawn locally
* SurfaceControlViewHost#setView() method will post a task to the
  main thread to draw the view. We want to callback the surface
  package to the remote process after the view is drawn and ready
  to be shown, to avoid the flicker when the remote process attaches
  it to their window when it's not drawn.

Test: atest android.autofillservice.cts.inline
Bug: 157515522

Change-Id: Ia75baaf9d6a4770a783dfc75ebb01b4b6e62e180
2020-06-17 23:57:11 -07:00
Ady Abraham
278f00319f Merge "WM: Replace eEarlyWakeup flags with explicit eEarlyWakeup start and end flags" into rvc-dev 2020-06-18 04:36:03 +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