The CL adds ProgressBar#getCurrentDrawable() to the public API, and
transitions mCurrentDrawable in ProgressBar to dark gray list.
Developers can use getCurrentDrawable(), setProgressDrawable() and
setIndeterminateDrawable() instead of accessing mCurrentDrawable
directly.
Bug: 123769441
Test: none
Change-Id: Ia9876f97dc2ec2c69902b8281cd7876b516dbdd4
Introduced epicenter API for ListPopupWindow to mirror the same API that we've made for PopupWindow (b/123768589). Also add mutability protection to PopupWindow epicenter rects
Bug: b/124094855
Test: All widgets tests passed. getter / setter tests introduced in
I648c169b67972c80befbeae9c37c2819eaad27d4
Change-Id: I2b79a16039d345c9c8893b815735a2811543cf60
I think this one is fine to punt. The field applies to the default
progress bar, which can only be indeterminate. However, if someone
can't customize their themes and styles, they may end up in a
situation where they need this to be different and there is no public
API for it. Making a public API is messy because it is really hard
to reason about and the behavior would be a no-op much of the time.
It's better to avoid adding confusion for the majority of developers.
Test: N/A
Bug: 124049927
Change-Id: Ie63429831ec803d2d3c50464176c4e6f8a30ec33
* Use the ViewConfiguration#getScaledMaximumFlingVelocity() API instead.
Test: N/A
Change-Id: I1c66cd4cf9140c7a47630eb7aabdd529ed06b13d
Fixes: b/124051740
This CL adds APIs to ScrollView and HorizontalScrollView to
set edge effect colors.
Previously, edge effect fields were accessed via reflection
by many apps to obtain this functionality.
For apps targeting Q, those fields will not be accessible
anymore and instead we'll ask them to use the new APIs.
Bug: 123769386
Bug: 123768600
Bug: 124052619
Bug: 124053130
Test: HorizontalScrollViewTest, ScrollViewTest
Change-Id: I32cbf0b01658955d34662c9a9aaca87b54ab7706
I talked to the biggest 3p user of this API and they are resilient
to this change. Moving forward, our advice to developers is to
use RecyclerView.
Test: N/A
Change-Id: I8de647b10ed06f1f0f4b10865fb88ac0bcc10608
Fixes: 123768524
Restriced access to private mScrollChangedListener private field and to
private invokePopup method. Removed @hide annotation for several methods
to allow deeper customization of PopupWindow and it's transitions.
Bug: 123768397
Bug: 123769350
Bug: 123769516
Bug: 123768511
Bug: 123768510
Bug: 123768589
Test: Tests has been added to PopupWindowTest in I468b592a3ba2e5f2f895210d21843d328a454794
Change-Id: I7fb4d8e28f0de889e110b7b90f71ebec9ab4cc9d
We should support this usage better in future.
And it's kept in light grey list until new API is released.
Bug: 124050217
Test: N/A
Change-Id: Ia2842d99410965a5b724979f09850839bc84789f
* We have a scrollListBy() API that we introduced in API 19 which should cover this use case.
Test: N/A
Fixes: b/124051739
Change-Id: I0ba7091eb95702a275989fb0f22f9da04b61e989
There is in general very low usage of these and they do not seem much
legitimate. Also if there is some customization needed RecyclerView
is the answer. We certainly do not want to start opening these internals.
Please see individual justifications as comments per each item.
Bug: b/123769398
Bug: b/123769710
Bug: b/123768941
Bug: b/123769413
Bug: b/123769379
Test: N/A
Change-Id: I04cacc69612f0693f83fe5caa1cb02490bfb0fcb
When adding a widget that uses TextClock to the home screen from a work
profile, the home screen may crash due to a
android.permission.INTERACT_ACROSS_USERS permission error, due to a
mismatch between the caller's userId and the widget's userId.
This fix uses the caller's userId to register the ContentObserver.
Bug: 111627637
Test: added a widget (as specified in the bug) that uses TextClock from a work profile
Change-Id: I153e55b755d656f1d7882645df15290bf8ad56f9
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
mListeners is used by developers to resolve a memory leak bug
and it was fixed before. But there are still a very high amount
usage of this Non-SDK API. So we can't put them into darklist.
Bug: 123769451
Test: atest TextViewTest
Change-Id: I7ba822e94d290fd99189970da0a4bf7bfa52d64b
To stop a scroll early, developers should instead use AbsListView#smoothScrollBy(0,0)
To start a specific fling, developers should instead use AbsListView#fling(int)
For any further customization, developers should migrate to using
and customizing RecyclerView
Bug: b/123769448
Bug: b/123769453
Bug: b/123769380
Test: n/a
Change-Id: I08a773c3fa70270ddc9f4e36dcbc64c64f7336de
This CL adds APIs to AbsListView to set edge effect colors.
Previously, edge effect fields were accessed via reflection
by many apps to obtain this functionality.
For apps targeting Q, those fields will not be accessible
anymore and instead we'll ask them to use the new APIs.
Bug: 123768444
Bug: 123769408
Test: AbsListViewTest#testEdgeEffectColors
Change-Id: Ia81bb1af9708255cceaabfd6e8ecfd1f12d67798
There is little value in exposing this as public API as general users
of the GridView have this value as they had to set it via setNumColumns.
Also classes extending GridView can keep track of this value by
overriding setNumColumns.
At the same time I don't see much motivation in needing the value as it
is only used in private method determineColumns.
Also the amount of usage of this field is really low.
Bug: b/123769395
Test: N/A
Change-Id: I0996cd1df2d1c3394b17333762a19a057005137a
The CL adds getters and setters for the min/max width/height attributes
of ProgressBar. This could be already specified in xml, but not post
inflation.
Bug: 123769470
Test: atest android.widget.cts.ProgressBarTest
Change-Id: I3bb4992da0c34cd88078588253ef6789fa8f1856
This is a follow up CL to my previous CL [1], which introduced a
concept of "text-operation user" into TextView then plumbed it to IME
APIs and spell checker APIs as a short term workaround for System UI's
hosting multiple users' text contents in user 0 process.
With this CL, "Add to dictionary" menu item for misspelled words also
takes this text-operation user into account.
[1]: I6d11e4d6a84570bc2991a8552349e8b216b0d139
401e3d4c84
Fix: 123955642
Test: Manually done as follows.
1. Build aosp_taimen-userdebug and flash it.
2. adb shell pm create-user test_user
3. adb shell am switch-user 10
4. make -j EditTextVariations
5. adb install -r \
$ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
6. adb shell am start \
-n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
7. Tap the menu icon on the EditTextVariations then click "Direct Reply"
8. Open notification shade.
9. Tap reply icon on "Message from UserHandle{10}".
10. Type "gggg".
11. Make sure a red underline is shown.
12. Tap "gggg".
13. Make sure a dropdown UI is shown below "gggg".
14. Tap "ADD TO DICTIONARY"
15. Dismiss the notification shade.
16. Make sure "Add to dictionary" dialog is shown.
Change-Id: Iaf11cd7e54636ab552e2469006e120e39dca99a8
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
Updated @UnsupportedAppUsage annotation with maxTargetSdk as well
as corresponding tracking bug
Change-Id: I49b527fcd5d7cc67c3163adcd70a596b3e398ff7
Fixes: 123769353
Test: N/A