diff options
author | Svetoslav <svetoslavganov@google.com> | 2013-10-15 04:03:16 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-15 04:03:16 -0700 |
commit | 809ddcf1c9e2d8f66d058d7dacb0a731a52fae6c (patch) | |
tree | 244367644d68cbff3f61cb4d0980db8ce91400b0 /packages | |
parent | 06d6a7548e108358f03e78bb6106882cbfc0a4d5 (diff) | |
parent | a337895682d86e9d71b04562a8b6e0dae889c8ac (diff) | |
download | frameworks_base-809ddcf1c9e2d8f66d058d7dacb0a731a52fae6c.zip frameworks_base-809ddcf1c9e2d8f66d058d7dacb0a731a52fae6c.tar.gz frameworks_base-809ddcf1c9e2d8f66d058d7dacb0a731a52fae6c.tar.bz2 |
am a3378956: am 2c163ee4: am 1e639d2d: Merge "Update the message for unavailable printers." into klp-dev
* commit 'a337895682d86e9d71b04562a8b6e0dae889c8ac':
Update the message for unavailable printers.
Diffstat (limited to 'packages')
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java index 3a23b3e..2997707 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java @@ -2175,10 +2175,17 @@ public class PrintJobConfigActivity extends Activity { mIsPosted = false; if (mDestinationSpinner.getSelectedItemPosition() >= 0) { View itemView = mDestinationSpinner.getSelectedView(); - TextView titleView = (TextView) itemView.findViewById(R.id.title); - String title = getString(R.string.printer_unavailable, - mCurrentPrinter.getName()); - titleView.setText(title); + TextView titleView = (TextView) itemView.findViewById(R.id.subtitle); + try { + PackageInfo packageInfo = getPackageManager().getPackageInfo( + mCurrentPrinter.getId().getServiceName().getPackageName(), 0); + CharSequence service = packageInfo.applicationInfo.loadLabel( + getPackageManager()); + String subtitle = getString(R.string.printer_unavailable, service.toString()); + titleView.setText(subtitle); + } catch (NameNotFoundException nnfe) { + /* ignore */ + } } } } |