Commit Graph

2673 Commits

Author SHA1 Message Date
Chavi Weingarten
3f7cb9bcf5 Merge "Updated ImpressionAttestation API signatures" 2020-11-20 16:50:20 +00:00
chaviw
2252f0b197 Updated ImpressionAttestation API signatures
1. Updated verifyImpressionToken to send back a boolean instead of an
integer. Updated docs
2. Added salt value to generateImpressionToken and verifyImpressionToken

Test: Builds
Bug: 155825630
Change-Id: I672500ef2337796775f9d9f32e626df69a886f9f
2020-11-19 11:35:05 -08:00
Fabian Kozynski
83be4ae5ad Empty message queue on TileService#onDestroy
onDestroy is called by system_server asynchronously on the main thread.
If there are queued messages (from the binder interface), remove them.
This follows the contract that methods in the service will not be called
after onDestroy

Test: manual with test tile
Fixes: 172511340

Change-Id: I7d46c065d5a9597ce1d44bc5707e79b302b201f6
2020-11-19 13:07:42 -05:00
chaviw
ade3051c19 Bind ImpressionAttestationService to system
Added ImpressionAttestationController in WindowManager to allow the
ImpressionAttestationService to bind to system.

Added helper methods in ImpressionAttestationController:
1. Make requests blocking since they will come from a binder request and
can block without causing issues in WindowManager

2. Added timeout so the service will get torn down after 10s of
inactivity

3. Added cache of hashing algorithms list so they can be retrieved
without making another IPC call.

Test: Builds
Bug: 155825630
Change-Id: Ic80206fb84a8f020f45d5aa053ee86a005da4591
2020-11-18 10:46:58 -08:00
Sean Pont
3461caef4e Fix broken Quick Access Wallet CTS test
Fixes: b/173332407
Test: manual - start quick access wallet
Test: atest
CtsQuickAccessWalletTestCases:android.quickaccesswallet.cts.QuickAccessWalletClientTest#testCreateWalletIntent_parsesXmlAndUsesCorrectIntentAction
-- --abi x86

Change-Id: Id1da76c184690798c5ece35c479b92f2ae7c6936
2020-11-17 10:31:35 -08:00
Aurimas Liutikas
1394a019e7 Remove legacy style metalava suppression
@SuppressLint("Doclava125") is a legacy way of suppressing
RequiresPermission check. Updating to the new style of suppression
so metalava no longer has to support the legacy mode.

sed -i "s/@SuppressLint(\"Doclava125/@SuppressLint(\"RequiresPermission/" \
core/java/android/app/admin/DevicePolicyManager.java \
core/java/android/hardware/hdmi/HdmiControlManager.java \
core/java/android/hardware/location/ContextHubManager.java \
core/java/android/hardware/usb/UsbDeviceConnection.java \
core/java/android/net/TrafficStats.java \
core/java/android/os/RecoverySystem.java \
core/java/android/os/storage/StorageManager.java \
core/java/android/service/persistentdata/PersistentDataBlockManager.java \
location/java/android/location/LocationManager.java \
media/java/android/media/AudioManager.java \
telecomm/java/android/telecom/TelecomManager.java \
telephony/java/android/telephony/CarrierConfigManager.java \
telephony/java/android/telephony/TelephonyManager.java \
wifi/java/android/net/wifi/RttManager.java \
wifi/java/android/net/wifi/WifiScanner.java

Test: make
Exempt-From-Owner-Approval: No-op change
Change-Id: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
2020-11-12 18:27:15 -08:00
Aurimas Liutikas
8f8eaec801 Merge "Suppress all hidden abstract methods in constructable classes." 2020-11-12 23:37:21 +00:00
Aurimas Liutikas
796760c56e Suppress all hidden abstract methods in constructable classes.
Having a hidden abstract method for a class that can be extended
means that public implementors cannot implement these hidden methods
posing a risk that custom implementations will not have required
abstract methods resulting in an exception.

Bug: 151134792
Test: make update-api
Change-Id: I758d12465fabc671be19bedeeceb16885de23c87
Exempt-From-Owner-Approval: large scale suppression of existing issues,
    no-op in terms of behavior
2020-11-11 23:16:32 +00:00
Ytai Ben-tsvi
93f4464b76 Merge "Clean up on client death in SoundTriggerService" 2020-11-11 21:31:39 +00:00
Ytai Ben-Tsvi
3559e8693e Clean up on client death in SoundTriggerService
This change adds tracking of SoundTriggerService client death
and frees up resources whenever that happens.

Test: Kill Now Playing process and observer recovery.
Bug: 171026874
Change-Id: Ie31d0a3ed392b1513b4e81ec3c344f4e79adcf52
2020-11-11 10:12:59 -08:00
Chavi Weingarten
d87022d4ab Merge "Initial commit for ImpressionAttestationService" 2020-11-10 17:01:03 +00:00
chaviw
4ecd43d5ce Initial commit for ImpressionAttestationService
Created an ImpressionAttesationService AIDL interface and implemented
the methods that are needed for the ExtServices module.

Test: Builds
Bug: 155825630
CTS-Coverage-Bug: 171926232
Change-Id: Id4b359d3daa72cf0548d8254cacae313f34ac763
2020-11-04 17:44:19 -08:00
Eugene Susla
3f1e82b12c Merge "Disregard annotation params for stale dataclass detection" 2020-11-04 23:57:15 +00:00
Eugene Susla
ddb2681455 Disregard annotation params for stale dataclass detection
Annotation processor seens annotation args with constants already inlined,
making it challenging to compare to the souce-generated metadata that contains
initial expressions.

For now just ignoring args for all non-DataClass annotations to prevent false positives

Test: . frameworks/base/tests/Codegen/runTest.sh
Exempt-From-Owner-Approval: changing metadata on multiple files
Change-Id: I640816ae0f20f36b1b828bc2161f53788c4a4dae
2020-11-04 12:40:58 -08:00
Malcolm Chen
38d5e091d0 Restructure CarrierMessagingServiceWrapper with better interfaces.
- CarrierMessagingServiceWrapper is now a final class with only
APIs of direct actions on messaging.
- The original abstract parts of the class are now interfaces:
interface CarrierMessagingServiceConnectionCallback
and Runnable callback.
- CarrierMessagingCallbackWrapper is renamed to
CarrierMessagingCallback

Bug: 172087216
Test: build and manual
Change-Id: I1760623543b929a51ce26dc7dcc5f8ebe7fd9732
2020-11-03 14:00:25 -08:00
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