Commit Graph

116733 Commits

Author SHA1 Message Date
TreeHugger Robot
61e32caa0b Merge "Propagate AudioAttributes flags to VibrationAttributes" into rvc-dev am: 863c82fa76
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12218307

Change-Id: I3b5157ab8e234e349465ed94f15f6d9ef53cac5f
2020-07-25 00:10:39 +00:00
TreeHugger Robot
863c82fa76 Merge "Propagate AudioAttributes flags to VibrationAttributes" into rvc-dev 2020-07-24 23:55:38 +00:00
Jing Ji
62b56170ac Merge "Java docs update: Advise not to include PII in setProcessStateSummary" into rvc-dev am: fcaa94e2dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12202766

Change-Id: I60e5010b5febdbf05b825ab7cccff03fd3cbbf0b
2020-07-23 22:06:43 +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
eb65f3d86b Merge "docs: Use more inclusive pronouns" into rvc-dev am: 5c4491e04b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12196424

Change-Id: I8c487c80dbe20844d5907d9a1b92a9653fae2dfa
2020-07-22 00:29:12 +00:00
Kevin Hufnagle
5c4491e04b Merge "docs: Use more inclusive pronouns" into rvc-dev 2020-07-22 00:07:00 +00:00
Wale Ogunwale
f4fb8c1457 Merge "Prevent exception when surrounding text retrieval" into rvc-dev am: 309cfa3431
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12167896

Change-Id: Idda9ab4bb5dddc617eb61e4b3355567627ca6fd3
2020-07-21 01:24:31 +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
50e1062193 Merge "Adding documentation to note new intent action changes coming with Android 11." into rvc-dev am: 176b2e0c7f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12180379

Change-Id: Ic79721e99a9f05338f4dd91ebb6685840dc7bfc0
2020-07-17 22:58:18 +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
7df40a82f6 Merge "Fix hiding keyboard animation stuck while dialog dismissing." into rvc-dev am: dac09ee7fe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12174530

Change-Id: I3f50376d7bcdd54ca481dcea77d1aa6b8d812ff7
2020-07-17 21:24:47 +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
fed46df3f3 Merge "Fixes the issue multi-touch causing launcher icons to be not clickable." into rvc-dev am: 94df031718
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12163209

Change-Id: I5bc4dd27fd1fe08ec33b415321d6fc282f3c1b9a
2020-07-17 17:23:47 +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
junyulai
259ec64f48 Attribute data usage to virtual RAT type for 5G non-standalone mode am: 232afa51d9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12166464

Change-Id: I77a3455318db44cf28ca4cfddf86a9767efe6302
2020-07-17 04:03:07 +00: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
1813474cc9 Merge "Remove Type.statusBars from compatInsetsTypes if FLAG_FULLSCREEN" into rvc-dev am: 0b237bb06f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12157384

Change-Id: Ie7bbdf01416680dac708e47347d86718aa22336c
2020-07-15 14:03:34 +00: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
TreeHugger Robot
eecfa86e8c Merge "Updated docs for IInlineSuggestionsRequestCallback.aidl." into rvc-dev am: f65210f9ca
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12142032

Change-Id: Ib25405786ca9c20d602cd3082beb75fed2476cc9
2020-07-14 23:15:42 +00:00
TreeHugger Robot
f65210f9ca Merge "Updated docs for IInlineSuggestionsRequestCallback.aidl." into rvc-dev 2020-07-14 23:02:42 +00:00
Hall Liu
a9d9ea8a3e Merge "Skip carrier priv check for trusted UIDs" into rvc-dev am: f1a6972937
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12141306

Change-Id: I5443d0b523edc6a2a632157294bf9e2520d9c4e2
2020-07-13 23:46:16 +00:00
Adam He
4a1935d990 Updated docs for IInlineSuggestionsRequestCallback.aidl.
Fixes: 160729678
Test: atest android.autofillservice.cts.inline
Change-Id: Ie49267a594524651f0965296c164f7d1e0628cee
2020-07-13 15:28:28 -07: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
96863d0d50 Merge "Consolidate start new input scenerios" into rvc-dev am: 6c440de7a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12086310

Change-Id: I6cfec02a3eaad9e5cb86c2a5811c40f3b5f3a8d0
2020-07-10 18:57:35 +00:00
TreeHugger Robot
6c440de7a4 Merge "Consolidate start new input scenerios" into rvc-dev 2020-07-10 18:42:06 +00:00
Chavi Weingarten
fa48a156c7 Merge "Reparent bounds layer if surface was replaced." into rvc-dev am: ab3d80c98d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12123266

Change-Id: I9e51a03422e2628717bc23a65f4d62d534266a1d
2020-07-10 16:59:09 +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
8e4707ae80 Merge "Update requested state by comparing with source consumer" into rvc-dev am: 894a797421
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12108428

Change-Id: I3de26ac30237f76cd71e0e8639cc4025b754f6ef
2020-07-10 14:03:48 +00: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
64b59634a6 Merge "Add some more public doc for MacAddress" into rvc-dev am: 2ddb47fa19
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12107302

Change-Id: I2dedf3b86e1ecdb36ebfe67397de9664057fc786
2020-07-10 05:00:54 +00: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
d856d8e308 Merge "Don't assume host is wildcard if not provided" into rvc-dev am: a1b6280ec8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12118654

Change-Id: Id4a840f64e04228de024ee755edb0a1e51466edc
2020-07-09 23:44:15 +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
TreeHugger Robot
2b8011102c Merge "Insets: make decorFitsSystemWindowInsets apply cutout insets" into rvc-dev am: e15860371f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12117342

Change-Id: I11fa689dee1ccd7ec08f38ede598996d2ddceabe
2020-07-09 21:30:59 +00:00
TreeHugger Robot
e15860371f Merge "Insets: make decorFitsSystemWindowInsets apply cutout insets" into rvc-dev 2020-07-09 21:18:44 +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
6cca58b722 Merge "Fix javadoc error in ApplicationExitInfo#getDefiningUid()" into rvc-dev am: 42ef19d57c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12118644

Change-Id: I4cbbe16fcf62d01fa76e7756c4a4b554dce78926
2020-07-09 18:14:25 +00:00
Jing Ji
42ef19d57c Merge "Fix javadoc error in ApplicationExitInfo#getDefiningUid()" into rvc-dev 2020-07-09 18:11:00 +00:00
Adrian Roos
2f07569650 Merge "Fix IME flicker: move hiding the surface into the control target" into rvc-dev am: 895a2e626a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12070682

Change-Id: Ib984a4bc34f0527c809de35919340019a04b017a
2020-07-09 17:12:41 +00:00