As described in b/211615608, the resource IDs asserted in the tests
didn't always align with those used in the ChooserWrapperActivity
(which inherits from the framework, and may not have been updated
since the last change to the resources -- even though that change
*is* picked up by the test). After this change, the tests no longer
depend on the framework version being up-to-date.
I'm not sure of a better way to solve this problem -- perhaps
we could either require the framework to be up-to-date before
the test is run, or else somehow write our tests in terms of the
last-built resource IDs on the device (instead of rebuilding those
IDs from source).
Bug: 211615608,208803748
Test: Manual test steps:
1. Add a new resource to the top of
frameworks/base/res/res/values/strings.xml. (May need to be
alphabetically early to disrupt existing ordering? I used
`aaapp_name`)
2. Run `atest ChooserActivityTest` and confirm that some UI
tests fail to find views for the `onText(int)` matcher (the
error message will show that it failed because it was using
a different resource name than the test asked for).
3. Either:
a. Patch this CL for a fix, or
b. `mp droid` to confirm this is because the framework was
out-of-date.
4. Re-run `atest ChooserActivityTest`; failures are fixed.
Change-Id: I3c1c4bf434d3a7fdc8e498cf112feb7d6ffbb016
Since the NetworkTemplate serialization is done in the platform
code. To decide whether the template is persistable should be
also inside the platform along with the serialization logic.
Test: atest NetworkPolicyTest
Bug: 204830222
Change-Id: I15d17dda77e6a3e1ae11275915e3d2f6e2888639
Prepare build targets and set up design to share test suite
across different ChooserActivity subclasses. (This was
somewhat tricky because the tests need to use wrapped
activities for instrumentation; those activities need to
have the same inheritance relationship with ChooserActivity
as the chooser-under-test would normally have; and shared
test code needs to use a common type to refer to the
wrapped activities.)
Test: `atest ChooserActivityTest` (modulo standing flakes);
also tested a proof-of-concept unbundled version locally
(CL to follow).
Bug: 202166045
Change-Id: I8dc317ed9fac7195e525d62fdd386dcf11ef7dba
This CL also adds a test to ensure that a pointer source is used by
default when obtaining a MotionEvent, and that offsets are only applied
to pointer sources.
Bug: 207251886
Test: atest MotionEventTests
Change-Id: Id40accc6d1238c940f139a18b26fa277dd6e11f9
Make accessibility services able to enable/disable a specified
IME in the same package for the current user.
Bug: 195476910
Fix: 191386474
Test: atest AccessibilitySoftKeyboardTest. Also tested with
modified talkback (use the swith input method API for enable
ime), and self created empty a11y service with an empty ime.
Mananged device and profile which set limit on user 0 are also
tested.
Change-Id: I4187468076705ac597d680f2f5dc32d7b166da1f
Since NetworkTemplate will be moved into the mainline module.
It is necessary to remove hidden BackupUtil usage from
NetworkTemplate. Also, it is also a hazard to maintain
compatibility for byte buffer interfaces.
Thus, move out these cloud backup functions to NetworkPolicy
to address these concerns.
Test: atest NetworkPolicyTest NetworkPolicyManagerServiceTest
Bug: 204830222
Change-Id: I3ec55f7e419ea13db535acff2457d8e7aaebdce8
Instead of having only one switch to enable all binder tracing,
we seperate between stack tracking and tracing. Stack tracking
still works as before. However, the more lightweight option,
tracing using android.os.Trace, is toggleable separately and will
work on the receiver side without dumping the entire stack trace.
We also make the tracing more efficient by caching
getTransactionName and concatting the class name.
Also, enable this selectively for SysUI+Launcher, which is
currently the focus of always-on-tracing effort to figure out
what kind of binder calls these processes are calling which seems
to contribute a huge amount of jank (long binder calls are in
>= 50% of janky traces).
Test: external/perfetto/tools/record_android_trace gfx view freq sched wm am aidl
Test: atest aidl_unittests
Bug: 202278427
Change-Id: I4d803d073cc4b69d07fa433bfef7e1c7f45132b7
The asserted sequence of events got out-of-date while the
tests were disabled, and needed to be updated to reflect
the new events that have been added to our flows. I didn't
want to update the asserted sequence until I addressed the
invalid-mime-type dependence (b/209804664) and the
double-querying (b/209018315); with those fixed, I think
the remaining event sequences seem correct.
Bug: 208803748,208837849
Test: `atest ChooserActivityTest`
Change-Id: I14cbf11570384495fec2172625f97c2fd7f50e97
This doesn't affect any of our currently-enabled tests,
but as in b/208837849 it can apparently cause behavioral
changes in our currently-disabled logging tests; in order
to re-enable those tests for b/208803748, we'll need to
specify one of these behavior cases and should prefer to
match what happens when the mime type *is* valid. "Golden"
event sequences can be re-recorded for those tests after
this CL is merged, and that should be sufficient to
re-enable them.
More concerningly, an earlier attempt to re-enable some
ChooserActivityTest cases resulted in flakes when an
exception was thrown parsing the invalid mime types
(b/208898133). It's unclear why this wouldn't fail more
consistently, and perhaps that's why these tests were
disabled in the first place -- but if we have specific
intentions in this case, we should test them explicitly
instead of allowing them to interfere with test cases
that were simply trying to set up "typical" conditions.
Test: `atest ChooserActivityTest`
Bug: 209804664
Change-Id: I02854aac788d36165ad9e0eabd6f5e02e1d1204d
New field indicates if ActivityRecord#providesMaxBounds has
calculated that sandboxing of max bounds to match app bounds
should be applied.
Test: manual
Bug: 193514437
Change-Id: I91587ce1e1ded7435038e2d1a7d038be57ff0f2f
Procstate tracking will now be enabled unconditionally
when eBPF is supported by the kernel. Otherwise, it will be disabled.
Bug: 197162116
Test: atest FrameworksCoreTests:BatteryStatsTests
Change-Id: I200ef51b92aa19d42a10966aa6fea6f99d741f3f
See go/b200769372
AccessibilityService adds new magnificationController APIs,
setMagnificationConfig and getMagnificationConfig, to control
magnification on demand.
The service can set the magnification mode, scale, center postion
of the magnifier on the display to control magnification.
And the service controls the least recently activated magnifier
on the display if the config mode is not specified.
Bug: 199732498
Test: atest MagnificationProcessorTest,
atest AbstractAccessibilityServiceConnectionTest,
atest AccessibilityMagnificationTest,
Change-Id: I51be2bbf96411c6c54c9da30873556d09533bb65
This reverts commit ec29931867.
Reason for revert: Test flakes around invalid mime type in the APS request. Switching tests to use valid mime types has unexpected consequences I'll address in future CLs.
Change-Id: I9f09d0ce1ddd0eb357cab5dc2cfb49238b18af45
Of 69 ChooserActivityTest cases, 22 are currently
ignored, but should be restored in order to maximize
coverage in preparation for the new unbundled
implementation (but note that these tests are still
only run against the "bundled" system chooser for now).
Of the 22 ignored tests, 7 of them pass reliably and can
be un-ignored immediately (although it's not known whether
they were ignored for a reason other than failures/flakes).
The remaining 15 will require some changes to the test
and/or ChooserActivity code, to be investigated & completed
in future CLs.
Bug: 208803748
Test: `atest --iterations 100 ChooserActivityTest` (100
iterations ensures no regressions-to-flakiness.)
Change-Id: Iede5835b429cccfd65fdc114397460fc00781a75
Add an API to get the current rotation value of the transform of the
MotionEvent.
Bug: 207771136
Test: atest MotionEventTest
Change-Id: I5ee11e7a0311bdbeefbb37251098ce63b7d22730