Commit Graph

8167 Commits

Author SHA1 Message Date
Sunny Goyal
7cf40fc0fe Merge "Resetting widget cache when some configurations change" into qt-dev
am: 5cb8996742

Change-Id: I8f3b1ab541a0398191c1110dc1f8d6d1fb7786e5
2019-06-07 11:37:32 -07:00
Sunny Goyal
758e88bd44 Resetting widget cache when some configurations change
Sometimes widget providers hardcode colors in their remoteViews
by loading them from resources. On UI mode change, this can lead to
inconsistent UI if some widgets use a different configuration
than others.

Test: Verified with calendar widget on device
Bug: 133064045
Change-Id: If47a6b1973f55b7590f5d4116813d6a332951697
2019-06-06 17:02:55 -07:00
Torne (Richard Coles)
0f0173f9e1 Merge "Clarify problems with Linkify.MAP_ADDRESSES." into qt-dev
am: a0d66cf3f6

Change-Id: I10e7f3f8d14d15e3dbc5fd6f97bafc7442c91bb4
2019-06-06 10:59:15 -07:00
Torne (Richard Coles)
aa68ab8288 Clarify problems with Linkify.MAP_ADDRESSES.
Update the documentation for WebView.findAddress, as well as the related
functionality in Linkify and TextView, to clarify why the method is
deprecated, why it should not be used, and that it can cause unexpected
exceptions to be thrown from several places on older OS versions.

Fixes: 24676033
Test: m offline-sdk-docs
Change-Id: I45d82b9a4c9cf62d9566898dd21cd2139ad98f37
2019-06-04 14:14:05 -04:00
Bin Chen
f752a6a86b Merge "[Magnifier-86] Fix deadlock causing ANR" into qt-dev
am: 0c7e69bdb6

Change-Id: Ib71dc3887e7501aa6a3abc71f0d23d2c6f5a32c5
2019-05-24 10:53:45 -07:00
TreeHugger Robot
0c7e69bdb6 Merge "[Magnifier-86] Fix deadlock causing ANR" into qt-dev 2019-05-24 17:03:21 +00:00
Mihai Popa
b82fd2d7d3 Merge "[Magnifier-84] Improve PixelCopy failures handling" into qt-dev
am: 612f71b1df

Change-Id: Id5b3d1a582d7119b2a967e6759d0e8e939ff20c8
2019-05-24 09:32:04 -07:00
Bin Chen
c8beb5c0f0 [Magnifier-86] Fix deadlock causing ANR
"main" prio=5 tid=1 Blocked
  | group="main" sCount=1 dsCount=0 flags=1 obj=0x74aeca00 self=0x7021814c00
  | sysTid=27953 nice=-10 cgrp=default sched=0/0 handle=0x70a85ff548
  | state=S schedstat=( 31382082536 9164116362 28130 ) utm=2661 stm=477 core=0 HZ=100
  | stack=0x7ff7a52000-0x7ff7a54000 stackSize=8MB
  | held mutexes=
  at android.widget.Magnifier$InternalPopupWindow.destroy(Magnifier.java:607)
  - waiting to lock <0x0ef5c351> (a java.lang.Object) held by thread 13
  at android.widget.Magnifier.dismiss(Magnifier.java:191)
  - locked <0x01cd07b6> (a java.lang.Object)

 "hwuiTask1" prio=5 tid=13 Blocked
  | group="main" sCount=1 dsCount=0 flags=1 obj=0x12f815d8 self=0x70000e7800
  | sysTid=28075 nice=-2 cgrp=default sched=0/0 handle=0x70046ba4f0
  | state=S schedstat=( 138800095 85604746 532 ) utm=10 stm=3 core=1 HZ=100
  | stack=0x70045bf000-0x70045c1000 stackSize=1009KB
  | held mutexes=
  at android.widget.Magnifier$InternalPopupWindow.lambda$doDraw$0(Magnifier.java:663)
  - waiting to lock <0x01cd07b6> (a java.lang.Object) held by thread 1
  - locked <0x0ef5c351> (a java.lang.Object)
  at android.widget.-$$Lambda$Magnifier$InternalPopupWindow$vZThyvjDQhg2J1GAeOWCNqy2iiw.onFrameDraw(lambda:-1)

Bug: 133396461
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Idf0373ab0d5033d56da0f6f45d7d953f7e796813
Merged-In: Idf0373ab0d5033d56da0f6f45d7d953f7e796813
2019-05-23 10:18:02 +00:00
Mihai Popa
30b1fe3dd0 [Magnifier-84] Improve PixelCopy failures handling
The CL adds PixelCopy failure handling in Magnifier. Previously, if the
content copy failed, the Magnifier would still render the shadow,
therefore displaying an empty rectangle shadow frame. The CL fixes this,
avoiding displaying anything if the PixelCopy request fails.

Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Bug: 132136368
Change-Id: I66715c56770380afafa5af5a3ee976bcaaa5ba1e
(cherry picked from commit 3aa46b2dd0)
Merged-In: I66715c56770380afafa5af5a3ee976bcaaa5ba1e
2019-05-22 11:09:27 +00:00
Felka Chang
01fc17e00a Merge "Fix sysui's security issue of cross-user copy/paste" into qt-dev
am: 743288a029

Change-Id: I7e67f0f6f4372b62bfac875ab6ebdcfb43aef3c7
2019-05-21 21:40:49 -07:00
Felka Chang
33f56060d5 Fix sysui's security issue of cross-user copy/paste
Background:
The applications with the granted INTERNAL_SYSTEM_WINDOW and
INTERACT_ACROSS_USERS_FULL means that it could show the same
window for all of users. i.e. to use user 0 presents all of
UI things to all of users.

INTERNAL_SYSTEM_WINDOW usually comes with INTERACT_ACROSS_USERS_FULL
because it will serve all of users to know the information that
comes from framework and system server.

Solution:
Because SystemUI never restarts after the user changing,
ClipboardService can't tell if the callingUid has the the same userId
with the current user or not.  The solution is to use the permission
check. Especially, INTERACT_ACROSS_USERS_FULL and
INTERNAL_SYSTEM_WINDOW. To check INTERACT_ACROSS_USERS_FULL by using
ActivityManagerInternal.handleIncomingUser.

Caution:
The application with INTERNAL_SYSTEM_WINDOW usually use user 0
to show the window. But, the current user is user 10, WindowManager
know the focus windows is belong to user 0 rather user 10. That's
why user 10 can't copy the the text from systemui directly reply to
the other applications.

Readability:
ClipboardService use callingUid everywhere but actaully it is not
appropriated to fix this kind of bug. This patch refactor the naming
to produce two name. i.e. intendingUid and intentdingUserId that are
validated by ActivityManagerInternal.handleIncomingUser.

Test: manual test
Test: atest android.widget.cts.TextViewTest
Test: atest CtsTextTestCases
Test: atest CtsContentTestCases

Bug: 123232892
Bug: 117768051
Change-Id: Ie3daecd1e8fc2f7fdf37baeb5979da9f2e0b3937
2019-05-21 14:16:59 +08:00
Lucas Dupin
60e01d99a8 Merge "Refresh should always update the field" into qt-dev
am: ae61369c0d

Change-Id: I1cc3170916480ee2722f12ee1c5c2f75ad2db5c5
2019-05-20 15:58:37 -07:00
Lucas Dupin
01c783823b Refresh should always update the field
Otherwise it's hard to keep track of things happening or not, since
the request would be postponed, leading to bugs elsewhere.

Test: Wait for time to pass on lock screen
Test: Enter/leave AOD
Fixes: 132955195
Change-Id: I54f806f9dd2d1cf4acac420bab08d4579f867a5f
2019-05-20 11:29:45 -07:00
Ian Pedowitz
164aa62fb2 Merge "Revert "Revert "Removing deprecated APIs added to Q""" into qt-dev
am: 028b649f71

Change-Id: Ifa06fa782c807fe282f38b028f33dbb481c0ddcc
2019-05-15 13:42:34 -07:00
Ian Pedowitz
028b649f71 Merge "Revert "Revert "Removing deprecated APIs added to Q""" into qt-dev 2019-05-15 16:28:54 +00:00
Ryan Mitchell
edf745d255 Merge "Fix RelativeLayout rules" into qt-dev
am: a04e6a22ea

Change-Id: I9d662f1faf113ab25cafddc909f0e569c1796651
2019-05-12 20:50:42 -07:00
Ian Pedowitz
cece8d3bd5 Revert "Revert "Removing deprecated APIs added to Q""
This reverts commit 1600c5a615.

Reason for revert: Rolling forward for Q-Finalization

Bug: 129975435
Change-Id: I1ffb8162cb5e6f386fd3c417fabfd4298ef86ffd
2019-05-12 19:46:31 +00:00
Ryan Mitchell
400bc93c71 Fix RelativeLayout rules
A previous change restricted rules that are added to the rule dependency
graph to resource ids rather than just integers greater that zero.
Restore the previous behavior and also allow for negative resource ids
to work as expected.

Bug: 132447676
Test: loaded maps and view looks as expected
Change-Id: I88d86c77c696d1e494a743fdd2e398283383c64e
2019-05-10 17:48:58 -07:00
Ian Pedowitz
78f0efd3f3 Merge "Revert "RESTRICT AUTOMERGE Removing deprecated APIs added to Q"" into qt-dev
am: 4acb8f46bc

Change-Id: Ideea53935ba743127298aaaa2b5a993be2679038
2019-05-02 15:02:55 -07:00
Ian Pedowitz
a17eabdc62 Merge changes from topic "QT-SDK-Finalization" into qt-dev
am: 917936172f

Change-Id: Ia7d0a4971a702966968abb59685dd1a13dff03ec
2019-05-02 14:14:57 -07:00
Ian Pedowitz
1600c5a615 Revert "RESTRICT AUTOMERGE Removing deprecated APIs added to Q"
This reverts commit f6ed8afa40.

Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th

Bug: 129975435
Change-Id: If94098b7cc9cf75cf9782d2b70e01881f9c40430
2019-05-02 00:56:02 +00:00
Suprabh Shukla
f6ed8afa40 RESTRICT AUTOMERGE Removing deprecated APIs added to Q
Test: Builds, boots

Bug: 129975435
Change-Id: If083957effedf7987b200c366f65d6863b99bca1
2019-05-01 14:04:37 -07:00
Nader Jawad
b59a3549ef Merge "Added BlendMode equivalent APIs to replace deprecated PorterDuff variants" into qt-dev
am: 5c5ffcbd7a

Change-Id: I14bdd95afdc7c329e818cd9507c8138124bd2c88
2019-04-18 14:42:11 -07:00
Neil Fuller
3077e4fd7b Merge "Fix incorrect leap year logic" am: 8b5eb92120
am: 669915a986

Change-Id: If63d0b5cb89fa458d3f4924e6cfe537f672e0816
2019-04-18 04:34:05 -07:00
Nader Jawad
531db61ac1 Added BlendMode equivalent APIs to replace deprecated PorterDuff
variants

Updated various framework Views to have equivalent BlendMode APIs
to replace the deprecated PorterDuff equivalents.
Updated InspectableProperty annotations to refer to the same
xml attributes as the original tintmode APIs

Bug: 126726419
Test: Added CTS tests to verify new BlendMode APIs
Change-Id: Id9ab36d3d4d29f351250723e9d13d49bc6062c83
Merged-In: Id9ab36d3d4d29f351250723e9d13d49bc6062c83
2019-04-17 21:11:39 +00:00
Neil Fuller
6c0984a71c Fix incorrect leap year logic
Fixing an issue for 2100 in SimpleMonthView.

Tweak the logic in DatePickerCalendarDelegate to optimize
for the common case and save a calculation.

Bug: 28784177
Test: build only
Change-Id: I7395ab9f3dc90ac4f7cef1edee6f7bc156f4ab76
2019-04-17 17:41:04 +01:00
Neil Fuller
1e1e148848 Merge "Fix incorrect leap year logic" am: ca13216bd1
am: ef56b49dfd

Change-Id: I815ad6a124dc7e9cc7a9ac3e9163f849711b537c
2019-04-17 08:28:11 -07:00
Tony Mak
0bf14e4804 Merge "Split TextClassifierEvent into multiple subclasses" into qt-dev 2019-04-17 10:05:20 +00:00
Neil Fuller
9900c52689 Fix incorrect leap year logic
Fixing an issue for 2100.

Bug: 28784177
Test: build only
Change-Id: I4579ba2d07b8157f368fd31df5396677156aeeb0
2019-04-17 08:50:49 +01:00
Abodunrinwa Toki
6d06337157 Split TextClassifierEvent into multiple subclasses
As per the suggestion from API council, we now have a subclass for event
of each category.

Bug: 129344540

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/
Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts/
Test: atest frameworks/base/packages/ExtServices/tests/src/android/ext/services/notification/SmartActionsHelperTest.java

Change-Id: Ic43b33c2176447c40e64bd0e410e906d5fb9c4cc
2019-04-16 13:22:25 +01:00
Felipe Leme
ef1c0b36ab DO NOT MERGE - Removed ContentCapture support from standard SDK toolkit.
Test: atest CtsContentCaptureServiceTestCases
Test: m update-api
Test: make ds-docs

Fixes: 129982633

Change-Id: I5a0fa4231d0222638830c1abd8015d9f2635996a
2019-04-15 09:36:25 -07:00
Ryan Mitchell
9f6f9ca935 Fix RelativeLayout checking of resource ids greater than 0x80
For splits with package id 0x80 and higher, the resource ids are
negative. RelativeLayout builds a dependency graph to indicate in which
order the layout height and width need to be processed. Since the ids
are less than 0, RelativeLayout is incorrectly assuming the layouts are
not order dependent.

Bug: 72869300
Test: manual
Change-Id: I98f58f11733c2976fc5c1b4152949cf80660f657
2019-04-11 16:55:37 -07:00
Hans Boehm
886705338b Merge "Clarify hasSelection description" am: 6bd5cf2bcc am: 0e63b9ce98
am: 8331efe0af

Change-Id: Idb4ac0cdc786ff080a998ad48fe54e803d58cc4d
2019-03-28 15:59:20 -07:00
TreeHugger Robot
9f230d5e16 Merge "Instead of duplicating test config, use imports." 2019-03-27 09:42:47 +00:00
Hans Boehm
fd7a3cf9ce Clarify hasSelection description
It's unintuitive that hasSelection() can return false, while
getSelectionStart() and getSelectionEnd() return meaningful non -1
values.

Test: TreeHugger

Change-Id: Iea2157f4b3b2c13c74547ba31eb4131496f939cc
2019-03-20 17:18:18 -07:00
Aurimas Liutikas
efab4dfa45 Instead of duplicating test config, use imports.
TEST_MAPPING allows sharing test configs, use that
to avoid duplication.

Test: atest --test-mapping frameworks/base/core/java/android/widget
Change-Id: I441f36fabcc26bc8198ab49eebc433932b344ae7
2019-03-20 15:39:23 -07:00
TreeHugger Robot
100bb0e692 Merge "[Magnifier-80] Make API getters relative to window" 2019-03-20 18:20:36 +00:00
TreeHugger Robot
fe31bc77ec Merge "Start running small widget test for widget changes." 2019-03-20 16:35:31 +00:00
Mihai Popa
ef456970fe [Magnifier-80] Make API getters relative to window
The CL updates Magnifier#getPosition() and Magnifier#getSourcePosition()
to return coordinates relative to the main application window, rather
than relative to the surface backing it. Working with window relative
coordinates is the better approach for public APIs. The CL also makes
View#getLocationInSurface public. Magnifier CTS tests still need it,
when testing MAX_IN_SURFACE behavior.

Bug: 124012182
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I684f27aa466e0390c7801b616331f4682784c423
2019-03-20 16:08:46 +00:00
Aurimas Liutikas
d33a7ce8d4 Start running small widget test for widget changes.
Test: None
Change-Id: I94fb55df43bfbeda1549ef5827c55e224eb0e1b5
2019-03-19 09:29:37 -07:00
Ashley Rose
73abdd3c59 Rename @EnumEntry and @FlagEntry
Test: atest CtsViewInspectorAnnotationProcessorTestCases
Bug: 127531820
Exempt-From-Owner-Approval: Annotation-only change
Change-Id: Id293e2b2ac9cf7bf2aaeb28645471ea227bb587b
2019-03-18 16:05:55 -04:00
Matvei Malkov
7177265e9c Revert deletion and deprecate few PopupWindow methods
After method rename procedure b/126354063 we discovered that
androidx-platform-dev already depends on that methods added during fixit
week, so revert deletion of these methods and deprecate them.

Bug: b/126354063
Test: PopupWindowTests
Change-Id: I17b985542ffd661358059740bdf620e1bfb5b550
2019-03-14 16:16:38 +00:00
TreeHugger Robot
8edccc5d60 Merge "Addressing API review comments for AutoCompleteTextView Bug: 126376225 Test: Ran android.widget.cts.AutoCompleteTextViewTest" 2019-03-13 19:10:42 +00:00
Ralston Da Silva
f954e23bab Addressing API review comments for AutoCompleteTextView
Bug: 126376225
Test: Ran android.widget.cts.AutoCompleteTextViewTest

Change-Id: I3c665debb29a82075a39ddaef493dea288f0507c
2019-03-12 16:22:59 -07:00
Matvei Malkov
25c9ac3f5b Rename methods for PopupWindow
This CL renames 4 methods for PopupWindow based on API council
suggestions. Also remove unused import in order to `repo upload`

Bug: b/126354063
Test: All ListPopupWindow, MenuPopup and PopupWindow passed
Change-Id: I5db93b1c18a7a3dc9033cb9c5bbe89107ac22024
2019-03-12 17:12:44 +00:00
Ashley Rose
a0fda08403 Merge "Custom inspection companion for RelativeLayout" 2019-03-12 16:57:10 +00:00
Xin Li
3e112d56a4 DO NOT MERGE - Merge PPRL.190305.001 into master
Bug: 127812889
Change-Id: I7c5ada5c5afe38848be733616cbb1568440ab1c5
2019-03-12 00:17:37 -07:00
Clara Bayarri
596a6edd0f Fix Annotations
API Council feedback

Bug: 126700367
Bug: 121324653
Test: none
Change-Id: I8263f60a0fa75a6261d174d33de20c675a2a608e
2019-03-11 14:10:44 +00:00
cnx421
27004a3362 Merge "fix 'int android.view.View.getHeight()' on a null object reference" am: 4add708b91 am: 6a5d589a50
am: 3069e2ba6f

Change-Id: I9ba21d8d6aee9424ffad3fbe2072ef78e3b54455
2019-03-09 04:13:43 -08:00
Ashley Rose
621c0af44b Custom inspection companion for RelativeLayout
Test: atest StaticInspectionCompanionProviderTest
Bug: 126913705
Change-Id: I2f4d5ccf38b77af9d1a4c21318475baec44e9a1c
2019-03-08 18:29:14 -05:00