835 Commits

Author SHA1 Message Date
Yohei Yukawa
1f3257d766 Merge changes Iee47e374,Icc64942a
* changes:
  Use Context.getSystemService(Class<T>) for InputManager.
  Use Context.getSystemService(Class<T>) for InputMethodManager.
2015-11-26 08:16:33 +00:00
Yohei Yukawa
777ef95ebf Use Context.getSystemService(Class<T>) for InputMethodManager.
This is a mechanical replacement of Context.getSystemService(String)
with Context.getSystemService(Class<T>) when retrieving
InputMethodManager.  Note those are bundled code.  Hence we don't need
to make sure Build.VERSION.SDK_INT >= 23.

Change-Id: Icc64942ad8f11e44bf84f8d4fe476b2fdd1257f3
2015-11-26 00:02:05 -08:00
Philip P. Moltmann
03755a1f12 Syncronosuly notify SelectPrinterActivity about changes to enabled print
services

If the SelectPrinterActivity is visible it shows different emptyState
depending on if there are print services available or not. Hence the
activity has to listen to changes to the list of enabled services.

This also fixes a small syncronsation problem if two observers are
registered for the enabled print services.

Bug: 25666802
Change-Id: I79af66f25f10e66347b48ce9bb99c1657b30a8dd
2015-11-25 16:28:34 -08:00
Philip P. Moltmann
c9137615e4 Merge changes from topic 'AddPrinters'
* changes:
  Create PrintDiscoverySession for future print services
  Update printer availability when printSpooler is paused. This makes the window update syncronously when in multi-window mode.
2015-11-24 21:33:39 +00:00
Svetoslav Ganov
abef6d6f2b Merge "Allow fragment state loss on fragment transaction" 2015-11-24 20:56:22 +00:00
Svetoslav
d25ddc3d0e Allow fragment state loss on fragment transaction
We are not saving the state of this fragment on onSaveState,
so its Okay to loose state while confirming the transaction.

bug:25847358

Change-Id: I2f6587d528b2d8b8f24a83954cc896a6ff514996
2015-11-24 12:54:21 -08:00
Philip P. Moltmann
c0c73271b0 Merge "printspooler.NotificationCOntroller: Remove deprecated APIs and silence other warnings." 2015-11-23 16:18:57 +00:00
Geoff Mendal
7684a41009 Import translations. DO NOT MERGE
Change-Id: I46e625b01bd8cdec98ad7c097c4c12e1e211f6d2
Auto-generated-cl: translation import
2015-11-23 05:48:40 -08:00
Philip P. Moltmann
dd635ce95c printspooler.NotificationCOntroller: Remove deprecated APIs and silence other warnings.
Change-Id: I53000e49793dccd6f53b0813e5ce97c5c6929832
2015-11-20 16:51:51 -08:00
Philip P. Moltmann
e2b95e4c56 Update printer availability when printSpooler is paused. This makes the window update syncronously when in multi-window mode.
Change-Id: If802f32a011b24ec8cca9292eb12bbb399548a40
2015-11-20 11:53:12 -08:00
Philip P. Moltmann
adac7f3406 Do not restart printSpooler when switching portait mode / landscape mode
When the configration changes there are two modes to handle it:
1. do through a onDestroy - onCreate cycle
2. declare that your activity can handle certain changed and handle them
   in onConfigurationChanges

For most apps (1) is zero effort to implement, hence it is the default
behavior. You only want to do (2) if recreating your activity is
expensive.

As recreating the printActivity is expensive (and currently even
impossible) we want to handle the configuration change gracefully. There
is no code to be added as handling portrait mode / landscape mode switch
is not different from an orientation switch.

Bug: 25727559
Change-Id: Iac5b854c9dd080a4432957bc4551162dc3d480e9
2015-11-18 16:27:51 -08:00
Geoff Mendal
b3197f8c04 Import translations. DO NOT MERGE
Change-Id: I49c49dae609cc2b2770652a0979693124f30a824
Auto-generated-cl: translation import
2015-11-18 05:36:36 -08:00
Philip P. Moltmann
354bd63726 Merge "Show "select a printer" as "destination" the first the the user prints" 2015-11-16 21:43:22 +00:00
Philip P. Moltmann
ca3f938326 Merge "Switch add icons to the default menu add icon" 2015-11-16 20:16:23 +00:00
Philip P. Moltmann
5e54896d0b Show "select a printer" as "destination" the first the the user prints
The Spinner does not support a prompt, hence temporarily hijack the
first element and install an alternate view. Once the Spinner is touched
revert to the old behavior.

If we showed a prompt the views in the spinner cannot be recycled.

Bug: 24132864
Change-Id: Iaf97878f85388a8c6351e716117b16f34919ad84
2015-11-16 12:14:18 -08:00
Philip P. Moltmann
7dfe4f64dc Switch add icons to the default menu add icon
Also use the material search icon.

Bug: 22563699
Change-Id: Iff7c6b5cac8a9f0bf282e061d2ed09c4c0fb480a
2015-11-16 11:58:46 -08:00
Geoff Mendal
97f8aae2f8 Import translations. DO NOT MERGE
Change-Id: Ifa6072a51df82cd0f473908393b500ff8a0d5ec0
Auto-generated-cl: translation import
2015-11-16 05:34:04 -08:00
Geoff Mendal
0477e97830 Import translations. DO NOT MERGE
Change-Id: I1378e54201336a2458b2cf4f8f2982922e8e6ac5
Auto-generated-cl: translation import
2015-11-14 06:08:16 -08:00
Philip P. Moltmann
d86e8d813b Merge "Do not disable the add printer icon and have special empty view if no print services are enabled" 2015-11-12 23:07:04 +00:00
Philip P. Moltmann
953639cb82 Do not disable the add printer icon and have special empty view if no
print services are enabled

The add printer icon is always visible as this is used for both adding
a printer and adding addition print services

We have three different empty views now:
1. No print services
2. No printers found (not search filter set)
3. No printers found (search filter set)

Bug: 24132367
Change-Id: Ic30812b60986f1e0f023488cefc6aa901ce20824
2015-11-12 11:48:09 -08:00
Philip P. Moltmann
6dc9114ef8 Merge "Deal correctly with suggested print attributes" 2015-11-12 17:17:30 +00:00
Philip P. Moltmann
3aa1fc5aec Allow ellipsizing of copy count and media size in PrintActivity main view.
Bug: 25589299
Change-Id: I231c156de1180b18a140ee8ad896bd4226196bc9
2015-11-11 10:30:21 -08:00
Geoff Mendal
5fcbc95825 Import translations. DO NOT MERGE
Change-Id: Id20219220ba0cace66145a7f51c64ba6e3157f86
Auto-generated-cl: translation import
2015-11-11 05:38:05 -08:00
Philip P. Moltmann
b4efdb4726 Deal correctly with suggested print attributes
An app might suggest certain attribute for an print job. This patch
fixes

- PrintActivity should not silently overwrite the attributes with
  the default values
- Handle duplex mode in PrintAttributes similar to the other attributes.
  I.e. have an "unset" value (0). This is an API change. But the only
  use case for PrintAttributes was to pass them to print() and thereby
  the PrintActivity. This was broken (see above), hence we are changing
  and API that could have never been used.

Bug: 23629618
Change-Id: I43c25704497c799352fb806126dc93f6db4879f5
2015-11-10 17:09:30 -08:00
Svetoslav Ganov
59cf3086a9 Merge "Avoid NPE in printspooler when changing language" am: 8d8515e708 am: 5522efb130
am: 16009a6dea

* commit '16009a6deaff272c94046facbeb567bafdaacc69':
  Avoid NPE in printspooler when changing language
2015-11-10 02:36:02 +00:00
Svetoslav Ganov
16009a6dea Merge "Avoid NPE in printspooler when changing language" am: 8d8515e708
am: 5522efb130

* commit '5522efb1300cfa87a8434bd396093a2ae076fa69':
  Avoid NPE in printspooler when changing language
2015-11-10 01:07:27 +00:00
Svetoslav Ganov
5522efb130 Merge "Avoid NPE in printspooler when changing language"
am: 8d8515e708

* commit '8d8515e708f0cebf69587750bbb3abcb315cc61e':
  Avoid NPE in printspooler when changing language
2015-11-10 01:03:05 +00:00
Philip P. Moltmann
853a6f564a Add a alert that allows the user to approve a print service when
we print using it the first time.

This warning used to be shown when the print settings app was used
to enable a service.

If two warning as shown for the same print service we automcatially
dismiss all dialogs once one dialog is confirmed. Please note that
we are not confirming the printjob as it is unexpeced to have a
single click to confirm multiple print jobs.

Change-Id: I8bb0a49bac2063c1c55e2f24bd34df2c44e2df89
Bug: 24135353
2015-11-09 09:49:26 -08:00
Masaaki Iwaguchi
86d13f3daf Avoid NPE in printspooler when changing language
PrintActivity is recreated when the language setting is changed.
As a result of the recreation mCurrentPrinter is null, which causes
a NullPointerException when onActivityResult() is called.

The issue is solved with a simple null check.

Change-Id: Ic58f0ca01577d2ec02d494739f3bc2f06240dd44
2015-11-05 17:39:21 +00:00
Baligh Uddin
40fa6b1e91 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 25433205
Change-Id: I44df802e45a340d7ef7f094c6c06001d350bb0c5
2015-11-04 15:46:28 -08:00
Baligh Uddin
198127cac3 Import translations. DO NOT MERGE
Change-Id: I9b1c6ef0255a30142b1c7fd98d2b3e2b04b0ba93
Auto-generated-cl: translation import
2015-09-25 22:52:20 -07:00
Elliott Hughes
434a481b21 am ea1831d2: am b57dd722: resolved conflicts for a884d81e to stage-aosp-master
* commit 'ea1831d211ea0e6b2d161c714bb0786369ef2df5':
  constify JNINativeMethod function pointer tables
2015-09-24 17:23:00 +00:00
Elliott Hughes
b57dd722f1 resolved conflicts for a884d81e to stage-aosp-master
Change-Id: Ice485967fa96f13786024b6939b826638e906ff0
2015-09-24 10:01:32 -07:00
Daniel Micay
76f6a86de2 constify JNINativeMethod function pointer tables
Change-Id: I4036c924958221cbc644724f8eb01c5de3cd7954
2015-09-22 17:10:35 -04:00
Geoff Mendal
1c85ac66c0 Import translations. DO NOT MERGE
Change-Id: I6c5aed9a246676b5b0c3c636f7ef034da7d1de01
Auto-generated-cl: translation import
2015-08-31 05:43:06 -07:00
Chris Wren
2741a28bee am 75cc74b6: am a757636e: am b35152cb: am ca3a3650: am 6e75e7dd: Merge "Instrument printing service for metrics collection." into mnc-dev
* commit '75cc74b62a9fa8888c0ca52099557deb7d8ad53c':
  Instrument printing service for metrics collection.
2015-08-01 17:54:55 +00:00
Chris Wren
a757636e11 am b35152cb: am ca3a3650: am 6e75e7dd: Merge "Instrument printing service for metrics collection." into mnc-dev
* commit 'b35152cb182a0d25c896d27acf4bedb93f03cadc':
  Instrument printing service for metrics collection.
2015-08-01 16:53:49 +00:00
Chris Wren
b35152cb18 am ca3a3650: am 6e75e7dd: Merge "Instrument printing service for metrics collection." into mnc-dev
* commit 'ca3a3650e41449eb9d3b9643e844b7506d77759f':
  Instrument printing service for metrics collection.
2015-08-01 16:38:10 +00:00
Chris Wren
6fe9424837 am 6e75e7dd: Merge "Instrument printing service for metrics collection." into mnc-dev
* commit '6e75e7dd988d7704a01528f479421ab5e6012c99':
  Instrument printing service for metrics collection.
2015-08-01 00:18:31 +00:00
Chris Wren
dcc34fd8a3 Instrument printing service for metrics collection.
Bug: 22837316
Change-Id: I8bf62940f5eb495d8d7a10df958d9bc8ad76662a
2015-07-30 16:29:20 -04:00
Geoff Mendal
b851c2102b Import translations. DO NOT MERGE
Change-Id: I074e138929dbd329a281adbf55521e0d4a521485
Auto-generated-cl: translation import
2015-07-29 05:32:05 -07:00
Svetoslav Ganov
ceb0c2d0bd am 58ef5f1d: am dc63edf4: am 34c1df3a: am 9124c178: am 8a54da92: Merge "Pass correct extras to the custom print options activity" into mnc-dev
* commit '58ef5f1db5907209faf1890079f6ee607e38427c':
  Pass correct extras to the custom print options activity
2015-07-27 20:50:38 +00:00
Svetoslav Ganov
dc63edf43b am 34c1df3a: am 9124c178: am 8a54da92: Merge "Pass correct extras to the custom print options activity" into mnc-dev
* commit '34c1df3a154abb8bd495f74f5e53b91e7956e596':
  Pass correct extras to the custom print options activity
2015-07-27 20:21:48 +00:00
Svetoslav Ganov
34c1df3a15 am 9124c178: am 8a54da92: Merge "Pass correct extras to the custom print options activity" into mnc-dev
* commit '9124c1784d6537827a6b6423f58572395d8fb820':
  Pass correct extras to the custom print options activity
2015-07-27 19:59:10 +00:00
Svetoslav Ganov
817ea6d48d am 8a54da92: Merge "Pass correct extras to the custom print options activity" into mnc-dev
* commit '8a54da92ce3da393396bbf0ff86d9525089dcdbf':
  Pass correct extras to the custom print options activity
2015-07-27 19:41:20 +00:00
Svet Ganov
f12b393ff4 Pass correct extras to the custom print options activity
bug:22734138

Change-Id: Iea1bc32c3e863072b2021b823bef2cefa54fa540
2015-07-25 12:11:01 -07:00
Geoff Mendal
9f1c526f9c Import translations. DO NOT MERGE
Change-Id: Id853f95b011d837e60ad22cee691260e9bc6c2a8
Auto-generated-cl: translation import
2015-07-22 05:38:43 -07:00
Geoff Mendal
703170645d Import translations. DO NOT MERGE
Change-Id: I7e22afc43c9029b40ba2df53dfc10a9a688c4fd2
Auto-generated-cl: translation import
2015-07-15 14:17:17 -07:00
Geoff Mendal
eddc2bcb8a Import translations. DO NOT MERGE
Change-Id: Ica6b328575762721edf4f692d131934f4e3d195d
Auto-generated-cl: translation import
2015-07-08 05:32:41 -07:00
Geoff Mendal
5d935e8271 Import translations. DO NOT MERGE
Change-Id: Ia90a9400d718b5ef61f55ed4d6c5eb9fe48d9667
Auto-generated-cl: translation import
2015-07-06 08:50:33 -05:00