Commit Graph

246 Commits

Author SHA1 Message Date
Nader Jawad
85ff47e3fc Removed hidden mutable APIs from PorterDuffColorFilter
Removed PorterDuffColorFilter#setColor and PorterDuffColorFilter#setMode
as the public facing ColorFilter API is immutable. These framework
internal APIs were causing issues with Drawables as updates to state of
the ColorFilter would not be propagated up to the Drawable to cause an
invalidation.

Fixes: 77723600
Test: Ran atest on SystemUITest and CtsGraphicsTest modules

Change-Id: I935c9e35ffa225735b951bb3b1eb753ea5815a84
2018-04-10 19:37:19 +00:00
David Brazdil
9f585cc967 Merge "Greylist APIs which apps can resolve to at runtime" into pi-dev am: 0d130cbc86
am: 4517763931

Change-Id: Ic659bafb2d3283499b7d0cb71fa7244f6c66eada
2018-04-10 03:52:17 -07:00
David Brazdil
0f09bf3c3f Merge changes I35eddd24,Ia2c7093a into pi-dev am: 716f9d420a
am: 1c69f16c77

Change-Id: I5bc8af3b6ee69787557e605c13fa79179ec3e104
2018-04-10 03:44:17 -07:00
David Brazdil
0d130cbc86 Merge "Greylist APIs which apps can resolve to at runtime" into pi-dev 2018-04-10 10:26:04 +00:00
David Brazdil
f919fddb37 Greylist APIs which apps can resolve to at runtime
This applies to SpannableString methods:
 - charAt(I)C
 - getChars(II[CI)V
 - getSpanEnd(Ljava/lang/Object;)I
 - getSpanFlags(Ljava/lang/Object;)I
 - getSpanStart(Ljava/lang/Object;)I
 - getSpans(IILjava/lang/Class;)[Ljava/lang/Object;
 - length()I
 - nextSpanTransition(IILjava/lang/Class;)I
(these are all already in the greylist)

and one method from android.app.backup.FileBackupHelperBase:
 - writeNewStateDescription(Landroid/os/ParcelFileDescriptor;)V
(added in this CL).

We won't fix this properly in P, so greylist the uses for now.

Bug: 64382372
Bug: 76424618
Test: make
Change-Id: I4c4ef13338b1fa2f7f21c07c63d88d3559d10341
2018-04-10 10:25:37 +00:00
David Brazdil
716f9d420a Merge changes I35eddd24,Ia2c7093a into pi-dev
* changes:
  Add more hidden API to light greylist
  Add more hidden API to light greylist
2018-04-10 10:22:20 +00:00
Philip P. Moltmann
325f7284d9 Merge "Expose TestAPIs needed by GtsOsTestCases" into pi-dev am: d565f04957
am: e2e7dd4eda

Change-Id: I57cbfacd181876b65447e5fe7497c83802a55b60
2018-04-09 09:17:38 -07:00
TreeHugger Robot
d565f04957 Merge "Expose TestAPIs needed by GtsOsTestCases" into pi-dev 2018-04-09 15:57:42 +00:00
David Brazdil
62a1f9902d Add more hidden API to light greylist
Bug: 64382372
Test: make
Change-Id: I35eddd24f38421ad39d0163e550e2c3f425646f4
2018-04-09 16:24:08 +01:00
David Brazdil
b9a5a50b86 Add more hidden API to light greylist
Test: make
Bug: 64382372
Bug: 77464273
Bug: 77663152
Bug: 76121474
Bug: 77593560
Bug: 77798338
Change-Id: Ia2c7093a0dbb61fd69806b95de124e565448339b
2018-04-09 16:23:46 +01:00
Jan Althaus
042228d588 Merge "Remove legacy logger" into pi-dev am: 4f9d750e91
am: 47e3eb3090

Change-Id: Ie67b636931fbf718d35e013631884546e7069960
2018-04-07 05:34:00 -07:00
Jan Althaus
4f9d750e91 Merge "Remove legacy logger" into pi-dev 2018-04-07 12:06:12 +00:00
Jan Althaus
5a03094ebc Remove legacy logger
Migrate DefaultLogger implementation to SelectionSessionLogger.
This cleans up after the API refactor and fixes two bugs:
- All events are currently logged twice.
- Interfaces accept a null signature, but it currently crashes the legacy logger.

Bug: 73392698
Bug: 77659305
Test: atest FrameworksCoreTests:TextClassificationManagerTest
Test: atest FrameworksCoreTests:TextClassificationTest
Test: atest CtsViewTestCases:TextClassificationManagerTest
Test: atest CtsViewTestCases:TextClassifierValueObjectsTest
Test: atest CtsWidgetTestCases:TextViewTest
Test: atest CtsWidgetTestCases:EditTextTest
Test: Manually examined logs
Change-Id: I0d2b925abf5cab12d71fc2cc0fa527530c86ab10
2018-04-07 12:04:49 +00:00
Philip P. Moltmann
f80809ffd7 Expose TestAPIs needed by GtsOsTestCases
Test: atest GtsOsTestCases on pi-dev:taimen and oc-mr1:sailfish
Bug: 77497338
Change-Id: I5de976991a857bfbed2faa943822af542601fa8b
2018-04-06 14:59:07 -07:00
David Brazdil
84ef3e58af Merge changes Idca52b94,I82ae308d into pi-dev am: bb96c13c70
am: 20c37dd6c7

Change-Id: I6c13b04db380d7d536cbdc23283d04482fcc6825
2018-04-06 11:18:26 -07:00
David Brazdil
bb96c13c70 Merge changes Idca52b94,I82ae308d into pi-dev
* changes:
  Sort hidden API light grey
  Add more hidden API to light grey
2018-04-06 17:42:05 +00:00
David Brazdil
90bd7f5709 Merge "Add more API on hiddenapi-light-greylist.txt" into pi-dev am: 90d0b9845d
am: a08ce0f7f6

Change-Id: I35159a4992b9f60e3c514aecfaffe818cceb8fee
2018-04-06 08:34:38 -07:00
David Brazdil
90d0b9845d Merge "Add more API on hiddenapi-light-greylist.txt" into pi-dev 2018-04-06 15:12:39 +00:00
David Brazdil
8f1c508cfe Sort hidden API light grey
Previous changes kept the file unsorted

Bug: 64382372
Test: make
Change-Id: Idca52b9476cda1eabb8dc2a90d6e8182e1a58b32
2018-04-06 16:11:09 +01:00
David Brazdil
aa120f43a4 Add more hidden API to light grey
Bug: 77487572
Test: make
Change-Id: I82ae308d26542e7e72e174e9531f2de80e182e26
2018-04-06 16:10:44 +01:00
Nicolas Geoffray
d7c2c032fa Merge "Light grey MethodHandles$Lookup;-><init>" into pi-dev am: 104d3d2849
am: 82f682949b

Change-Id: I43c31e649c352ef5f077d58747343b443b9a442a
2018-04-06 07:19:16 -07:00
Nicolas Geoffray
104d3d2849 Merge "Light grey MethodHandles$Lookup;-><init>" into pi-dev 2018-04-06 13:57:25 +00:00
David Brazdil
8f42ba5025 Merge "Add new hidden APIs to light grey" into pi-dev am: 977837acd6
am: 143c429bda

Change-Id: Ia0e50f0e058b617707c0a7e3b34a1797daedc800
2018-04-06 06:09:59 -07:00
TreeHugger Robot
977837acd6 Merge "Add new hidden APIs to light grey" into pi-dev 2018-04-06 12:45:23 +00:00
Nicolas Geoffray
a8100ead94 Light grey MethodHandles$Lookup;-><init>
bug: 77520086
Test: m
Change-Id: I539d7222af01c0163ab14946248465f1105f578d
2018-04-06 13:22:40 +01:00
David Brazdil
4521ef1392 Add new hidden APIs to light grey
Bug: 77598425
Test: make
Change-Id: I0f7b992b62afd0590b95281bcb240899074a5fce
2018-04-06 11:45:22 +00:00
David Brazdil
3b8040e4a3 Merge "Add more API to hiddenapi-vendor-list.txt" into pi-dev am: ddeaefb546
am: 1614348adc

Change-Id: Ie75748b3c65070009e1acfe14079678bf5c47f25
2018-04-06 04:14:34 -07:00
Nicolas Geoffray
3a638d2417 Merge "Add new APIS to light grey." into pi-dev am: ec20c88b3d
am: a58e484f05

Change-Id: Ic9ad8e743b9e08b0ed4814d3b393dd913c54d9a9
2018-04-06 04:10:03 -07:00
David Brazdil
ddeaefb546 Merge "Add more API to hiddenapi-vendor-list.txt" into pi-dev 2018-04-06 10:41:15 +00:00
TreeHugger Robot
ec20c88b3d Merge "Add new APIS to light grey." into pi-dev 2018-04-06 10:39:52 +00:00
David Brazdil
f41399b235 Add more API on hiddenapi-light-greylist.txt
Bug: 64382372
Bug: 77266422
Test: make
Change-Id: If6c753e58d613c8f0c76367bc93eb4c3f500650c
2018-04-06 10:59:31 +01:00
David Brazdil
66eb7a2aad Add more API to hiddenapi-vendor-list.txt
Bug: 64382372
Bug: 77278525
Test: make
Change-Id: Ibfeb2c6238e6e992a88a3c056b74c02c85887fad
2018-04-06 09:32:54 +00:00
Nicolas Geoffray
6844e27f35 Add new APIS to light grey.
bug: 77498122
Test: m
Change-Id: I1562f1f12a966a66c066036ef3b46264af50f054
2018-04-06 10:32:37 +01:00
Stephen
cd896cae07 Merge "Adding more APIs to greylist Test: None" into pi-dev am: 54b8750b06
am: 062e13dcfd

Change-Id: I249e968422e6432e4149d1afb791553888d4bb15
2018-04-06 01:46:01 -07:00
TreeHugger Robot
54b8750b06 Merge "Adding more APIs to greylist Test: None" into pi-dev 2018-04-06 08:23:07 +00:00
Stephen
74678f3b29 Adding more APIs to greylist
Test: None

bug: 74066078

Change-Id: I029754dba43f83d6aff941c02ba1caa7fdd1e18c
2018-04-06 08:22:57 +00:00
Leon Scroggins III
366e1e716d Merge "Never scale nine-patches in ImageDecoder" into pi-dev am: 9cb6759072
am: c13c945b19

Change-Id: I437c33c878db8c6bc4cbd3cd3d6989908bc6ff89
2018-04-05 16:19:52 -07:00
TreeHugger Robot
9cb6759072 Merge "Never scale nine-patches in ImageDecoder" into pi-dev 2018-04-05 22:42:39 +00:00
Nicolas Geoffray
7986d0b110 Merge "Add new hidden APIs." into pi-dev am: 0c2b3185b2
am: 1d261b4bb9

Change-Id: I262dcbc6b42f8e427b7cbfeb589a8d8cbf24b86a
2018-04-05 11:37:41 -07:00
Leon Scroggins III
7d940ba43d Never scale nine-patches in ImageDecoder
Bug: 76448902
Bug: 70889348
Test: Manual + CtsThemeHostTestCases
(Ica5e7e81848c3880accee922ee6f1cc9e26262ca)

Scaling a nine-patch requires scaling its divs. When the scale factor is
not an integer, we have to round. This gets out of sync with the way the
decoder scaled the image, resulting in stretching or keeping fixed the
wrong portions of the image. Making this worse, when we scale down, we
end up with divs colliding with each other, and we have to arbitrarily
adjust them further so they do not collide.

NinePatchDrawable and the drawing code already know how to handle
drawing from the originally-sized image and do a better job stretching
appropriately, so allow them to do their job.

We already do something similar for Bitmaps created by ImageDecoder on
apps targeting P and above - instead of scaling them up, we allow the
BitmapDrawable's scaling code to handle density differences. We
preserved the old behavior (scale up) on apps targeting pre-P because
those apps may rely on the size of the Bitmap contained in a
BitmapDrawable without accounting for its density (see Bug: 74061412).
But that is not an issue for NinePatchDrawables, which do not allow
peeking at their internal Bitmaps.

Rewrite ImageDecoder.computeDensity. There is no need for it to be
static, since it takes an ImageDecoder as a parameter and reads its
fields, including the new field mIsNinePatch. Set mIsNinePatch in the
constructor to avoid another down call into native. Split up the
conditions that result in returning srcDensity without calling
setTargetSize for clarity.

Remove ImageDecoder constructor from the graylist. It was accidentally
added due to the fact that it is called transitively from public APIs.

Change-Id: I3c5ddd67f3352c991515f30ce1c477c9a608833f
2018-04-05 12:50:32 -04:00
Nicolas Geoffray
c5632ece21 Add new hidden APIs.
bug: 77527994
Test: m
Change-Id: Iebdab9d09c4d4531cfdfed6c3e363d68ed407ef1
2018-04-05 17:29:42 +01:00
Stephen
90209b5477 Merge "Adding methods to greylist Test: None" into pi-dev am: 657f173a6d
am: ece5736fca

Change-Id: I4931656d69224341a3de897616b4b86e0b879ef2
2018-04-04 12:33:02 -07:00
TreeHugger Robot
657f173a6d Merge "Adding methods to greylist Test: None" into pi-dev 2018-04-04 19:09:55 +00:00
Dmitry Dementyev
247c1d1eed Merge "Remove deprecated recoverable keystore classes." into pi-dev am: 654598b542
am: 45f2f231cf

Change-Id: If55054311c28503b7f937994f0d01fe165d13106
2018-04-04 11:10:16 -07:00
David Brazdil
339cab7ec2 Merge "Move hidden API from vendor to light grey" into pi-dev am: b622906dc5
am: 5563e95a2e

Change-Id: I598e35322a3eccd244aa3ef6c60717b53270d248
2018-04-04 10:53:56 -07:00
Dmitry Dementyev
654598b542 Merge "Remove deprecated recoverable keystore classes." into pi-dev 2018-04-04 17:42:11 +00:00
David Brazdil
b622906dc5 Merge "Move hidden API from vendor to light grey" into pi-dev 2018-04-04 17:23:30 +00:00
Stephen
2639346b2e Adding methods to greylist
Test: None

bug: 74066078

Change-Id: Ic84f4374c8b7c0b359c8674558b89a7a370cc1d0
2018-04-04 14:41:38 +00:00
David Brazdil
c1d8d0a2f7 Move hidden API from vendor to light grey
Bug: 64382372
Bug: 77328929
Test: make
Change-Id: I5141b56c79fad2bc6943ca6086eae53cad82d09c
2018-04-04 14:26:08 +01:00
Winson Chung
8e50da2016 Prevent unnecessary reordering of the home stack am: 6a38fca2d8
am: 40fb4a289a

Change-Id: Ic448939e0e27f5e1baa9e83bcc10640ee0ed8013
2018-04-03 17:49:09 -07:00