Fixes: 124051968
Test: compiled framework
Removes reflection access to MotionEvent#mNativePtr. All
necessary access to mNativePtr is available through the public
methods on MotionEvent, so access to mNativePtr is unnecessary.
Change-Id: I448eddfc4a5bc64deff44db2e69b5481477cdf91
Developers can already use the public setPadding(...)
and setPaddingRelative(...) methods.
Bug: 123768420
Test: None.
Change-Id: I3c7bd84699730cb11c2d801aff6340c3ac9c36d3
This reverts commit 86076a7cbe.
Reason for revert: Requires apps to have READ_DEVICE_CONFIG permission which they cannot possibly get. Also breaks instant apps (which don't have & can't get that permission)
Bug: 123524494
Test: CtsAccelerationTestCases[instant] passes.
Change-Id: I789a2c9007780331c510802a9f807cc24174be2d
There doesn't appear to be a valid use to create this object yourself;
you can retrieve DisplayInfos of the attached displays using various
other APIs, such as through WindowManager. The copy constructor is
also available. This method is only used by one app.
One possible usage is to get the display cutout information; this is
something that is now available as an official API in Q.
Test: N/A
Change-Id: I632b337e5dfdcddd494b03fd1403f73d2c46a475
Fixes: 123769467
Fixes: 123768619
LayoutInflater's mConstructorArgs was being accessed for two
reasons: reading and writing the context. When onCreateView()
was called, the inflation context was not being passed, so
if the developer wanted to get it, they had to read it from
mConstructorArgs. When the developer wanted to create a view,
with createView(), the developer could not adjust the view's
constructor context.
This CL creates versions of those two classes that take
Context as a parameter to remove the need for accessing
mConstructorArgs.
Test: ran LayoutInflaterTest
Test: Ia40341c24998be13205a72386d217d038a3bcf93
Change-Id: Ic2e990567512dd051f3d4f6c842398c71d6817b5
Test:
adb shell setprop persist.wm.new_insets 1
adb shell setprop persist.pre_render_ime_views 0
Test: Open IME with app that doesn't have adjustResize set
Test: InsetsStateTest
Bug: 111084606
Change-Id: I1268101d851ddc8fee7896a1a8316eedf0c8de95
IME window is attached to the IME target if possible. This ensures
a smooth enter/exit animation when the activity is coming in/going
away.
Furthermore, if the controlling window doesn't span the entire
display, we can't offer controlling it in a frame-by-frame
manner, and we need to do the inset calculations relative to the
display frame.
Test:
adb shell setprop persist.wm.new_insets 1
adb shell setprop persist.pre_render_ime_views 0
Test: Open IME, go home, reopen app
Test: Show dialog with EditText
Bug: 111084606
Change-Id: Id40470f6f8284b48acfa4719049afd14fde332d6
This method is needed in CTS to test RemoteView behavior.
Bug: 72044662
Test: existing android.widget.cts.RemoteViewsTest
Change-Id: I8ca0ae151604062e5ecd58dc66c04103c351224b
Adding abilities to debug:
- Attribute resolution stack (which resources are looked
at when resolving an attribute)
- Attribute value source (where did each attribute value
get defined)
- Get explicit style id (if a view had it set via style="...")
This feature will be behind Settings.Global flag that Android
Studio will set to the debugged application package ID.
Bug: 111439551
Test: atest CtsViewTestCases:android.view.cts.ViewStyleTest
Change-Id: Ib6f9fc81000bb867b5b94a68953c99b0bc802d6c
There were a couple issues:
- Parcel shares the same position between read/write, so the position
had to be reset before sending to native
- Java's "native"IO ByteBuffer defaults to big-endian!? instead of
the native endian.
Bug: 123914715
Test: sf_trace shows metadata. screenshots don't include notch/corners
anymore
Change-Id: I27bcc54e4e81108554ba5c5009c43195902bbcf1
When we switched from destroy() to reparent(..., null) we introduced
a regression where the CloseGuard was not released. reparent(..., null) can
not release the CloseGuard because the caller may want to retain the control.
It seems a frustrating burden to require users to write: "reparent(null), release()"
where previously we provided destroy so we provide a helper #remove method.
Test: Existing tests pass
Bug: 123923589
Bug: 122728663
Change-Id: I60b529573f8868624c70b78c7a71a4d7c7827ff7
These fields are accessed to clean up leaks on older versions,
but they shouldn't be accessed anymore.
Fixes: 123768581
Fixes: 123768639
Fixes: 123769388
Test: no code changes
Change-Id: I7265109290ba11477837bd09136b1d6ef5c73702
The API was dark grey listed in P, and it was greylisted in commit
76907ee.
Move it back as we should not be making API less restrictive in new
letter releases.
Test: m
Bug: 123987101
Change-Id: I0b43e31cb1d3d1c170d6718d3f71e21841ec30dc
This method was on the dark grey list in P. It was removed sometime in
the meantime, and re-added in commit 01053cd, but put onto the grey list
rather then the max-sdk-o greylist (equivalent to dark grey in P).
Move it back as we should not be making API less restrictive in new
letter releases.
Test: m
Bug: 123987101
Change-Id: I5ec57e6523f2d0881e0e4e5597009fc2717bfb85
The API was dark grey listed in P, and it was inadvertantly moved on the
max-sdk-p greylist in commit 01053cd.
We should not make greylist APIs less restrictive between letter
releases as this makes the situation confusing for developers.
Test: m
Bug: 123987101
Change-Id: I2b8675c7e15479a6e8121976329fec88558f8cad
The CL transitions View#scrollX and View#scrollY to the dark gray list,
not usable by reflection starting with Q. Instead of accessing them,
developers should use getScrollX(), getScrollY() added in API 1 and
setScrollX(int), setScrollY() added in API 14.
Bug: 123769508
Test: none
Change-Id: I166b9fe897bd35fd97b2e1fc2a8df73691255688
This lets us run experiments that need to know the reason for the wake
up in addition to the time and latency.
Bug: 122949636
Test: manually turning the device on and off, looking at the logs
Change-Id: I38429c3387a289010e1a2696ad351ffbe568413b
This is the first step to a few things including allowing for virtual nodes to have view backed descendants and siblings.
The main change in findViewByAccessibilityId SPI (its changed name and location, but it still is effectively the same thing) is that if something has a nodeProvider it will now still return view children.
I sifted through each use of the SPI and determined if they were an issue, and cleaned up any code in the process (Autofill cleanup is coming in a different CL).
Test: added a few simple unit tests, used talkback on system in a few places including virtual views, atest accessibility*, cts accessibility* (There were some failures here but they don't seem to be caused by this change, those are captured in these bugs b/120628276 b/120890822), CtsAutoFillServiceTestCases
Bug: 37714287
Change-Id: Id5807114fbb4c932eaea275dc2d94d0dbe25a8ae
Restricted access to setAlphaNoInvalidation method on View class.
Consumers should be able to handle the same functionality by leveraging
the onSetAlpha method within a View subclass. Removed usages of
setAlphaNoInvalidation within ViewPropertyAnimator.
Change-Id: Ieab3d54313972051484ac591b6f4329d3ae7b0cc
Fixes: 123768435
Test: Re-ran CtsAnimationTestCases