Commit Graph

8696 Commits

Author SHA1 Message Date
Dmitri Plotnikov
840f73e773 Merge "Use POWER_COMPONENT_ constants instead of TIME_COMPONENT_... constants" into sc-dev 2021-04-26 22:44:26 +00:00
Flavio Fiszman
bf0507b001 Merge "Handling group chat sender" into sc-dev 2021-04-26 17:01:12 +00:00
Alex Johnston
3f716ff7a2 Merge "Remove PasswordMetrics.validatePasswordMetrics isPin param" into sc-dev 2021-04-26 15:24:16 +00:00
Flavio Fiszman
47b06875bd Handling group chat sender
Change-Id: I4e4ff94e3452f3eb74bf8d7af2969e0ce2d3ac91
Test: manual and people/
Bug: 183084944
2021-04-26 14:43:35 +01:00
Louis Chang
d41d71e4f8 Merge "Do not relaunch bg activities when application info changes" into sc-dev 2021-04-26 01:19:44 +00:00
Joy Babafemi
fa71757f91 Merge "UWB: Add getAdapterState System API" into sc-dev 2021-04-24 01:12:49 +00:00
Dmitri Plotnikov
70b37cbf6a Use POWER_COMPONENT_ constants instead of TIME_COMPONENT_... constants
Bug: 186006876
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Change-Id: Ie52616e8d7b0d5c848802af94aeb3d3780af117a
2021-04-23 14:39:28 -07:00
Joy Babafemi
7f91676147 UWB: Add getAdapterState System API
Test: Updated tests for AdapterStateListener.java
Bug: 183254940
Change-Id: I9a7472be2c7cf835cda8910261ba641bf2345b27
2021-04-23 19:14:10 +00:00
Alex Johnston
ad5cac3115 Remove PasswordMetrics.validatePasswordMetrics isPin param
* Remove isPin parameter and use actualMetrics.credType,
  which now includes CREDENTIAL_TYPE_PIN

Bug: 184103377
Test: manual testing
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.ProfileOwnerTest
      atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest
      atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest
Change-Id: Ib79856b14981ef715c941e3cd56bd29ca196f3bb
2021-04-23 13:11:24 +01:00
Neil Fuller
1b2c66567e Merge "Move tests to CTS" into sc-dev 2021-04-23 10:58:22 +00:00
Louis Chang
8b5afd93b6 Do not relaunch bg activities when application info changes
Update the configurations via ActivityTaskManager to prevent the
activities being relaunched while in background. Instead, the
activities will be relaunched after brought to front and being visible.

This also prevents all activities in the system being relaunched
at the same time.

Bug: 185301309
Test: update app info via shell command while activity in background
Change-Id: Ibf93b9e3f203578c25e0b6b50494065938790f24
2021-04-23 14:34:38 +08:00
Bob Badour
0fd3637f6e Merge "[LSC] Add LOCAL_LICENSE_KINDS to frameworks/base" into sc-dev 2021-04-22 23:23:16 +00:00
Dmitri Plotnikov
ae812a3080 Merge "Simplify navigation in BatteryStatsViewer" into sc-dev 2021-04-22 17:57:26 +00:00
TreeHugger Robot
557f9e056e Merge "Expose vibration primitives durations in Vibrator" into sc-dev 2021-04-22 15:44:10 +00:00
Neil Fuller
c57c69a785 Move tests to CTS
This moves tests that cover SDK methods to CTS. Some methods on
TimeZoneConfiguration are not SDK APIs, so those tests remain in
coretests.

Bug: 184947690
Bug: 183239145
Test: atest CtsTimeTestCases
Change-Id: Ic0840cddb907171294f439f19fa09021b3c8807f
2021-04-22 15:30:55 +01:00
Aaron Huang
0924e0d9d6 Merge "Add getters to UnderlyingNetworkInfo" into sc-dev 2021-04-22 03:09:41 +00:00
Dmitri Plotnikov
37e89c99dd Simplify navigation in BatteryStatsViewer
Bug: 185952656
Test: mp :BatteryStatsViewer && adb shell am start -n com.android.frameworks.core.batterystatsviewer/.BatteryConsumerPickerActivity
Change-Id: I5c8958411c2436a0d1e8fafb79759b9e40d81b18
2021-04-21 17:34:08 -07:00
Alexander Dorokhine
5681f7c05f Merge "Update framework from jetpack." into sc-dev 2021-04-21 23:17:21 +00:00
Bob Badour
1cdaca9f84 [LSC] Add LOCAL_LICENSE_KINDS to frameworks/base
Added SPDX-license-identifier-Apache-2.0 to:
  core/tests/hosttests/test-apps/DownloadManagerTestApp/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyAndException/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestApp/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests2/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestAppWithCorruptedDex/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestServices/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v1/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v2/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v3/Android.mk
  core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.mk
  core/tests/overlaytests/host/test-apps/UpdateOverlay/Android.mk
  packages/Android.bp
  packages/SystemUI/tests/Android.mk
  services/tests/servicestests/test-apps/PackageParsingTestManifests/Android.bp
  tests/Camera2Tests/CameraToo/Android.mk
  tests/Camera2Tests/CameraToo/tests/Android.mk
  tests/Camera2Tests/SmartCamera/SimpleCamera/Android.mk
  tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
  tests/CanvasCompare/Android.mk
  tests/FlickerTests/test-apps/Android.bp
  tests/LockTaskTests/Android.mk
  tests/SoundTriggerTests/Android.mk
  tools/aapt2/integration-tests/MergeOnlyTest/App/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/App/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/Split/Android.mk
  tools/fonts/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: Ic480b653df5da840f5e65b818af3de5c8417ab4a
2021-04-21 14:42:18 -07:00
Dmitri Plotnikov
05b84c584e Merge "Save power component names in the summary parcel for MeasuredEnergySnapshot" into sc-dev 2021-04-21 20:58:32 +00:00
Alexander Dorokhine
ca083d96de Update framework from jetpack.
Included changes:
* b7122be: Update Builders to comply with API council requirements.
* 60b34cd: Changes to AppSearchSchema builders to comply with API requirements.
* c6f7eee: Support property paths in GenericDocument.
* cbee331: Update documentation to distinguish between AppSearchSession and GlobalSearchSession
* cbdd3b9: Rename ReportUsage#usageTimeMillis to #usageTimestampMillis.
* cc09d3a: Implement value indices in GenericDocument.
* e7faa03: Rename isIndexNestedProperties to shouldIndexNestedProperties.
* aaa6e81: Support @CurrentTimeMillisLong in export.
* 388c2b4: Rename GenericDocument's "uri" to "id" everywhere.

Bug: 184576792
Bug: 184576806
Bug: 184174844
Bug: 180481315
Bug: 179797058
Bug: 175146044
Bug: 184175636
Bug: 185492298
Test: Presubmit
Change-Id: I81e396c1d4770479654a3a69ea598e23de88ac9a
2021-04-21 11:23:09 -07:00
Joy Babafemi
3c21f3d0e1 Merge "UWB: Add setUwbEnabled System API." into sc-dev 2021-04-21 17:23:47 +00:00
Dmitri Plotnikov
dc231ec035 Merge "Fix BatteryStatsViewer makefile..." into sc-dev 2021-04-21 17:23:17 +00:00
Lais Andrade
8231960159 Expose vibration primitives durations in Vibrator
Fix: 182477149
Test: VibratorTest
Change-Id: I4dd500fe6551645454ac9af24499098a74fd866e
2021-04-21 10:26:13 +00:00
Joy Babafemi
49511145e9 UWB: Add setUwbEnabled System API.
Test: Test updated for AdapterStateListener.java
Bug: 183254940

Change-Id: I269d24c995d8064f8e62c80a1566fa0646e96580
2021-04-21 05:55:58 +00:00
Dmitri Plotnikov
2da1afff2e Fix BatteryStatsViewer makefile...
to allow BatteryStatsViewer to be included in the system build.

Also, setting the launcher icon to match other similar test apps.

Bug: 185952656
Test: include BSV in device.mk, build and flash

Change-Id: I4d0216418dd30b54adb20d88ac121a09e82350a4
2021-04-20 19:57:21 -07:00
Dmitri Plotnikov
442b6a80a4 Save power component names in the summary parcel for MeasuredEnergySnapshot
This is the second attempt at Ibb68bb2ee62678db5f3b30c4f2ef607006ccc81b, which
broke a test

Bug: 185534915
Test: mp :BatteryStatsViewer && adb shell am start -n com.android.frameworks.core.batterystatsviewer/.BatteryStatsViewerActivity
  and check that custom component is displayed as "GPU", not "CUSTOM_10000"
Test: atest FrameworksServicesTests:com.android.server.am.MeasuredEnergySnapshotTest

Change-Id: I9f65488a682233c49d47d73fc9426b76aab07627
2021-04-20 18:24:54 -07:00
Roshan Pius
3deea32184 Merge changes from topic "uwb_aosp_service_permission" into sc-dev
* changes:
  UwbService: Enforce UWB_RANGING runtime permission
  UwbService: Enforce UWB_PRIVILEGED permission
2021-04-21 00:34:54 +00:00
Dmitri Plotnikov
82a0d368cc Merge "Revert "Save power component names in the summary parcel for MeasuredEnergySnapshot"" into sc-dev 2021-04-20 19:03:12 +00:00
Dmitri Plotnikov
ff06a0ffb7 Revert "Save power component names in the summary parcel for MeasuredEnergySnapshot"
This reverts commit efa581e44e.

Reason for revert: Broke a test

Change-Id: Ib5ab56032ba4c4203cbc6f3eaf1e5d80c89a9717
2021-04-20 19:01:52 +00:00
Dmitri Plotnikov
1eb043a982 Merge "Save power component names in the summary parcel for MeasuredEnergySnapshot" into sc-dev 2021-04-20 18:50:54 +00:00
Mark Renouf
4b45c3601b Merge "Account for padding in dispatchScrollCaptureSearch" into sc-dev 2021-04-20 16:09:14 +00:00
TreeHugger Robot
9ab42eb145 Merge "Enforce mutual exclusivity in setScrollCaptureHint" into sc-dev 2021-04-20 13:20:13 +00:00
Aaron Huang
f6008978c4 Add getters to UnderlyingNetworkInfo
Address API review feedback, add getters to UnderlyingNetworkInfo
instead of exposing fields.

Instead of wasting memory by converting this into an array, have
migrateTun take a List<String>. In turn, tunAdjustmentInit should
also take a List<String>.

Bug: 183972554
Test: atest android.net.UnderlyingNetworkInfoTest
Change-Id: Id59744097208d91298a25ef110ade91a9cf291a1
2021-04-20 13:34:52 +08:00
Dmitri Plotnikov
efa581e44e Save power component names in the summary parcel for MeasuredEnergySnapshot
Bug: 185534915
Test: mp :BatteryStatsViewer && adb shell am start -n com.android.frameworks.core.batterystatsviewer/.BatteryStatsViewerActivity
  and check that custom component is displayed as "GPU", not "CUSTOM_10000"
Test: atest FrameworksServicesTests:com.android.server.am.MeasuredEnergySnapshotTest
Change-Id: Ibb68bb2ee62678db5f3b30c4f2ef607006ccc81b
2021-04-19 19:25:36 -07:00
TreeHugger Robot
e354625105 Merge "Rename destSpecs to targetSpecs" into sc-dev 2021-04-20 01:21:06 +00:00
Dmitri Plotnikov
d215e29f75 Merge "Use BatteryStats instead of BatteryStatsImpl in BatteryUsageStatsProvider" into sc-dev 2021-04-19 18:09:31 +00:00
TreeHugger Robot
2ce8aef9ee Merge "Update native font API to read updated font files." into sc-dev 2021-04-17 22:36:55 +00:00
TreeHugger Robot
0566ee964d Merge "Add FontConfig.Font.getPostScriptName API" into sc-dev 2021-04-17 22:34:51 +00:00
Seigo Nonaka
5681124abb Add FontConfig.Font.getPostScriptName API
Bug: 184003133
Bug: 185508395
Test: atest FontManagerTest#fontManager_PostScriptName
Change-Id: Ie44e0d500c61b37035a0b39039891da13cd6a5ce
2021-04-17 00:46:04 -07:00
Matt Casey
21c4c71b2a Merge changes Ie275f5c3,I1cab53a6 into sc-dev
* changes:
  Move RecyclerView scroll capture to the center
  Move scroll capture back to ScreenshotController.
2021-04-17 02:23:28 +00:00
Dmitri Plotnikov
a5163de7af Use BatteryStats instead of BatteryStatsImpl in BatteryUsageStatsProvider
This is being done in preparation for a switch of BatteryStats.dumpLocked
from BatteryStatsHelper to BatteryUsageStats

Bug: 162380414
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests

Change-Id: Ia8bf02116517c77f008b85c2012f68353b39c044
2021-04-16 17:47:04 -07:00
Mark Renouf
c14734d865 Account for padding in dispatchScrollCaptureSearch
When dispatching to self, ViewGroup is  not applying padding
to localVisibleRect, only when dispatching to child views.

Also when deducting padding from the visible bounds,
it must be intersected with bounds, not subtracted.

Test: atest ViewGroupScrollCaptureTest
Bug: 185153400
Change-Id: Ib92e4c552fbe02fd863123f166878e19b8b1c952
2021-04-16 17:01:27 -04:00
Matt Casey
74f9861490 Move RecyclerView scroll capture to the center
Avoid most floating content by centering the requested content within
the view instead of just scrolling so that it's visible.

Bug: 174571735
Test: atest RecyclerViewCaptureHelperTest, plus manual testing across
      major apps.
Change-Id: Ie275f5c37998a9d88e5ccde7af043443cbc4d94c
2021-04-16 15:01:45 -04:00
Almaz Mingaleev
e2b7cb3df2 Merge "Add copy builder to TimeZoneCapabilities." into sc-dev 2021-04-16 17:45:54 +00:00
Mark Renouf
c86a84fd9e Enforce mutual exclusivity in setScrollCaptureHint
This change causes HINT_EXCLUDE to take precedence
over HINT_INLUDE when both are present.

Test: atest ViewGroupScrollCaptureTest
Bug: 184370898
Change-Id: Ie4779067c3db82c65816dc4a5129badf74b3c9b4
2021-04-16 17:01:10 +00:00
Almaz Mingaleev
8533c0b3ca Add copy builder to TimeZoneCapabilities.
This method is added to change capabilities
more easily in Robolectric's TimeManager shadow class.

Bug: 159891384
Test: atest core/tests/coretests/src/android/app/time/*
Change-Id: I10b964666e93af9c2c4ead50088773a77521db65
2021-04-16 14:51:51 +00:00
Joanne Chung
18e0945627 Fix TextClassificationTest#testToBuilder
The PendingIntent checking was enforced in ag/14164166(cfd031a), we
should add mutability flag in the test.

Bug: 185534778
Test: atest android.view.textclassifier.TextClassificationTest
Change-Id: I551b29a7b4f7083469ee11ba5fa0d3069abc9bc1
2021-04-16 15:12:30 +08:00
Mark Renouf
d389165bd6 Merge changes I3a11ac86,I84e0b1fd into sc-dev
* changes:
  ScrollCaptureConnection: fix npe on close() when active
  Scroll Capture: Add configurable post-scroll capture delay
2021-04-15 19:19:27 +00:00
Seigo Nonaka
b950a1f746 Update native font API to read updated font files.
Bug: 184974821
Test: atest NativeSystemFontTest
Change-Id: Ia7fdf6155e07445d7f16edb88fd2a7293e63080c
2021-04-15 11:03:37 -07:00