Loading packages/PrintSpooler/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,9 @@ <!-- Description of printer info icon. [CHAR LIMIT=50] --> <string name="printer_info_desc">More information about this printer</string> <!-- Notification that we could not create a file name for the printed PDF. [CHAR LIMIT=50] --> <string name="could_not_create_file">Could not create file</string> <!-- Notification that print services as disabled. [CHAR LIMIT=50] --> <string name="print_services_disabled_toast">Some print services are disabled</string> Loading packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +10 −1 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ import android.widget.ImageView; import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast; import com.android.internal.logging.MetricsLogger; import com.android.printspooler.R; import com.android.printspooler.model.MutexFileProvider; Loading Loading @@ -658,7 +659,15 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat intent.setType("application/pdf"); intent.putExtra(Intent.EXTRA_TITLE, info.getName()); intent.putExtra(DocumentsContract.EXTRA_PACKAGE_NAME, mCallingPackageName); try { startActivityForResult(intent, ACTIVITY_REQUEST_CREATE_FILE); } catch (Exception e) { Log.e(LOG_TAG, "Could not create file", e); Toast.makeText(this, getString(R.string.could_not_create_file), Toast.LENGTH_SHORT).show(); onStartCreateDocumentActivityResult(RESULT_CANCELED, null); } } private void onStartCreateDocumentActivityResult(int resultCode, Intent data) { Loading Loading
packages/PrintSpooler/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,9 @@ <!-- Description of printer info icon. [CHAR LIMIT=50] --> <string name="printer_info_desc">More information about this printer</string> <!-- Notification that we could not create a file name for the printed PDF. [CHAR LIMIT=50] --> <string name="could_not_create_file">Could not create file</string> <!-- Notification that print services as disabled. [CHAR LIMIT=50] --> <string name="print_services_disabled_toast">Some print services are disabled</string> Loading
packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +10 −1 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ import android.widget.ImageView; import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast; import com.android.internal.logging.MetricsLogger; import com.android.printspooler.R; import com.android.printspooler.model.MutexFileProvider; Loading Loading @@ -658,7 +659,15 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat intent.setType("application/pdf"); intent.putExtra(Intent.EXTRA_TITLE, info.getName()); intent.putExtra(DocumentsContract.EXTRA_PACKAGE_NAME, mCallingPackageName); try { startActivityForResult(intent, ACTIVITY_REQUEST_CREATE_FILE); } catch (Exception e) { Log.e(LOG_TAG, "Could not create file", e); Toast.makeText(this, getString(R.string.could_not_create_file), Toast.LENGTH_SHORT).show(); onStartCreateDocumentActivityResult(RESULT_CANCELED, null); } } private void onStartCreateDocumentActivityResult(int resultCode, Intent data) { Loading