Commit Graph

8959 Commits

Author SHA1 Message Date
Bernardo Rufino
d60218eb45 Merge "Log.wtf in mismatch + tests" am: 1cdbc7cbd1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1837194

Change-Id: I185410ce82ca057b6767d5ca0ff0368f046a1dff
2021-09-30 10:31:03 +00:00
Baligh Uddin
d4f12c6ea6 Remove frameworks/base/apex/appsearch and associated tests
BUG: 192108282
Test: TH
Merged-In: I38469ad5df100e90aba81bbdc82078b568301f09
Change-Id: Ib7e97c6ee7dff1c5d0aad2c21635e74510d523a6
2021-09-29 23:40:11 +00:00
Bernardo Rufino
95ace87925 Log.wtf in mismatch + tests
Log mismatches as wtf to be able track those. Also added unit tests
around kindofEquals() and r/w mismatches.

Test: atest -d android.os.cts.ParcelTest android.os.cts.BundleTest android.os.BundleTest android.os.ParcelTest
Bug: 195622897
Change-Id: I361dd144b23975eedc8b19ed65457a1c5405936e
2021-09-29 13:51:43 +01:00
Colin Cross
abb70e433a Merge "Convert DownloadManagerTestApp to Android.bp" am: 46d22e3c87
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1829055

Change-Id: Ief2fc9ff1f69ae768f3d4b54242a2f95deea6344
2021-09-20 20:38:38 +00:00
Colin Cross
35f4acb9bd Merge "Convert MultiDexLegacy* tests to Android.bp and d8 --main-dex-rules" am: 58210e2960
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1829054

Change-Id: I11dfd1a08745f9d45861ec296416bad0aa4e20d9
2021-09-20 20:37:50 +00:00
Colin Cross
6f4e26df2b Convert DownloadManagerTestApp to Android.bp
See build/soong/README.md for more information.

Test: mma
Change-Id: I2d3fefc4467cde83d8a93217935b908230bcbade
2021-09-20 20:22:35 +00:00
Colin Cross
5f4f5562e0 Convert MultiDexLegacy* tests to Android.bp and d8 --main-dex-rules
The mainDexClasses script is obsolete, pass the rule to d8 with
--main-dex-rules instead.

Test: mma
Change-Id: Ia88660550c3e57749b8ccb154e97c31aaf2fcf3a
2021-09-20 20:22:25 +00:00
Elliott Hughes
76aa934468 Merge "Set $TMPDIR as well as java.io.tmpdir." am: 1353c41379
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1821337

Change-Id: Ib98b38571754781102093c67d15ac3364c5dc029
2021-09-14 17:08:20 +00:00
Elliott Hughes
d5ccb038f6 Set $TMPDIR as well as java.io.tmpdir.
This helps functions like tmpnam() and tmpfile() to "just work", like
their Java equivalents.

Bug: https://issuetracker.google.com/36991167
Bug: http://b/174682340
Test: atest FrameworksCoreTests:android.app.activity.ActivityThreadTest
Change-Id: Ife785f0ca69a34ba2c6b5d1e8e23f8b883d8fc8f
2021-09-08 12:31:25 -07:00
Treehugger Robot
26531301a0 Merge "create library for mainline module" am: c59870928e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1818896

Change-Id: I048c27593314c00706f29db19b6d20ed4b899ae2
2021-09-07 14:00:18 +00:00
William Escande
a6fb9459cc create library for mainline module
This library is a temporary work to link all mainline module using
statemachine.
Once this is done, we will be able to move the library to
frameworks/libs/modules-utils

also fix some typo in state* files

Bug: 198418216
Tag: #refactor
Test: None
Change-Id: I1bec7c7bdb25bf3397a742a356aa1f18fddf7d89
2021-09-06 15:28:09 +00:00
Jeff DeCew
bce9262c0d Merge "Add notifications team as OWNERS of notification-related utilities and their tests" am: 39366563d3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1796768

Change-Id: I6bd3759e5e7e37aaa1a2dbcda3b0ecba073a67a0
2021-08-24 17:13:15 +00:00
Jeff DeCew
1cbc573b93 Add notifications team as OWNERS of notification-related utilities and their tests
Change-Id: I153ab4e182a0843706c25f03c891a92eb48eea9c
2021-08-16 14:56:48 +00:00
Ruslan Tkhakokhov
7d77e932b6 Merge "Handle empty <cloud-backup> section in android:dataExtractionRules" into sc-dev am: b72bf2927e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15462078

Change-Id: I2c136b39d1368dc2add5aee0e6d0c42360915fa7
2021-08-06 22:03:27 +00:00
Ruslan Tkhakokhov
21f45cd998 Handle empty <cloud-backup> section in android:dataExtractionRules
Currently the <cloud-backup> section in android:dataExtractionRules is
ignored unless it contains rules. Instead, we should interpret it as
'everything other than cache and no-backup dirs is eligible for cloud
backup'.

Bug: 195095045
Test: 1. atest BackupEligibilityHostSideTest
      2. Use a test app with empty <cloud-backup> section to manually
      test:
          2.1. Empty section - everything is backed up
	  2.2. Empty section but "disableIfNoEncryptionCapabilitites"
	  set to "true" - data only backed up if the transport supports
	  encryption.
Change-Id: Ic8066721a46bda688f9211c51a0f2497e9caf93b
2021-08-06 12:16:05 +00:00
Li Li
f97b1decee Merge "Freezer: fix exception when parsing /proc/locks" into sc-dev am: ef12967b75
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15395534

Change-Id: I997b46822bd83f9c9f7dc6a02e9514a95b3758a1
2021-07-30 16:49:33 +00:00
Li Li
bbe06e7b59 Freezer: fix exception when parsing /proc/locks
The original code is based on /proc/locks manpage. Unfortunately, that
manpage is never correctly updated to include the new field for blocked
locks. The new code detects the extra field. As StringTokenizer is too
heavy, ProcFileReader is used for better performance.

Bug: 194756340
Test: FrameworksUtilTests com.android.internal.util.ProcFileReaderTest
Test: FrameworksCoreTests com.android.internal.os.ProcLocksReaderTest
Test: No /proc/locks parsing exception with blocked locks
Change-Id: I4c9763f9d3091f7d84d2e4b672d7e5cb78b33f59
2021-07-29 09:18:53 -07:00
Keun-young Park
9acf8a9c96 Merge "update broadcast radio owner" am: 9f6b05e6fb am: 84d4022ce0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1780867

Change-Id: I0b146c73f3ff756e47252c1bba3d99f8784f3598
2021-07-28 18:56:05 +00:00
Keun young Park
80965a848c update broadcast radio owner
Bug: 194818704
Test: NA
Change-Id: Ic3632f3151fbedd296e7c904c1a47880a6ce3cdd
2021-07-27 18:13:39 -07:00
TreeHugger Robot
2194851f5c Merge changes from topic "native_hint" into sc-dev am: ea52c87596
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15326475

Change-Id: I8dde7d37c30d756108b007dd0cf09de057f4b913
2021-07-22 21:33:26 +00:00
TreeHugger Robot
ea52c87596 Merge changes from topic "native_hint" into sc-dev
* changes:
  Implement java PerformanceHintManager on top of native
  Switch HWUI to use native performance hint API
  Implement native PerformanceHint API
2021-07-22 21:15:04 +00:00
Terry Wang
e1aee57d9e Merge "Fix validation crash for nextPageToken." into sc-dev am: f4b8e82790
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15345292

Change-Id: Ia2b6bac986f304bf9b17e3539f6a201b2aeb19cc
2021-07-22 19:35:30 +00:00
Terry Wang
f4b8e82790 Merge "Fix validation crash for nextPageToken." into sc-dev 2021-07-22 19:32:18 +00:00
Bo Liu
0b2ad9f70d Implement java PerformanceHintManager on top of native
Note some exceptions became silence errors in this conversion.

Test: None
Bug: 194204196
Change-Id: Ia3cc7f2396f2e307a23b40b3f104a2fa90352196
2021-07-22 11:33:13 -04:00
Andrii Kulian
63177b9176 Mark an ActivityThreadTest as flaky am: 0492d8febe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15336321

Change-Id: I93a60818c488b10dbc6142863c83ca92f5d8f94e
2021-07-22 05:16:09 +00:00
Andrii Kulian
0492d8febe Mark an ActivityThreadTest as flaky
Bug: 194242735
Test: Build
Change-Id: I2452db8523438de4d06c938c3c3fa1d8a9aa0f4e
Merged-In: I2452db8523438de4d06c938c3c3fa1d8a9aa0f4e
(cherry picked from commit 0b6ea59fe0)
2021-07-22 03:17:44 +00:00
Terry Wang
d0ffb446cf Fix validation crash for nextPageToken.
We are caching nextPageToken in query(), and validate it in
getNextPage(). But when it reach to the end, the token will be changed
to 0. And it will crash if user is trying to fetch next page since 0
is not cached and won't passed the validation.

This change fix the issue. Without it, users maybe crashed if they
are trying to retrieve all documents in all result pages.

Bug: 187972715
Test: AppSearchSessionUnitTest
Change-Id: Ia95feb52f2a37348e11afdf0b320c61bfce22d40
2021-07-21 03:50:54 -07:00
TreeHugger Robot
332a72f84e Merge "Allow GenericDocument accept a String property longer than 20_000." into sc-dev am: 2873eb7d83
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15306276

Change-Id: I48bc72375d71cd2ba7b050e406cb5ef6e8d9b6a5
2021-07-21 03:42:06 +00:00
TreeHugger Robot
2873eb7d83 Merge "Allow GenericDocument accept a String property longer than 20_000." into sc-dev 2021-07-21 03:26:06 +00:00
Wu Ahan
4a5ea0ecce Merge "Fix potential memory leak of FrameTracker" into sc-dev am: aef0db8f94
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15334110

Change-Id: I93c2f29eff492356d1618501450d2079eccf6aaf
2021-07-20 15:27:00 +00:00
Ahan Wu
65a3d5dfa4 Fix potential memory leak of FrameTracker
If begin and end invocations are at the same frame, the end vsync id
will be smaller than the begin vsync id, results in zero size jank info
array, the finish call will be missed as well, a leak happens.

Bug: 192140966
Test: atest FrameTrackerTest InteractionJankMonitorTest
Change-Id: I388558e60bdb84ad248a9afabe7776c4e6e67c57
2021-07-20 06:31:41 +00:00
Terry Wang
830c6797cd Allow GenericDocument accept a String property longer than 20_000.
This limit was removed from the AppSearch Jetpack API meaning that
a client could construct a GenericDocument successfully, but then
have a PutDocuments call fail when converting from
androidx.appsearch.GenericDocument
to android.appsearch.GenericDocument.

Icing still has a total document size limit which is 16 MiB.
The put call will fail if it trying to write such document.


Bug: 192909904
Test: GenericDocumentTest
Change-Id: I86f97acc3a8e0f1c25fadf597aed9f42a2c493eb
2021-07-16 12:20:26 -07:00
Dmitri Plotnikov
c37c2ba216 Merge "Fix BatteryStatsImplTest." into sc-dev am: 4162c032bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15291010

Change-Id: Ib21cd08963534c6622d095c0b3d6b7ebc4a97bcc
2021-07-16 00:48:02 +00:00
Dmitri Plotnikov
4162c032bf Merge "Fix BatteryStatsImplTest." into sc-dev 2021-07-16 00:26:16 +00:00
Dmitri Plotnikov
21dd5325fb Fix BatteryStatsImplTest.
Bug: 180015146
Test: atest FrameworksCoreTests:BatteryStatsImplTest

Change-Id: I6b43ca03ba816e12735ebd47d8cf61a6b1cee110
2021-07-15 14:51:18 -07:00
TreeHugger Robot
7e3a4dc30b Merge "Fix BstatsCpuTimesValidationTest.testCpuFreqTimes_trackingDisabled" into sc-dev am: f7aca0513d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15277354

Change-Id: I3e1ff9bea9b3bbaebb6988e0ed5321a79627e19e
2021-07-14 01:50:07 +00:00
Dmitri Plotnikov
682450ec2d Fix BstatsCpuTimesValidationTest.testCpuFreqTimes_trackingDisabled
Bug: 192508837
Test: atest --rerun-until-failure 300 FrameworksCoreTests:com.android.internal.os.BstatsCpuTimesValidationTest#testCpuFreqTimes_trackingDisabled -- --abi x86_64
Change-Id: I0985d8e602f7a7b4fc619545828d6680fc6cf856
2021-07-13 16:13:29 -07:00
Tom Natan
887c796529 Merge "Add support for always_constrain_display_apis flag" into sc-dev am: 28a6e9f973
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15216092

Change-Id: I9df325234e3e01b59c0a17fc8109f1c90182613d
2021-07-08 10:30:09 +00:00
Tom Natan
28a6e9f973 Merge "Add support for always_constrain_display_apis flag" into sc-dev 2021-07-08 10:25:09 +00:00
tomnatan
f332106222 Add support for always_constrain_display_apis flag
Bug: 191184114
Test: atest WmTests:SizeCompatTests
Test: atest FrameworksCoreTests:ConstrainDisplayApisConfigTest
Change-Id: Ifc0d48c838216603c00f4cc09d0df2fd145a53a6
2021-07-06 15:18:50 +00:00
Remi NGUYEN VAN
89c3a316fc Merge "Move BitUtils, RingBuffer test to coretests" am: 35362a9dc1 am: e12829fdea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1754896

Change-Id: Id2b8a4720a14a433788589bba2c216e071374012
2021-07-05 05:31:16 +00:00
Remi NGUYEN VAN
35362a9dc1 Merge "Move BitUtils, RingBuffer test to coretests" 2021-07-05 05:05:34 +00:00
Dmitri Plotnikov
ee0373e491 Merge "Address race condition in procstate time tracking" into sc-dev am: b1f548e3e4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15177890

Change-Id: I20670af72e0fe93f4d86c08c72e722ec4595bd67
2021-07-03 00:27:32 +00:00
Dmitri Plotnikov
b1f548e3e4 Merge "Address race condition in procstate time tracking" into sc-dev 2021-07-03 00:14:15 +00:00
Remi NGUYEN VAN
aaa5249e58 Move BitUtils, RingBuffer test to coretests
The utilities are part of com.android.internal.util, but were
historically tested as part of the services.net tests. They were then
mistakenly moved to packages/modules/Connectivity with the rest of the
networking code, but actually belong in coretests.

Bug: 187935317
Test: atest FrameworksCoreTests
Change-Id: Ia4179ac3e25170e46b47133be0f5d4f1b24caf3d
2021-07-02 16:21:56 +09:00
Dmitri Plotnikov
dc3a78354e Address race condition in procstate time tracking
The issue occurs when the application proc state changes
rapidly, e.g. from FOREGROUND to BACKGROUND to CACHED.
The original code would sometimes attribute the time slice
to the wrong proc state.

Bug: 192550308
Test: (on cuttlefish) atest --rerun-until-failure 300 FrameworksCoreTests:com.android.internal.os.BstatsCpuTimesValidationTest -- --abi x86_64

Change-Id: Ic22bbfa3aae701014fc016ec9e2d32b1c528d462
2021-07-01 22:04:28 -07:00
TreeHugger Robot
38291a092b Merge "Add FLAG_IS_ACCESSIBILITY_EVENT to KeyEvent and MotionEvent" into sc-dev am: 24b5ca6b4b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15021525

Change-Id: I782931136fede858976a3b625c28bcd1b89e8f72
2021-07-01 03:42:00 +00:00
TreeHugger Robot
24b5ca6b4b Merge "Add FLAG_IS_ACCESSIBILITY_EVENT to KeyEvent and MotionEvent" into sc-dev 2021-07-01 03:37:28 +00:00
Siarhei Vishniakou
b42785efdf Add FLAG_IS_ACCESSIBILITY_EVENT to KeyEvent and MotionEvent
This flag indicates that the event was modified or generated by an
accessibility service.
It allows apps to tell apart real hardware events, events that are
injected (device id == -1), and events coming from accessibility (has
flag is_accessibility_event).

Events that have gone into accessibility, and got reinjected without
being modified will not be distinguishable from real hardware events.

In the next release, we will make FLAG_IS_ACCESSIBILITY_EVENT public
api. Until then, applications will have to hard-code its value (0x800)
to use it. The value is the same for both KeyEvents and MotionEvents for
convenience.

Bug: 175069843
Bug: 152399927
Test: atest VerifiedMotionEventTest VerifiedKeyEventTest
Test: atest AccessibilityGestureDispatchTest
Test: atest inputflinger_tests libinput_tests GamepadWithAccessibilityTest
Change-Id: I38ac2ab8e19e32cad927742c623f14f43ea0c588
2021-06-30 21:07:38 +00:00
Dmitri Plotnikov
bea4bac02c Merge "Fix boot time BatteryStats reset failure" into sc-dev am: ebf77ebc51
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15128655

Change-Id: I4681840e210a25d27ecb03ff30da088721f2fc8b
2021-06-30 19:12:17 +00:00