Commit Graph

104689 Commits

Author SHA1 Message Date
Bradley Allen
5d7be413bc Merge "docs: Added links to the Android 11 summary pages on developer.android.com." into rvc-dev 2020-09-10 15:23:01 +00:00
TreeHugger Robot
ceb7aefd6f Merge "Sanitize more of the notification text fields" into rvc-dev 2020-09-09 23:55:10 +00:00
Seigo Nonaka
8b4cd9aef3 Accept repeated locale as an input of LocaleList construction. am: 41b1674f77
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12540040

Change-Id: I69509d7ddadb1787f56ce31f0ff2fb617537b2ce
2020-09-09 20:33:10 +00:00
Bradley Allen
cefc89c911 docs: Added links to the Android 11 summary pages on developer.android.com.
Test: http://go/forrest-run/L06800000688439076
Bug: 163618180
Change-Id: Ibe136020df4ef60183f3726fc0f6336b58c37f99
2020-09-09 17:41:07 +00:00
Seigo Nonaka
41b1674f77 Accept repeated locale as an input of LocaleList construction.
Repeated locale has not been accepted and IllegalArgumentException
is thrown. Instead of throwing exception, dropping repeated locale
instead.

Bug: 152410253
Test: atest LocaleListTest
Change-Id: I80f243678ac3024eaeb0349f770cff897df7f332
2020-09-08 20:22:48 +00:00
Tiger Huang
dfc8abb1ff Update requested state after applying pending frames
When there is an insets animation, we will stop updating insets source
frames until the animation is done. The previous logic didn't update the
frames within the requested state while the animation is done. And the
frames was relied by InsetsPolicy while playing transient bar animation.
If the frames don't match the display, the insets would be wrong, and
the animation wouldn't be played correctly.

Fix: 161134197
Test: atest InsetsControllerTest
Merged-In: Id8f3c1956fbfe3ad16f167ff76297dde6c634e81
Change-Id: Id8f3c1956fbfe3ad16f167ff76297dde6c634e81
(cherry picked from commit 23c75281ef)
2020-09-07 16:09:08 +08:00
Julia Reynolds
a19f9ed2b1 Sanitize more of the notification text fields
Test: manual; monitor SystemUI performance when an app tries to
post a messaging style notification with messages with long text
Bug: 158304295
Bug: 147358092

Merged-In: c953fdf6bc
Change-Id: I0e2ea12fc3351b1a56645b556720ea2306f5422a
(cherry picked from commit c953fdf6bc)
2020-09-03 19:42:23 +00:00
Andrii Kulian
f21c885ca7 Require permission to create trusted displays
Bug: 162627132
Test: atest VirtualDisplayTest#testTrustedVirtualDisplay
Test: atest
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/bubbles
Test: atest DisplayTest
Test: atest VirtualDisplayTest#testTrustedVirtualDisplay
Test: atest VirtualDisplayTest#testUntrustedSysDecorVirtualDisplay
Test: adb logcat -b events

Change-Id: Id06b2013ef5fdeadf321f14f8b611c733031d54d
Merged-In: Id06b2013ef5fdeadf321f14f8b611c733031d54d
2020-09-01 13:22:29 +08:00
Kevin Hufnagle
e69b8a9006 docs: Fix note about new intent action changes coming with Android 11.
Bug: 155091482
Change-Id: I3dfeb333cbe95880142ed97d0d50fd9f85c52f50
Test: Documentation changes - no test necessary
2020-08-20 18:48:17 +00:00
TreeHugger Robot
18cff6082d Merge "Update docs to clarify how providers can create style bundles and Slices for inline suggestions." into rvc-dev 2020-08-18 00:14:21 +00:00
Bradley Allen
462481663c docs: Removed Q preview language and added a link to the Android 10 page on developer.android.com.
Test: http://go/forrest-run/L62500000661914456
Bug: 149267624
Change-Id: I73b92cf0af8f78117448db9a89d7685f45bc512d
2020-08-11 18:56:15 +00:00
Kevin Hufnagle
24ed56bd0c Merge "docs: Changes "their" to "the" in 2 places" into rvc-dev 2020-08-03 22:26:36 +00:00
Adam He
5277e0781d Update docs to clarify how providers can create style bundles and Slices
for inline suggestions.

Fixes: 162437790
Test: atest android.autofillservice.cts.inline
Change-Id: If02b34ec7978897545c0b7eabfebb8db0b9417c0
2020-08-03 13:06:38 -07:00
Kevin Hufnagle
e39427591a docs: Changes "their" to "the" in 2 places
When referring to a client (piece of software), it's better not to use
a personified pronoun, such as "his" or "their". Changed to "the".

Change-Id: I5d79e70a9135d6f1e8da493fcdd50921b9696e31
Test: none (docs-only change)
Bug: 160937339
2020-07-31 23:28:24 +00:00
Adam He
3532bdaa36 Merge "Updated docs with clarifications on specific limitations with the new Inline APIs." into rvc-dev 2020-07-29 21:45:59 +00:00
Lorenzo Colitti
a40ff70cad Set the NetworkInfo subtype to 0.
For non-telephony networks, this was always set to 0 before R.
In R, it is currently set to the same value as the network type.
This is incorrect because the two have different namespaces.
or example, currently, any network of type WIFI (==1) will have
a subtype of NETWORK_TYPE_GPRS (==1). Similarly, all ETHERNET
networks will have subtype NETWORK_TYPE_1XRTT, all VPN networks
will have a subtype of NETWORK_TYPE_TD_SCDMA, etd.

Bug: 161653721
Test: builds, boots
Change-Id: I07e111c1762e0021c931cefc27f193f78578748b
2020-07-28 09:20:19 +00:00
TreeHugger Robot
83578eaa95 Merge "Update mandatory concurrent stream docs to specify support for lower resolutions." into rvc-dev 2020-07-28 01:47:32 +00:00
Jayant Chowdhary
d537ce04fb Update mandatory concurrent stream docs to specify support for lower resolutions.
Bug: 162110784

Test: make doc-comment-check-docs

Change-Id: I8a2677df320f8f496b185fd80234f04dd9eed97f
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-07-27 17:18:12 -07:00
Adam He
edc354d399 Updated docs with clarifications on specific limitations with the new
Inline APIs.

* limitations with multiple locales.
* limit on max number of suggestions.
* guidance on managing the order of inline suggestions when inflating.

Fixes: 161486684
Test: atest android.autofillservice.cts.inline
Change-Id: Ia560d48f95730d79bc340ff9eb0cf4a5909bf0d3
2020-07-27 16:18:15 -07:00
TreeHugger Robot
863c82fa76 Merge "Propagate AudioAttributes flags to VibrationAttributes" into rvc-dev 2020-07-24 23:55:38 +00:00
Jing Ji
fcaa94e2dc Merge "Java docs update: Advise not to include PII in setProcessStateSummary" into rvc-dev 2020-07-23 21:53:31 +00:00
Lais Andrade
c2777148df Propagate AudioAttributes flags to VibrationAttributes
Set supported flags from AudioAttributes into VibrationAttributes on the
builder constructor.

Fix: b/161761418
Test: manual
Change-Id: I4a8e1db278843b2f9f19aba43b0b8f264cb696bd
2020-07-23 18:05:09 +00:00
Jing Ji
3bda3bf8c6 Java docs update: Advise not to include PII in setProcessStateSummary
Bug: 161812603
Test: m -j offline-sdk-docs & manual verify the javadoc
Change-Id: I741bbf7b83badcd7f1610f31bbd41a49b8b975fb
2020-07-22 11:03:30 -07:00
Kevin Hufnagle
5c4491e04b Merge "docs: Use more inclusive pronouns" into rvc-dev 2020-07-22 00:07:00 +00:00
Wale Ogunwale
309cfa3431 Merge "Prevent exception when surrounding text retrieval" into rvc-dev 2020-07-21 01:03:03 +00:00
Kevin Hufnagle
56cd67c4e4 docs: Use more inclusive pronouns
Change "his" to "their" in 2 places

Change-Id: Ib03e1967edd5d13f999c9290aabc56db33bf4fc0
Test: none (docs-only change)
Bug: 160937339
2020-07-20 22:55:07 +00:00
Kevin Hufnagle
176b2e0c7f Merge "Adding documentation to note new intent action changes coming with Android 11." into rvc-dev 2020-07-17 22:56:58 +00:00
Adrian Roos
dac09ee7fe Merge "Fix hiding keyboard animation stuck while dialog dismissing." into rvc-dev 2020-07-17 21:00:25 +00:00
Josh Imbriani
a66e4ad7c2 Adding documentation to note new intent action changes coming with
Android 11.

Bug: 155091482
Test: Documentation changes - no test necessary
Change-Id: I2472cd2f94d0dc1fac249f99cd91ae201b1f419b
(cherry picked from commit 4a2a4b1a45)
2020-07-17 19:34:13 +00:00
TreeHugger Robot
94df031718 Merge "Fixes the issue multi-touch causing launcher icons to be not clickable." into rvc-dev 2020-07-17 17:19:19 +00:00
Wilson Wu
0ebe70cb0f Prevent exception when surrounding text retrieval
We use same reference from TextView to set the initial
surrounding text. The actual surrounding text may be
modified before retrieval since the mSurroundingText
is mutable. Use a copy of subText should avoid this
concurrent issue.

Bug: 160390184
Test: atest FrameworksCoreTests:EditorInfoTest
Change-Id: I6082a4cae2fcdc4c529dc14e2e5e7a45ab1aae4d
2020-07-18 00:51:47 +08:00
Adrian Roos
a24622cfcd Fix hiding keyboard animation stuck while dialog dismissing.
When dismissing a dialog with EditText focused and keyboard shown,
the keyboard does not get correctly dismissed.

This happens because after CL[1] landed, returning to the  activity won't start
new input connection, and the activity will thus not regain control over
the IME.

This fix restores the previous behavior, where  IMM will start a fake input
connection even without an editor.

[1]: I1ef3d341af9d473d94d52fd1890deafbae2bc9e1

Fix: 161273049
Test: atest CtsInputMethodTestCases
Test: manual as follows
     0) Have some files downloaded in the device
     1) Launch Files app > Browse > Click Internal Storage
     2) Long press on any file > From menu, click "Rename"
     3) Enter some name with soft keyboard and click "OK"
     4) Expect Keyboard should hide

Change-Id: I022ad658844142ff4a4cf3b91953013f2bfbb58a
2020-07-17 18:09:13 +02:00
Pinyao Ting
b4444ff0a1 Fixes the issue multi-touch causing launcher icons to be not clickable.
The issue occurs because TextView#isFromPrimePointer assumes multi-touch
events are happening on the same TextView and relies on
ACTION_UP/ACTION_CANCEL to reset the Prime pointer id.

consider following scenario:
1. ACTION_DOWN (pointer 0) landed on ViewA,
   ACTION_DOWN (pointer 1) landed on ViewB.
2. ACTION_MOVE landed on both ViewA and ViewB, triggering a drag.
3. When all fingers are released, ACTION_CANCEL (pointer 0) will be
   landed on both ViewA and ViewB, so the prime pointer in ViewB is not
   reset due to pointer index mismatch.

This CL always reset prime pointer id whenever ACTION_UP/ACTION_CANCEL
is triggered.

Bug: 157399040
Test: manual
Change-Id: Id35d9eac939378482fa50e85bb5cda58469240ad
2020-07-16 20:59:10 -07:00
junyulai
232afa51d9 Attribute data usage to virtual RAT type for 5G non-standalone mode
Test: atest NetworkStatsSubscriptionsMonitorTest#test5g
Bug: 160727498
Change-Id: I8753e68140c0993773017c9a49bd8a666a364071
Merged-In: I8753e68140c0993773017c9a49bd8a666a364071
(cherry-picked from ag/12167624)
2020-07-16 15:33:35 +08:00
Wale Ogunwale
0b237bb06f Merge "Remove Type.statusBars from compatInsetsTypes if FLAG_FULLSCREEN" into rvc-dev 2020-07-15 13:53:20 +00:00
Tiger Huang
0f310bdec8 Remove Type.statusBars from compatInsetsTypes if FLAG_FULLSCREEN
In the legacy layout world, if a window has FLAG_FULLSCREEN, then its
stable insets won't be affected by status bar. This CL makes the layout
logic compatible.

Fix: 160593171
Test: InsetsStateTest InsetsControllerTest ImeInsetsSourceConsumerTest
Change-Id: I59717e699470273e2462c1ad864e00bb9a126677
2020-07-15 19:00:19 +08:00
Hall Liu
12a3f5cfdc Skip carrier priv check for trusted UIDs
Checking carrier privileges for UIDs with lots of shared apps can incur
a significant performance hit. For UIDs that are fixed and trusted
(system and phone), skip the permission check and always allow.

Also, double the cache size for getPackageInfo in order to reduce the
rate of cache misses.

Bug: 160971853
Test: manual verification -- observed lower rate of cache misses for
getPackageInfo from com.android.phone.

Change-Id: I1399cab579308479d7cf191b8795441cbcd3ff65
2020-07-13 12:45:00 -07:00
TreeHugger Robot
6c440de7a4 Merge "Consolidate start new input scenerios" into rvc-dev 2020-07-10 18:42:06 +00:00
Chavi Weingarten
ab3d80c98d Merge "Reparent bounds layer if surface was replaced." into rvc-dev 2020-07-10 16:49:33 +00:00
Ming-Shin Lu
d43b75cf0e Consolidate start new input scenerios
As CL[1] we introduced WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR start
input reason to ignore start new input when the focused view is
same as current served view and the input connection remains the same for
prevent additonal onStartInput / onFinishInput callback to
InputMethodService.

The main idea in the CL is good but how to judge whether the input connection
remains the same is not accurate.

CL[1] only checking if IMM#mServedInputConnectionWrapper self and its
input connection instance is stil exists, that breaks the following cases
to start new input:

Case 1:
- When device screen off / on to go back to focused app, this case will
  fit WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR use case, so
  IMM#mServedInputConnectionWrapper won't be deactivate and clear, this
  makes wrong when user taps IME picker dialog to switch IME, will hit
  again WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR and never start new
  input for new IME.
  Actually, in InputMethodManager has an ad-hoc check mRestartOnNextWindowFocus
  to start new input when device screen off / on case and switching IME,
  we should not ignore start input since that will conflict with the above
  case.

Case 2:
- As served view is now tracked by ImeFocusController which is per-window
  based instance from the IME focus handling refectoring CL[2],
  but InputMethodManager instance is still per-display based, so
  IMM#mCurrentTextBoxAttribute might be changed when the same app clinet has
  multiple IME focusable window focus changed, because focusing to the next
  IME focusable window will start new input connection and changes
  IMM#mCurrentTextBoxAttribute, so when focusing back to the
  original window, the served view in the original window's
  ImeFocusController will same as focused view, in that case if we didn't
  check if IMM#mCurrentTextBoxAttribute is really aligned with the given
  focused view, will mis-judge start new input timing and caused user can't
  type because the input connection state is obsoleted.

Those cases can be addessed by using new introduced method
IMM#isSameEditorAndAcceptingText, if the focused view is not aligned
with same editor or the editor is inactive, we should start new input
for Case 2, that also can fix Case 1 that we previously ignored starting
new input when switching IME.

Beside, we also found CL[3] leverages
InputMethodManager#mRestartOnNextWindowFocus to start new input when window focus
changed, since originally this ad-hoc check is only used to re-start input
for Case 1.
As we re-visited the necessary start new input scenerio is only when:
   - Device screen off -> on
   - Switching IME
   - the input connection obsoleted
     (this also includes when window focus changed)

As the result, we can remove all unnecessary logics in IMMS
instroduced by CL[1] and remove unnecessary
InputMethodManager#mRestartOnNextWindowFocus from CL[3], and preserve
the behavior is almost same as Q.

[1]: I2da99ae67b9ce4051dec0c0f0e975ebe6e1ab118
[2]: Ib455704fe1e9d243f93190a84f230210dbceac2a
[3]: I8d4fff94ba9313b773bc27fcbd019cc88580d3e9

Fix: 160391516
Bug: 158624922
Bug: 152373385

Test: atest FocusHandlingTest
Test: atest InputMethodServiceLifecycleTest
Test: manual for case 1
     0) pre-install 3rd party IME app
     1) launch message app and taps Search bar to focus.
     2) turn off screen
     3) turn on screen to back to focused app
     4) press IME switch icon from nav bar
     5) choose next IME, expect the IME should be changed.
Test: manual for case 2
    0) Sample app with 2 activites, each activity the layout has
       EditText
    1) Launch activity A, focus EditText
    2) Launch activity B and focus EditText
    3) Press back key to back to activity A
    4) Verify if typing with keyboard is workable.

Change-Id: I1ef3d341af9d473d94d52fd1890deafbae2bc9e1
2020-07-11 00:42:17 +08:00
Tiger Huang
894a797421 Merge "Update requested state by comparing with source consumer" into rvc-dev 2020-07-10 13:51:37 +00:00
Tiger Huang
ff06666dba Update requested state by comparing with source consumer
If the local state and mLastDispatchedState are the same, the logic in
onStateChanged will skip updating the requested state. This could be an
issue, for example, a new focused window requested to hide status bar,
but status bar has already been hidden by the previous focused window,
so the new focused window will never send the requested state to server.
This can easily happen when an immersive activity is re-created due to
the configuration change.

This CL updates the requested state if any visibility within it is not
the same as the requested visibility of the source consumer, while
receiving controls.

Fix: 160854328
Test: atest InsetsControllerTest
Test: Swipe to show transient bars after rotating an immersive activity
Change-Id: I5d9acb1b59252fa80e66070db86b2555764588da
2020-07-10 18:04:57 +08:00
Chalard Jean
2ddb47fa19 Merge "Add some more public doc for MacAddress" into rvc-dev 2020-07-10 04:51:28 +00:00
chaviw
c1dcac9568 Reparent bounds layer if surface was replaced.
In a normal case, the app will get either a visibility changed to
false or stopped from system server to indicate that the content
should be cleaned up. In those cases, it will request a relayout
to WM, which will notify VRI that the surface is gone. Since the
VRI surface is removed, the SV and bounds layer will get notified
that they should be destroyed. On the next relayout, the VRI will
get a new surface and notify SV and the bounds layer to create
new surfaces.

The scenario in the bug happens when VRI receives a visibility change to
false, but doesn't process the information fast enough. By the time it
calls relayout, WMS is in the state where the client is visible again. This
time the relayout will return a valid surface so the SV and bounds layer
will not get cleaned up. The reason this causes issues is VRI now has a
new main surface. The bounds layer is parented to the old layer that's been
deleted so it's not parented to anything. The SurfaceView is a child of
the bounds layer so it also renders offscreen.

The reparent needs to be done on the client side since WMS won't
reparent the children to the new surface if it thinks the app is
closing. WMS gets the signal that the app is stopping, but on the client
side, it doesn't get stopped since it's restarted quick enough. WMS
doesn't want to keep around old children since they will leak when the
client creates new children.

This change will reparent the bounds layer to the new VRI surface. It's
possible WMS will take care of this in certain cases where the app
isn't stopped. But for those cases, the reparent will not have
any effect since the bounds layer will be correctly parented.

Fixes: 159545768
Test: Can no longer repro black SV in maps
Test: Test app with SV and delay in onPause no longer has the same issue
Change-Id: I616652e1cc4380ebbcb386586d8d5889fcc19497
2020-07-10 00:32:46 +00:00
Patrick Baumann
a1b6280ec8 Merge "Don't assume host is wildcard if not provided" into rvc-dev 2020-07-09 23:31:56 +00:00
Patrick Baumann
aab67c2b9d Don't assume host is wildcard if not provided
This change ensures that while parsing a package, we require an explicit
wildcard in the queries->intent->data->host field. Prior to this change,
we were defaulting to wildcard when not provided. This resulted in,
e.g. someone trying to get visibility to just browsers actually getting
access to all packages that handle any web intent.

Fixes: 160868841
Test: atest AppEnumerationTests IntentFilterTest
Change-Id: I771845467928b6655fe19efe89bd2ca548dca6e5
2020-07-09 12:28:54 -07:00
Jing Ji
42ef19d57c Merge "Fix javadoc error in ApplicationExitInfo#getDefiningUid()" into rvc-dev 2020-07-09 18:11:00 +00:00
Adrian Roos
895a2e626a Merge "Fix IME flicker: move hiding the surface into the control target" into rvc-dev 2020-07-09 17:02:15 +00:00
Jing Ji
219da992ad Fix javadoc error in ApplicationExitInfo#getDefiningUid()
Bug: 160875447
Test: m -j offline-sdk-docs & manual verify the javadoc
Change-Id: Iae09584b42990092166be3c9a2bb792fa2d0abef
2020-07-09 09:33:10 -07:00
TreeHugger Robot
276abcb6b3 Merge "ViewRootImpl: Call surface destroy callback after layout pass" into rvc-dev 2020-07-09 16:32:33 +00:00