Commit Graph

1144 Commits

Author SHA1 Message Date
Philip P. Moltmann
6870033d37 Enforce permission for print system APIs
The permission is preinstalled as we want to leave the PrintSpooler
unpriviledged.

Test: Checked that Settings, PrintSpooler and BuiltInPrintService still
      behave as expected.
Fixes: 62350107
Change-Id: Id33896f2899533f2d05cafa926df29cf1c6bfa77
2017-07-14 16:16:13 -07:00
Bill Yi
1ba21cee96 Import translations. DO NOT MERGE
Change-Id: I9de56de27b233b159c962353f361af06e0f58629
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-07-13 01:29:32 -07:00
Bill Yi
564defda65 Import translations. DO NOT MERGE
Change-Id: Icf90cd9ce6b4cb42a5969f0549079d799dd6b97f
Auto-generated-cl: translation import
2017-06-30 23:09:08 -07:00
Philip P. Moltmann
a436bf599a DestinationSpinner intercepts click not touch
As touch is not executed by a11y code.

Fixes: 62743170
Test: Turned on accessibility and pressed the spinner. Saw listener
      executed
      cts-tradefed run cts-dev -m Print

Change-Id: If4e26f020fc5a831c8f4896188fd91fb559c5948
2017-06-20 16:38:20 -07:00
Philip P. Moltmann
1db4a5e21b Merge "Only preload selected pages" into oc-dev am: 314457a424 am: 1af7c0bdbe
am: 39ef047a93

Change-Id: I23d064676ba55ab98946d136dfbf8df635f2309f
2017-06-17 03:09:25 +00:00
Philip P. Moltmann
39ef047a93 Merge "Only preload selected pages" into oc-dev am: 314457a424
am: 1af7c0bdbe

Change-Id: Ia3ecca3507a8d3b2e18dee59f83af0c0804ab68c
2017-06-17 03:02:42 +00:00
Philip P. Moltmann
1af7c0bdbe Merge "Only preload selected pages" into oc-dev
am: 314457a424

Change-Id: Ice10d16e149ce7807c50b413939cb71caf52f715
2017-06-17 02:57:26 +00:00
Philip P. Moltmann
9bab45a2da Only preload selected pages
Otherwise if only some pages are selected all (non-selected) pages in
between are preloaded.

Test: Selected only some pages of a large document and observed which
      pages got preloaded
      cts-tradefed run cts-dev -m Print
Fixes: 62296301
Change-Id: I3a97cfa6991e5a95ff73628c4bb540c629160c0c
2017-06-16 11:49:10 -07:00
Philip P. Moltmann
56448c7369 Merge "Select the right pages to scrap" into oc-dev am: 890cb59003 am: 955aead48d
am: e993a709ce

Change-Id: I655c9b8ad44aed44cc0de245150625aaeed5df6d
2017-06-14 19:07:01 +00:00
Philip P. Moltmann
e993a709ce Merge "Select the right pages to scrap" into oc-dev am: 890cb59003
am: 955aead48d

Change-Id: Ie7ea8573c00506a035a1eb61bdff7f66780e27ce
2017-06-14 15:03:42 +00:00
Philip P. Moltmann
955aead48d Merge "Select the right pages to scrap" into oc-dev
am: 890cb59003

Change-Id: I5393dde07ea3feff2053d85769eccd5195139229
2017-06-14 14:52:13 +00:00
Philip P. Moltmann
bdace63d5b Select the right pages to scrap
The code before overwrote some data the outside code expected to not be
modified which resulted in the scrapped pages to be offset.

Test: - cts-tradefed run cts-dev -m Print
      - Tried to repro case in the bug
Bug: 62296301

Change-Id: If3f250dbca43125bbbe9faadc5183a6dbaa69481
2017-06-13 15:29:01 -07:00
Bill Yi
d399c0dee7 Import translations. DO NOT MERGE
Change-Id: Ifb61023a779bccfe2c73653d9f6689b426eedcb7
Auto-generated-cl: translation import
2017-06-12 12:11:39 -07:00
Bill Yi
ee976667b1 Import translations. DO NOT MERGE
Change-Id: Ibb761396547692a291f81fd4db166a2201f273ef
Auto-generated-cl: translation import
2017-05-23 22:13:21 -07:00
Bill Yi
bf6f023659 Import translations. DO NOT MERGE
Change-Id: I2f7445a06b22c322973ba6e0fe78670d20563f00
Auto-generated-cl: translation import
2017-05-08 23:10:14 -07:00
Bill Yi
66dae42af4 Import translations. DO NOT MERGE
Change-Id: I2e0109b54a95d6840e3119994848829943023982
Auto-generated-cl: translation import
2017-05-04 17:48:32 -07:00
The Android Open Source Project
c7d0661279 Import translations. DO NOT MERGE
Change-Id: Iae5f3f4f17f19f75e5cbf73133e88105fab69622
Auto-generated-cl: translation import
2017-05-01 16:47:11 -07:00
The Android Open Source Project
aef6502f23 Import translations. DO NOT MERGE
Change-Id: I9c23dd76884c41af6a81e53f11e24f98003476d0
Auto-generated-cl: translation import
2017-05-01 16:43:25 -07:00
Bill Yi
db77d39e44 Import translations. DO NOT MERGE
Change-Id: I1f51ab8497b9244bbade4dacd6647cb6b92413e9
Auto-generated-cl: translation import
2017-04-29 20:56:35 -07:00
Bill Yi
da9cba202a Import translations. DO NOT MERGE
Change-Id: Id1cf0436e966c1ae73301b64c1e479f55abd078b
Auto-generated-cl: translation import
2017-04-29 09:58:01 -07:00
Bill Yi
6c8de9c6ef Import translations. DO NOT MERGE
Change-Id: I33675c43783b79bf3492b795e2de8b64f07faf5b
Auto-generated-cl: translation import
2017-04-26 00:16:24 -07:00
Bill Yi
c5f39a54c6 Import translations. DO NOT MERGE
Change-Id: Ic14f51b2fd288f8e3dc229abcf5a8ed5eb740354
Auto-generated-cl: translation import
2017-04-26 00:12:28 -07:00
Philip P. Moltmann
f0164ab731 Merge "Show new colored icon for PDF printer" into oc-dev am: f160c57eb1
am: 899d16a88a

Change-Id: I03251bd7e07c300a44eb889273ad54b2225177c9
2017-04-22 04:02:32 +00:00
Philip P. Moltmann
899d16a88a Merge "Show new colored icon for PDF printer" into oc-dev
am: f160c57eb1

Change-Id: I98fb3d00cc9d6b92bced36c7f51834136ecca9c3
2017-04-22 03:55:59 +00:00
Philip P. Moltmann
15d68aea5a Show new colored icon for PDF printer
The color matches the color of the printers reported by the Default
Print Service.

Change-Id: I12c19ab498fc5df3af88932eaeb6b3f7015e71d9
Fixes: 35766257
Test: Looked at Print UI
2017-04-21 15:12:02 -07:00
Alan Viverette
14b3375e43 Merge "Remove unnecessary casts on calls to findViewById" into oc-dev am: 7c8ab2651b
am: efc602c307

Change-Id: Id991d413933d8435a05b129bf13e917941371c01
2017-04-14 18:25:53 +00:00
Alan Viverette
efc602c307 Merge "Remove unnecessary casts on calls to findViewById" into oc-dev
am: 7c8ab2651b

Change-Id: I82826b63a3d6bc527c696158bfab98fe438f9847
2017-04-14 17:04:19 +00:00
Alan Viverette
51efddbd3b Remove unnecessary casts on calls to findViewById
Just frameworks/ this time. More paths to come.

Bug: 24137209
Test: make -j32
Change-Id: Iff27abd26fa43296ac2fff8f534fc6742d2ae80c
2017-04-14 11:15:50 -04:00
Bill Yi
3b1e4d3e86 Import translations. DO NOT MERGE
Change-Id: I4d7599fdee360cf86ce1980b9759a692a493d21b
Auto-generated-cl: translation import
2017-04-12 22:38:20 -07:00
Bill Yi
080b410086 Import translations. DO NOT MERGE
Change-Id: I7e1162b350c7337fded998a04ba80d20043dd39d
Auto-generated-cl: translation import
2017-04-12 22:34:29 -07:00
Bill Yi
6104b8ac65 Import translations. DO NOT MERGE
Change-Id: I00ba119096a1178627988e15ec6e71f637b2ac57
Auto-generated-cl: translation import
2017-04-11 11:41:51 -07:00
Bill Yi
f33fe38cf0 Import translations. DO NOT MERGE
Change-Id: Ie701e3069c3602444db33553132e687c6b0c6606
Auto-generated-cl: translation import
2017-04-11 03:41:59 -07:00
Bill Yi
f20444c9dd Import translations. DO NOT MERGE
Change-Id: If7648048872859a1d4a2032a2f6de6a6e9cf19f6
Auto-generated-cl: translation import
2017-04-07 18:05:51 -07:00
Bill Yi
28dbd7a31e Import translations. DO NOT MERGE
Change-Id: I714fed2f7768828798d0c953439e2a7703a0068d
Auto-generated-cl: translation import
2017-04-07 18:02:12 -07:00
Philip P. Moltmann
544dd6a7fc Merge "Make print failure notifications important" into oc-dev am: fe0277c036
am: 455d0e7eb5

Change-Id: I4845a19be0122af02ef817a912f2e07acae83122
2017-04-06 02:55:56 +00:00
Philip P. Moltmann
d37be36a56 Make print failure notifications important
Before failures and progress was similar important. Both were not shown.
Now both are shown and the failures alert.

Removed the notification grouping as autogrouping is good enough.

Test: Created failed and running print jobs
Change-Id: I6dfca583d69aa9713d45a2bc52d05e95f06b376f
2017-04-05 16:46:50 -07:00
Narayan Kamath
492e9e851c Properly guard access to CloseGuard in finalizers.
CloseGuard instances are allocated in constructors and usually
assigned to final fields. This implies they're non-null in finalizers
except in the case where the constructor throws. We add a null check
to make sure we can continue cleaning up other state in the finalizer
(if applicable).

Also, this change decouples closeguard warnings in constructors
from other state based logic. This because the logic there is usually
duplicated with the call to close().

NOTE: This change is not a "complete" fix. Many of these finalizers
are broken in the case where <init> throws. The only objective of
this change is to make such errors more obvious.

Note that some of these classes don't have CTS tests.

Test: make, CtsMediaTestCases.
Bug: 35609098

Change-Id: I24d9e0215f80e44914dba8ab99b6312fd6ed1fc0
2017-04-03 18:12:04 +01:00
Dan Shi
1fee398b88 Change test type from InstrumentationTest to AndroidJUnitTest
Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#

Bug: 35882476
Test: local test

Change-Id: Ic3c4c7a9d29ef9d32a407f31cfc93c5e43650297
2017-03-31 16:02:33 -07:00
Philip P. Moltmann
d0e44c5ee3 Do not allow printing until preview is updated
Otherwise we might end up in the situation where we print something that
was not previewed.
This is of course bad for the user as he prints something he has not seen.
It is also bad for the print spooler as in the case the layout did not
describe the amount of pages, we do not know the number of pages available
until the update is complete.

We now allow changing of printer at any time unless printing is in final
stage. If we don't allow this the changing of printer would be blocked
until the intial document was written which might take some time.

Fixes: 36599750
Test: cts-tradefed run cts-dev -m Print
Change-Id: I93e910c02f2a770008b845028f0adf17b3d410e2
(cherry picked from commit 378cddbc41)
2017-03-29 16:13:32 +00:00
Philip P. Moltmann
378cddbc41 Do not allow printing until preview is updated
Otherwise we might end up in the situation where we print something that
was not previewed.
This is of course bad for the user as he prints something he has not seen.
It is also bad for the print spooler as in the case the layout did not
describe the amount of pages, we do not know the number of pages available
until the update is complete.

We now allow changing of printer at any time unless printing is in final
stage. If we don't allow this the changing of printer would be blocked
until the intial document was written which might take some time.

Fixes: 36599750
Test: cts-tradefed run cts-dev -m Print
Change-Id: I93e910c02f2a770008b845028f0adf17b3d410e2
2017-03-24 17:18:33 -07:00
Dan Shi
874a0916fc Merge "Add test configs to apct tests under frameworks/base" 2017-03-22 17:55:58 +00:00
Dan Shi
7f2afd2dff Add test configs to apct tests under frameworks/base
TouchLatency is needed by test TouchLatencyJankTestWear
UiBench is needed by test UiBenchJankTests

Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#

Bug: 35882476
Test: local test
make -j32 TouchLatency TouchLatencyJankTestWear  && \
tradefed.sh run template/local --template:map test=TouchLatencyJankTestWear \
      --test-tag testname --log-level-display VERBOSE
make -j32 UiBenchJankTests UiBench  && \
tradefed.sh run template/local --template:map test=UiBenchJankTests \
      --test-tag testname --log-level-display VERBOSE

Change-Id: I63f23e3a21ad1343607953958fb7bb0a5fb8c343
2017-03-21 00:05:14 -07:00
Philip P. Moltmann
a5c560b328 Merge "Handle corrupted files when cutting out pages" 2017-03-20 17:41:32 +00:00
Philip P. Moltmann
f7a5b4fb30 Handle corrupted files when cutting out pages
Before the print spooler crashes, now we crash the printing app.

Bonus: Renamed and documented fields as I could never remeber what they
mean.

Test: Added new (disabled) test to CTS print tests that emulated the
scenario
Bug: 35350768
Change-Id: I41c094960d96f46d274e9f87381bcda5274d5612
2017-03-16 12:15:53 -07:00
Simran Basi
473a16e492 frameworks/base: Add APCT tests to the device-tests suite.
This CL adds the APCT tests within this project to
a similar suite as CTS known as device-tests.

The current method of running APCT tests in the infrastructure
is unaffected.

Bug: 35882476
Test: `make dist device-tests -j` and local builds of
      continuous_instrumentation_tests & continuous_native_tests

Change-Id: Ifa382fe691842c1cd76897775b9e2a1653449eb5
2017-03-15 14:46:27 -07:00
Bill Yi
4eabb5dff8 Import translations. DO NOT MERGE
Change-Id: I585aa8798b0ebebe1b6290dfa18783259a0f413b
Auto-generated-cl: translation import
2017-02-28 00:44:48 -08:00
Hiroaki Kuriyama
aa514313a5 Merge "PrintSpooler: Remove recommendation if Play Store is not installed" am: 57b966eee1 am: 7cd04745f4
am: 2ab70d213b

Change-Id: I9d4e003492c5d2b8463725e454ac985481958db7
2017-02-17 20:40:49 +00:00
Hiroaki Kuriyama
2ab70d213b Merge "PrintSpooler: Remove recommendation if Play Store is not installed" am: 57b966eee1
am: 7cd04745f4

Change-Id: I04a0d5afbaedbef3a1d7b005dba124888fd213ca
2017-02-17 20:30:36 +00:00
Bill Yi
db067b2c4d Import translations. DO NOT MERGE
Change-Id: I5c7c9644748b50c15eeda5bc0c6c1505d309cdeb
Auto-generated-cl: translation import
2017-02-16 20:09:24 -08:00
Hiroaki Kuriyama
36bebe8420 PrintSpooler: Remove recommendation if Play Store is not installed
Sympton:
If Play Store (com.android.vending) is not installed, printer
recommendation function which guides a user to Play Store is useless.

Root-cause:
Even if Play Store is not installed,
PrintSpooler tries to start an activity for market:// with package
names in Play Store.

Solution:
Hide printer recommendation UI and show "No print services enabled"
if there is no printer service.

Change-Id: I0b2eabbd57bc47c6382f53e610e33252ea359390
2017-02-14 21:21:16 +09:00