Commit Graph

66005 Commits

Author SHA1 Message Date
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
TreeHugger Robot
b3d84ac6dd Merge "Support DNS-over-TLS probes in NetworkDiagnostics" into rvc-dev 2020-06-22 14:15:40 +00:00
Tiger Huang
0d145e89c6 Merge "Only notify insets changed caused by z-order under some conditions" into rvc-dev 2020-06-22 13:53:57 +00:00
TreeHugger Robot
1a3468740a Merge "Finish fixed rotation while the task has done transition" into rvc-dev 2020-06-22 13:42:41 +00:00
TreeHugger Robot
bda3156926 Merge "Remove fixed-rotation-transform setting" into rvc-dev 2020-06-22 13:42:27 +00:00
TreeHugger Robot
ace942e57b Merge "Fix "Allow/Deny" popup window no respond when enable pointer location" into rvc-dev 2020-06-22 10:12:10 +00:00
Galia Peycheva
9e639bb382 Merge "Close assistant activities on closeSystemDialogs" into rvc-dev 2020-06-22 09:57:51 +00:00
Lorenzo Colitti
438073fcfe Merge "Make PendingIntent immutable and correct Settings package name" into rvc-dev 2020-06-22 09:00:25 +00:00
Mike Yu
1a5e45e37d Support DNS-over-TLS probes in NetworkDiagnostics
Probe DNS servers to see they support DNS-over-TLS. Use system
CAs to verify whether the certificates sent by DNS servers are
trusted or not. An error is thrown to cause the probe failed if
DNS servers send untrusted certificates.

Unlike the DnsResolver which doesn't verify the certificates
in opportunistic mode, all of the DoT probes from NetworkDiagnostics
check certificates.

DoT probes apply to the DNS servers gotten from LinkProperties
and the DoT servers gotten from PrivateDnsConfig whatever private
DNS mode is.

A common example in DNS strict mode:
.  DNS TLS dst{8.8.8.8} hostname{dns.google} src{192.168.43.2:48436} qtype{1} qname{815149-android-ds.metric.gstatic.com}: SUCCEEDED: 1/1 NOERROR (432ms)
F  DNS TLS dst{192.168.43.144} hostname{}: FAILED: java.net.ConnectException: failed to connect to /192.168.43.144 (port 853) from /192.168.43.2 (port 41770) after 2500ms: isConnected failed: ECONNREFUSED (Connection refused) (172ms)
.  DNS TLS dst{8.8.4.4} hostname{dns.google} src{192.168.43.2:37598} qtype{1} qname{759312-android-ds.metric.gstatic.com}: SUCCEEDED: 1/1 NOERROR (427ms)

An example when the CA is not trusted:
F  DNS TLS dst{8.8.8.8} hostname{dns.google}: FAILED: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. (16ms)

An example when TCP/TLS handshake timeout:
F  DNS TLS dst{8.8.8.8} hostname{dns.google}: FAILED: java.net.SocketTimeoutException: failed to connect to /8.8.8.8 (port 853) from /192.168.2.108 (port 45680) after 2500ms (2514ms)

Bug: 132925257
Bug: 118369977
Test: atest FrameworksNetTests
Original-Change: https://android-review.googlesource.com/1011670
Merged-In: I1b54abed0e931ca4b8a97149459cde54da1c3d6f
Change-Id: I1b54abed0e931ca4b8a97149459cde54da1c3d6f
2020-06-22 08:57:49 +00:00
Mohammad Samiul Islam
fb11084bc6 Merge "Allow staging multi-package session immediately after abandonment" into rvc-dev 2020-06-22 08:20:11 +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
paulhu
9743233ab1 Make PendingIntent immutable and correct Settings package name
ConnectivityService puts up some notifications with pending
intents, but these pending intents are mutable that content can
be changed by someone. So make these pending intents to be
immutable.

Some OEMs have their own Settings package. Thus, need to get the
current using Settings package name instead of just use default
name "com.android.settings".

Bug: 154928507
Test: atest FrameworksNetTests
Change-Id: I02e3277358623400aa03dc8996af3d7c46a8ce76
2020-06-22 15:32:01 +08:00
Kyunglyul Hyun
c8f4a8a5e9 Merge "System routes are not automatically exposed" into rvc-dev 2020-06-22 04:52:17 +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
Tiger Huang
9cfd685729 Only notify insets changed caused by z-order under some conditions
The goal of this CL is to improve the performance.

If win.mBehindIme is changed, we will notify the window about insets
changed only when:
- IME is visible.
- The window is visible.

Fix: 159049379
Test: atest InsetsStateControllerTest
Change-Id: I8d38693bfb034c9d12e27d92b7a1d5247768d3e5
2020-06-21 20:53:56 +08:00
Kyunglyul Hyun
e1b8006e2b Handle multiple active bluetooth devices
When dealing with a pair of hearing aid devices are active,
a single "selected route" is not sufficient.

Instead, this CL introduces activeRoutes which can hold multiple active
bluetooth route and deal with them.

Bug: 152585170
Test: cts tested & manually w/ A2dp BT devices
Change-Id: I2c2b8967d9f221db73f9d3b9332de7c76d07a0f9
2020-06-21 21:51:44 +09:00
TreeHugger Robot
cc498f3e69 Merge "Animate IME with zero insets" into rvc-dev 2020-06-20 17:06:09 +00:00
Riddle Hsu
83fd114de7 Remove fixed-rotation-transform setting
It was enabled by default and no longer needs to be able to
be switched dynamically. Keep a system property for internal
framework debugging.

Fixes: 158637018
Test: atest DisplayContentTests ActivityRecordTests

Change-Id: Ia41a32d689f1be705302e3bd73b51f4319b15508
2020-06-20 22:30:51 +08:00
arthurhung
4b3be33d4d Fix "Allow/Deny" popup window no respond when enable pointer location
Currently, all buffered layers are included in input occlusion
calculations, the overlay window which can't receive input event
should also need to explicitly opt out by setting window type.

Bug: 158717144
Test: enable pointer location, launch app which would popup grant
      permission dialog
Change-Id: I0b56632c7299ca1074ded975f16c433266106d8a
2020-06-20 13:19:40 +00:00
TreeHugger Robot
97bd35e552 Merge "RESTRICT AUTOMERGE Logging for alarms when they hit the limit" into rvc-dev 2020-06-20 05:59:09 +00:00
Suprabh Shukla
8ec9561614 RESTRICT AUTOMERGE Logging for alarms when they hit the limit
Temporarily writing a wtf log when the limit is reached by the system,
because we lose all the alarm manager state after the crash.

Test: adb logcat -s AlarmManager

Bug: 157782538
Change-Id: I008ea8a75503ece620af344a085875f13532d962
2020-06-19 21:35:43 -07:00
Amith Yamasani
df604649ef Merge "Speed up NetworkPolicy thread during user creation" into rvc-dev 2020-06-20 04:12:16 +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
e0034ad1c5 Merge "Don't show badge for media style notifications" into rvc-dev 2020-06-19 23:50:28 +00:00
TreeHugger Robot
e0255882c5 Merge "Revert "Revert "Only promote remote animator to top sched group during animation""" into rvc-dev 2020-06-19 23:23:58 +00:00
TreeHugger Robot
263c7f9bc1 Merge "Statsd notif logs: important conversations." into rvc-dev 2020-06-19 22:48:49 +00:00
Robert Snoeberger
daf50b5998 Don't show badge for media style notifications
Fixes: 156834522
Test: manual - Play audio with Castbox. Verify that a badge does not
appear on the app icon.
Test: atest uiservicestests/src/com/android/server/notification/BadgeExtractorTest.java
Test: atest uiservicestests/src/com/android/server/notification/PreferencesHelperTest.java

Change-Id: Ie1ade943215c0b7895956d65064c310d555c6c88
2020-06-19 18:21:55 -04:00
Evan Rosky
bb414bfea2 Merge "Start dim animations on pending vs sync transaction" into rvc-dev 2020-06-19 21:27:29 +00:00
Will Brockman
3ec0934486 Statsd notif logs: important conversations.
Adds an importance level for "important conversation" to the
notification posted and notification channel updated logs.

Bug: 155064930
Change-Id: Ib5a47aeb2da4d8614bfc778f3771479256220b23
Test: atest PreferencesHelperTest NotificationManagerServiceTest
Test: statsd_testdrive
2020-06-19 16:55:02 -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
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
Evan Rosky
b623813592 Start dim animations on pending vs sync transaction
We try to put animations on pending transaction to avoid
jank. In this case, it also avoids bad state (where a surface
is created/parented after its used for animation and
potentially cleaned-up).

Bug: 159336447
Test: enter split primary, in recents, take a screenshot and choose
      share, then expand the primary to leave split. Observe no
      lingering dim layer.
Change-Id: Ia1301a3b22c6eb07192c99b2bfd9aa60ed3c7e95
2020-06-19 10:38:17 -07:00
Chavi Weingarten
259309f1d3 Merge "Don't clear mUsingBLASTSyncTransaction until sending callback" into rvc-dev 2020-06-19 16:42:59 +00:00
Tim Murray
d33c6f8181 Revert "Revert "Only promote remote animator to top sched group during animation""
This reverts commit b83ab2c4f4.

Reason for revert: try original CL again with zygote top-app change

Change-Id: I85a381542a334ec043ac392d74895cf57832bc12
Test: TH
bug: 159201879
2020-06-19 16:40:47 +00:00
TreeHugger Robot
171f5f2857 Merge "Another setting.pkg null check" into rvc-dev 2020-06-19 16:28:18 +00:00
TreeHugger Robot
467891337c Merge "Adding internal version of getUsers without permission check." into rvc-dev 2020-06-19 15:59:00 +00:00
TreeHugger Robot
eca0b3f9fb Merge "「DO NOT MERGE」Revert "Get ApnIpType from ConnectivityManager#getLinkProperties()"" into rvc-dev 2020-06-19 15:21:36 +00:00
TreeHugger Robot
c57d55b7b0 Merge "Pass updatable driver path to native GPU service." into rvc-dev 2020-06-19 14:24:30 +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
TreeHugger Robot
e8e3bf523a Merge "Revert "Only promote remote animator to top sched group during animation"" into rvc-dev 2020-06-19 13:56:46 +00:00
Kyunglyul Hyun
c036350122 System routes are not automatically exposed
From this CL, even for system routes (phone speaker, bt routes),
features are required to get notified of events on routes or to
get them as "available" routes.

By adding this, apps can disable cast -> phone feature.

Bug: 159090706
Test: cts test && atest mediaroutertest && manually
using support v7 demos such that
  with LIVE_AUDIO : nothing changed
  w/o LIVE_AUDIO : cast -> phone feature is disabled
  unregistering callback : cast -> cast (media transfer) and
                           phone -> phone is only enabled <- this is
                           the expected behavior for apps that updates
                           AndroidX library

Change-Id: I4bd27eb1d4776b9cedb59b10e1bac5868d56d305
2020-06-19 22:54:59 +09: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
Mohammad Samiul Islam
806ccabb73 Allow staging multi-package session immediately after abandonment
When we stage a session, we compare it with other already staged
sessions to detect overlap. We do not allow a session to stage if it
contains a package which is already staged in another session.

Due to a bug, while comparing we were not excluding sessions whose
parents were abandoned already. This CL fixes that.

Bug: 159409632
Test: atest
StagedInstallTest#testStageAnotherSessionImmediatelyAfterAbandonMultiPackage

Change-Id: I740986af666b3d2d8ab832c4bcdb855c1ed3c16f
2020-06-19 13:40:05 +01:00
Alex Johnston
2a02c8e381 Merge "Change behaviour of screen capture disabled" into rvc-dev 2020-06-19 12:20:38 +00:00
Jin Seok Park
018afaae7c Merge "[Media ML] Sync with original implementation" into rvc-dev 2020-06-19 11:31:04 +00:00
Jorim Jaggi
268bf68882 Yearly Window Manager spring cleaning #2
- Cache WPC
- Use iteration instead of recursion to check animating

Test: RelayoutPerfTest
Bug: 159056748
Change-Id: Ia7d9514e14568b1aabc08e3b9f9106673e588f2d
2020-06-19 13:21:28 +02: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
Alex Florescu
15522541ff Merge "Add foreground priority flag to broadcasts" into rvc-dev 2020-06-19 10:05:50 +00:00
TreeHugger Robot
ec09cbef94 Merge "Move onKeyguardChangded() to completeUnlockUser() (async)" into rvc-dev 2020-06-19 06:04:28 +00:00
Kyunglyul Hyun
6edbf48c2b Merge "Log transferring and fix verbose system logs" into rvc-dev 2020-06-19 04:32:01 +00:00