Commit Graph

2658 Commits

Author SHA1 Message Date
Julia Reynolds
1bac483432 Merge "Update api name for clarity" 2020-10-29 15:24:06 +00:00
Mathew Inwood
8e742f928e Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

This is a resubmit of ag/12929664 with some APIs excluded that caused
test failures; see bugs 171886397, 171888296, 171864568.

APIs excluded:
Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord;
Landroid/os/Process;->myPpid()I
Landroid/os/SharedMemory;->getFd()I
Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I

Bug: 170729553
Test: Treehugger
Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
2020-10-29 11:51:12 +00:00
Hongwei Wang
286c33a5c5 Merge "Revert "Add maxTargetSdk restriction to unused APIs."" 2020-10-28 23:58:21 +00:00
TreeHugger Robot
f4896df858 Merge "Some updates to DND logging" 2020-10-28 20:33:12 +00:00
Hongwei Wang
050275cd83 Revert "Add maxTargetSdk restriction to unused APIs."
This reverts commit 72f07d6a8a.

Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397

Bug: 171886397
Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
2020-10-28 20:16:22 +00:00
Nikita Dubrovsky
909bb8a045 Merge "Use a separate code path for rich content in augmented autofill" 2020-10-28 18:43:30 +00:00
Julia Reynolds
79f7901b52 Some updates to DND logging
Store more messages & clean up some formatting so the log is easier
to read

Test: manual
Bug: 170565565
Change-Id: I195109e136cb10f0ff7dd35c883134cebdbfddad
2020-10-28 14:34:08 -04:00
Julia Reynolds
c361d7b5e7 Update api name for clarity
Test: cts
Fixes: 170705349
Change-Id: Id1355e8c93e2b88f701834c06669ed390cd503fb
2020-10-28 16:06:06 +00:00
Nikita Dubrovsky
00d2ce0b6f Use a separate code path for rich content in augmented autofill
Image suggestions (and other rich content) are not handled the same way
as primitive autofill values. These suggestions are also only applicable
to augmented autofill. Therefore, instead of reusing AutofillType and
AutofillValue, we use a separate code path to insert rich content. A
follow-on change will remove AUTOFILL_TYPE_RICH_CONTENT and the
corresponding code on AutofillValue.

Bug: 168837034
Test: Manual and unit tests
  atest CtsAutoFillServiceTestCases:DatasetTest
  atest CtsAutoFillServiceTestCases:InlineAugmentedAuthTest
  atest CtsAutoFillServiceTestCases:InlineAugmentedLoginActivityTest
Change-Id: I4fa3baf2b545908fc25f3a6e28a7addc7004786b
2020-10-27 16:16:06 -07:00
Mathew Inwood
72f07d6a8a Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
2020-10-27 15:46:07 +00:00
Fabian Kozynski
a26922c44e Merge "Add ThumbnailTemplate" 2020-10-26 14:19:48 +00:00
Jeff Sharkey
305ef9e1cf Migrate hot codepaths to formatSimple().
The recently added TextUtils.formatSimple() can efficiently format
simple strings, roughly 6.5x faster than using String.format().

This change starts using this new method in hot codepaths identified
from pprof traces, and this CL alone should reduce system_process CPU
usage by 0.24%.  Linked bug has detailed pprof screenshots.

Bug: 170978902
Test: atest FrameworksCoreTests:android.text.TextUtilsTest
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Ie5a21a24be6dfcdb29768fe235e20f050fc111c7
2020-10-22 12:48:13 -06:00
Fabian Kozynski
47113cf2d2 Add ThumbnailTemplate
Adds a template to support controls that display a thumbnail. There's an
active parameter that indicates whether it's a "live" feed.

Test: atest ControliTemplateTest ControlProviderServiceTest
Fixes: 170646657
Change-Id: Iaf5053920a34ab0b0b598be44a5482d832d48688
2020-10-22 10:38:30 -04:00
Jeff Sharkey
1992cdb4de Merge changes from topic "oct16c"
* changes:
  Apply fixes for EfficientStrings.
  Apply fixes for EfficientStrings.
  Apply fixes for EfficientStringsChecker.
  Apply fixes for EfficientCollections.
  Trivial refactor for consistent naming.
  Expand formatSimple() to support widths.
  Refinement of EfficientStringsChecker.
2020-10-21 15:27:15 +00:00
Tiger Huang
9e2c966d61 Merge "Don't dispatch legacy insets to client" 2020-10-21 15:23:27 +00:00
Tiger Huang
2bf8c796c5 Don't dispatch legacy insets to client
The server won't dispatch the legacy content insets, stable insets, and
visible insets to the client. The insets would be computed from the
insets state by the client.

This CL also fixes the insets scaling issue in compatible mode.

Bug: 149813814
Fix: 169940916
Fix: 165412978
Test: atest WindowAddRemovePerfTest InsetsAnimationControlImplTest
            ActivityRecordTests DisplayPolicyLayoutTests
            InsetsPolicyTest InsetsStateControllerTest
Change-Id: I83570973f587a6abf887752494f750b46e3e484d
2020-10-21 20:20:21 +08:00
Jeff Sharkey
1c08f48253 Apply fixes for EfficientStringsChecker.
The recently-built Error Prone checker has found many instances where
we're always paying the cost of StringBuilder concatenation, even in
the typical cases where preconditions are successfully met.

Benchmarks have shown that even when replacing these with varargs
formatter strings, the default case is 20x faster.

Bug: 170978902
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: If8c00bc73467bfb91ec16c162969c9d26ca53646
2020-10-20 22:00:16 -06:00
Anton Hansson
586a3cf229 Remove @TestApi from @SystemApi symbols
I ran these commands:
    cd frameworks/base
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs'
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs'

Bug: 171179806
Test: m checkapi
Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789
2020-10-20 09:04:03 +01:00
Tiger Huang
e1833c6cfd Merge "Make the requested visibility always up-to-date" 2020-10-17 09:18:03 +00:00
Nicholas Ambur
7466c85160 Merge "update AlwaysOnHotwordDetector javadoc" 2020-10-16 17:09:14 +00:00
Tiger Huang
bf015c77b4 Make the requested visibility always up-to-date
The new logic sends the requested visibility to server even when the
client doesn't have a control. This makes the requested visibility
reliable at the server side.

This CL also changes getRequestedState to getRequestedVisibility in
WindowState, because the frames in getRequestedState are not reliable.

Fix: 161247175
Fix: 166819574
Test: atest DisplayPolicyLayoutTests DisplayPolicyTests InsetsPolicyTest
            InsetsSourceProviderTest InsetsStateControllerTest
            WindowStateTests InsetsAnimationControlImplTest
            InsetsControllerTest WindowAddRemovePerfTest
            ActivityRecordTests
Change-Id: I7d32dacaa1302bab61386f5bd69aaa7dde953ebe
2020-10-16 16:38:08 +08:00
TreeHugger Robot
855b94d7d7 Merge "Add the reason why a save dialog was not shown to FillEventHistory." 2020-10-16 03:21:16 +00:00
Roman Kalukiewicz
34573d564a Merge "Add @Nullable annotation to the parameter of Object.equals() methods." 2020-10-16 01:25:15 +00:00
Nicholas Ambur
b1fce32b42 update AlwaysOnHotwordDetector javadoc
Update AlwaysOnHotwordDetector.Callback#onAvailabilityChanged API
documentation to reflect its current behavior.

Test: N/A
Bug: 170681090
Change-Id: I6b16b527a521af66367caaeeb28cc73ae22b0272
2020-10-15 17:41:09 -07:00
TreeHugger Robot
376619a9d9 Merge "Fix dream letterboxed when there is a cutout" 2020-10-15 19:05:55 +00:00
Roman Kalukiewicz
24403f7ef2 Add @Nullable annotation to the parameter of Object.equals() methods.
Those annotations could be inferred by some tools (like Kotlin), but the
https://checkerframework.org/ doesn't check inherited annotations
complaining about all equals() invocations that get nullable argument.

The change was generated by running

find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /'

in the frameworks/base directory and by automatically adding and
formatting required imports if needed. No manual edits.

Bug: 170883422
Test: Annotation change only. Should have not impact.
Exempt-From-Owner-Approval: Mechanical change not specific to any component.
Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
2020-10-15 10:48:01 -07:00
Galia Peycheva
cf0c106c22 Fix dream letterboxed when there is a cutout
Fix: 170167239
Test: m && flash && verify the dream is fullscreen

Change-Id: Id26d3bde207da4168db32dc81a3ad8e001174495
2020-10-15 18:22:03 +02:00
chaviw
4a10b38ad4 Removed separate SurfaceControl for Blast
If Blast was enabled, WindowStateAnimator would create a container layer
and then a blast layer as a child. This caused some issues with
reparentChildren and relative Z, so instead of trying to continously fix
those issues, just use one layer. If blast is enabled, it will create a
single SurfaceControl with type blast. Otherwise, it will create a
BufferQueueLayer.

This means that we have to be careful with setting any properties on
the layer since the blast adapter could also be modifying the layer.
This is in the right direction since we will move all transactions for
the layer to the client, eventually.

Test: YT and Chrome with and without Blast
Change-Id: I43efc37663696ba8e54d341a03531f0048ee6a14
2020-10-13 17:48:57 -07:00
lpeter
5518d64780 Add the reason why a save dialog was not shown to FillEventHistory.
In order to provide a better user experience, it would better know the
reason why a save dialog was not shown and improve the autofill experience.
So it is necessary to add the reason why a save dialog was not shown to
FillEventHistory.

Bug: 158328375
Test: atest FillEventHistoryTest
Test: atest InlineFillEventHistoryTest
Change-Id: I50c1e40334066d3f4844426c4b03294079a967b2
2020-10-14 02:35:10 +08:00
TreeHugger Robot
c7229847fb Merge changes from topic "jr-ranking-convo"
* changes:
  Add flag for pendingintent
  Allow NLSes to see conversation information
2020-10-12 19:21:44 +00:00
Steve Elliott
467b8196aa Fix Ranking#getSmartReplies/Actions methods to actually be @NonNull
Test: atest, manual
Change-Id: I4d4305127c4f0f041c7e9a0d8b50faf5d295ceeb
2020-10-10 05:11:32 +00:00
Julia Reynolds
be75d51708 Allow NLSes to see conversation information
Test: atest
Bug: 167547800
Change-Id: I9b7930951fa7d2550b21c0fa398fc7ff7cc9566f
2020-10-09 14:58:36 -04:00
Tiger Huang
b7d379147e Merge "Remove redundant logic about System UI visibility" 2020-09-28 13:30:22 +00:00
Tiger Huang
a9b8fa272c Remove redundant logic about System UI visibility
This CL removes
- mSeq
- System UI flags used to communicate between WMS and System UI
- redundant AIDL methods
- redundant fields and methods
- redundant tests
- PolicyControl

This CL also
- refines the format in DisplayPolicy#dump
- sends a boolean to InputManager to indicate if System UI is in a low
  profile mode instead of sending the legacy system UI visibility

Bug: 149813814
Fix: 169105126
Test: presubmit
Test: dumpsys window displays
Test: See if the layout of ImmersiveModeConfirmation is as expected
Change-Id: I8c8df509355bebc9b560af57d5458614557bcd2f
2020-09-28 02:04:21 +08:00
Ytai Ben-tsvi
189d6050da Merge changes from topic "new-perm"
* changes:
  Demote AlwaysOnHotwordDetector to SystemApi
  Sessionize VoiceInteractionManagerService
  Sessionize the SoundTriggerService layer.
  Use standard API in SoundTriggerTestApp
  Fix bug in dumpsys
  Require identity information in SoundTrigger.java
  Associate an originator identity to sessions
  Extract permission checking as a separate aspect
  Correctly handle HAL death
2020-09-21 19:07:04 +00:00
Beverly
59b7bd2a0a Separate time string into two unique strings
In certain languages, "Until Tue, 9AM" and "Unil 3pm" are formatted
differently, so separate them into two unique strings for better translation.

Test: manual
Fixes: 165796742
Change-Id: Ib7c44714191acca427bcee0a4d88e1cb50a90afc
2020-09-17 18:32:17 +00:00
Ytai Ben-Tsvi
c4d23a482d Demote AlwaysOnHotwordDetector to SystemApi
AlwaysOnHotwordDetector gets demoted from public to SystemApi and
new permissions are enforced on its methods that imply usage of the
microphone via sound trigger.

Bug: 163865561
Change-Id: I113d69e569962b20d9d7dd1c6815daa6fb0650c5
2020-09-16 15:14:17 -07:00
Jeff Sharkey
4b5b0174d0 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc am: da7478b570 am: 487d394296
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: Id01f468b43fd5b2aada78608010625b392c1b647
2020-09-15 21:01:48 +00:00
Jeff Sharkey
487d394296 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc am: da7478b570
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I79488866c538bf9e76d0a6429e30262978f6fdab
2020-09-15 00:13:08 +00:00
Jeff Sharkey
da7478b570 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I9b79dbf3e9983523db11599d8ae289b05aabf80c
2020-09-14 23:42:34 +00:00
Jeff Sharkey
741c0a78cc Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I7da537200efe31e803234bd1a0236843064186c8
2020-09-14 23:10:42 +00:00
Jeff Sharkey
a8cec413b6 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I245b8d9cac722da76ea67983738a3cbb9deb68df
2020-09-14 10:00:07 -06:00
Jeff Sharkey
705f6bec2d Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I53003332717baf57dc088b2f6b969cdb1863f65e
2020-09-14 09:59:01 -06:00
Ytai Ben-Tsvi
10c9b09f25 Sessionize VoiceInteractionManagerService
This change associates an identity with every
VoiceInteractionManagerService session.

Change-Id: I6c87c2976a4409b8dda4480234d794db91cee374
Bug: 163865561
2020-09-10 13:27:08 -07:00
Riddle Hsu
ccaeffc03f Remove Session#getDisplayFrame
The frame won't be changed if there is no IWindow#resized or
IWindowSession#relayout. So it can be retrieved from these methods
directly instead of another binder transaction.

And because some parameters are usually used together for layout,
the parameters are consolidated into a new ClientWindowFrames.
That reduces changing the interface in the future if the frame
related information needs to be changed.

Also refine the resize handling in ViewRootImpl to make it easier
to read.

There should be no behavior change by this modification.

Bug: 161781274
Test: WmTests, DialogFrameTests

Change-Id: I9f711ad2023442046fa8582944320b98e7c4ecfa
2020-09-10 00:26:11 +08:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Treehugger Robot
835ed973ec Merge "Update language to comply with Android's inclusive language guidance" am: 4983d13ccc am: 28a65b8942 am: 92876acc20 am: fdeef2b1ed am: 1a3ff01217
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1403549

Change-Id: I61d6b7591059e1c91d878d3c55d9a84d3bf3c800
2020-08-20 13:29:15 +00:00
Treehugger Robot
1a3ff01217 Merge "Update language to comply with Android's inclusive language guidance" am: 4983d13ccc am: 28a65b8942 am: 92876acc20 am: fdeef2b1ed
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1403549

Change-Id: I80116dde66a0aef45add805eb2e7ba5eeef04c4c
2020-08-20 13:13:48 +00:00
Treehugger Robot
fdeef2b1ed Merge "Update language to comply with Android's inclusive language guidance" am: 4983d13ccc am: 28a65b8942 am: 92876acc20
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1403549

Change-Id: I99915dd0ff99245aad2c31e2d0c0a7daa79f0b92
2020-08-20 13:02:46 +00:00
Treehugger Robot
92876acc20 Merge "Update language to comply with Android's inclusive language guidance" am: 4983d13ccc am: 28a65b8942
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1403549

Change-Id: I7c40c508a60dd793d0ffc3cd01ab0cc17345e759
2020-08-20 12:34:19 +00:00